Skip to content

Commit 3dced68

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 ba2c1ac commit 3dced68

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
@@ -89,3 +89,32 @@ tests:
8989
- dma
9090
platform_allow:
9191
- esp32s3_devkitc/esp32s3/procpu
92+
drivers.adc.dma_silabs:
93+
extra_args:
94+
- EXTRA_CONF_FILE="overlay-dma-silabs.conf"
95+
depends_on:
96+
- adc
97+
- dma
98+
platform_allow:
99+
- slwrb4180a
100+
- sltb010a
101+
- xg23_rb4210a
102+
- xg24_rb4187c
103+
- xg27_dk2602a
104+
- bg29_rb4420a
105+
- xg29_rb4412a
106+
drivers.adc.dma_silabs_async:
107+
extra_args:
108+
- EXTRA_CONF_FILE="overlay-dma-silabs.conf"
109+
- CONFIG_ADC_ASYNC=y
110+
depends_on:
111+
- adc
112+
- dma
113+
platform_allow:
114+
- slwrb4180a
115+
- sltb010a
116+
- xg23_rb4210a
117+
- xg24_rb4187c
118+
- xg27_dk2602a
119+
- bg29_rb4420a
120+
- xg29_rb4412a

0 commit comments

Comments
 (0)