Skip to content

Commit 474f69c

Browse files
tests: adc: add configuration and overlay for DMA support on Silabs IADC
This commit introduces a new configuration file for DMA support specific to the Silabs IADC, along with updates to the test case YAML and device tree overlay for the xg29_rb4412a board. The changes ensure that the ADC driver can utilize DMA operations effectively. Signed-off-by: Martin Hoff <[email protected]>
1 parent 828ef07 commit 474f69c

File tree

9 files changed

+73
-0
lines changed

9 files changed

+73
-0
lines changed

tests/drivers/adc/adc_api/boards/bg29_rb4420a.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
status = "okay";
1717
#address-cells = <1>;
1818
#size-cells = <0>;
19+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
1920

2021
channel@0 {
2122
reg = <0>;
@@ -35,3 +36,7 @@
3536
zephyr,input-positive = <IADC_INPUT_VBAT>;
3637
};
3738
};
39+
40+
&dma0 {
41+
status = "okay";
42+
};

tests/drivers/adc/adc_api/boards/sltb010a.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
&adc0 {
2727
pinctrl-0 = <&adc0_default>;
2828
pinctrl-names = "default";
29+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
2930
#address-cells = <1>;
3031
#size-cells = <0>;
3132
status = "okay";
@@ -49,3 +50,7 @@
4950
zephyr,input-positive = <IADC_INPUT_PB3>;
5051
};
5152
};
53+
54+
&dma0 {
55+
status = "okay";
56+
};

tests/drivers/adc/adc_api/boards/slwrb4180a.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
&adc0 {
2525
pinctrl-0 = <&adc0_default>;
2626
pinctrl-names = "default";
27+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
2728
#address-cells = <1>;
2829
#size-cells = <0>;
2930
status = "okay";
@@ -47,3 +48,7 @@
4748
zephyr,input-positive = <IADC_INPUT_PD3>;
4849
};
4950
};
51+
52+
&dma0 {
53+
status = "okay";
54+
};

tests/drivers/adc/adc_api/boards/xg23_rb4210a.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
&adc0 {
2525
pinctrl-0 = <&adc0_default>;
2626
pinctrl-names = "default";
27+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
2728
#address-cells = <1>;
2829
#size-cells = <0>;
2930
status = "okay";
@@ -47,3 +48,7 @@
4748
zephyr,input-positive = <IADC_INPUT_PB3>;
4849
};
4950
};
51+
52+
&dma0 {
53+
status = "okay";
54+
};

tests/drivers/adc/adc_api/boards/xg24_rb4187c.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#address-cells = <1>;
1717
#size-cells = <0>;
1818
status = "okay";
19+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
1920

2021
channel@0 {
2122
reg = <0>;
@@ -35,3 +36,7 @@
3536
zephyr,input-positive = <IADC_INPUT_GND>;
3637
};
3738
};
39+
40+
&dma0 {
41+
status = "okay";
42+
};

tests/drivers/adc/adc_api/boards/xg27_dk2602a.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
&adc0 {
2525
pinctrl-0 = <&adc0_default>;
2626
pinctrl-names = "default";
27+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
2728
#address-cells = <1>;
2829
#size-cells = <0>;
2930
status = "okay";
@@ -47,3 +48,7 @@
4748
zephyr,input-positive = <IADC_INPUT_PB3>;
4849
};
4950
};
51+
52+
&dma0 {
53+
status = "okay";
54+
};

tests/drivers/adc/adc_api/boards/xg29_rb4412a.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
status = "okay";
1717
#address-cells = <1>;
1818
#size-cells = <0>;
19+
dmas = <&dma0 DMA_REQSEL_IADC0IADC_SCAN>;
1920

2021
channel@0 {
2122
reg = <0>;
@@ -35,3 +36,7 @@
3536
zephyr,input-positive = <IADC_INPUT_VBAT>;
3637
};
3738
};
39+
40+
&dma0 {
41+
status = "okay";
42+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2025 Silicon Laboratories Inc.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_TEST_USERSPACE=n
8+
CONFIG_DMA=y
9+
CONFIG_ADC_SILABS_IADC_DMA=y

tests/drivers/adc/adc_api/testcase.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,32 @@ tests:
8888
- dma
8989
platform_allow:
9090
- esp32s3_devkitc/esp32s3/procpu
91+
drivers.adc.dma_silabs:
92+
extra_args:
93+
- EXTRA_CONF_FILE="overlay-dma-silabs.conf"
94+
depends_on:
95+
- adc
96+
- dma
97+
platform_allow:
98+
- slwrb4180a
99+
- sltb010a
100+
- xg23_rb4210a
101+
- xg24_rb4187c
102+
- xg27_dk2602a
103+
- bg29_rb4420a
104+
- xg29_rb4412a
105+
drivers.adc.dma_silabs_async:
106+
extra_args:
107+
- EXTRA_CONF_FILE="overlay-dma-silabs.conf"
108+
- CONFIG_ADC_ASYNC=y
109+
depends_on:
110+
- adc
111+
- dma
112+
platform_allow:
113+
- slwrb4180a
114+
- sltb010a
115+
- xg23_rb4210a
116+
- xg24_rb4187c
117+
- xg27_dk2602a
118+
- bg29_rb4420a
119+
- xg29_rb4412a

0 commit comments

Comments
 (0)