Skip to content

Commit 34cfb4c

Browse files
samples: adc_sequence: add device tree overlay for xg29_rb4412a
This commit introduces a overlay for the xg29_rb4412a board. Signed-off-by: Martin Hoff <[email protected]>
1 parent 9fadff9 commit 34cfb4c

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2025 Silicon Laboratories Inc.
5+
*/
6+
7+
#include <dt-bindings/pinctrl/silabs/xg29-pinctrl.h>
8+
#include <dt-bindings/adc/silabs-adc.h>
9+
10+
/ {
11+
zephyr,user {
12+
io-channels = <&adc0 3>, <&adc0 4>, <&adc0 12>;
13+
};
14+
15+
aliases {
16+
adc0 = &adc0;
17+
};
18+
};
19+
20+
&pinctrl {
21+
adc0_default: adc0_default {
22+
group0 {
23+
/* Allocate odd bus 0 on GPIO port C/D to IADC for access to pin PD3 */
24+
silabs,analog-bus = <ABUS_CDODD0_IADC0>;
25+
};
26+
};
27+
};
28+
29+
&adc0 {
30+
pinctrl-0 = <&adc0_default>;
31+
pinctrl-names = "default";
32+
#address-cells = <1>;
33+
#size-cells = <0>;
34+
status = "okay";
35+
36+
channel@3 {
37+
reg = <3>;
38+
zephyr,gain = "ADC_GAIN_1";
39+
zephyr,reference = "ADC_REF_INTERNAL";
40+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
41+
zephyr,resolution = <12>;
42+
zephyr,input-positive = <IADC_INPUT_AVDD>;
43+
};
44+
45+
channel@4 {
46+
reg = <4>;
47+
zephyr,gain = "ADC_GAIN_1";
48+
zephyr,reference = "ADC_REF_VDD_1";
49+
zephyr,vref-mv = <3300>;
50+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
51+
zephyr,resolution = <12>;
52+
zephyr,input-positive = <IADC_INPUT_PD3>;
53+
};
54+
55+
channel@12 {
56+
reg = <12>;
57+
zephyr,gain = "ADC_GAIN_1";
58+
zephyr,reference = "ADC_REF_VDD_1";
59+
zephyr,vref-mv = <3300>;
60+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
61+
zephyr,resolution = <12>;
62+
zephyr,input-positive = <IADC_INPUT_PC3>;
63+
};
64+
};

samples/drivers/adc/adc_sequence/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tests:
2727
- s32k148_evb
2828
- frdm_mcxc242
2929
- stm32f3_disco
30+
- xg29_rb4412a
3031
integration_platforms:
3132
- nrf52840dk/nrf52840
3233
sample.drivers.adc.adc_sequence.8bit:

0 commit comments

Comments
 (0)