Skip to content

Commit c78d8b2

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 e06a1eb commit c78d8b2

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
@@ -83,3 +83,32 @@ tests:
8383
- dma
8484
platform_allow:
8585
- esp32s3_devkitc/esp32s3/procpu
86+
drivers.adc.dma_silabs:
87+
extra_args:
88+
- EXTRA_CONF_FILE="overlay-dma-silabs.conf"
89+
depends_on:
90+
- adc
91+
- dma
92+
platform_allow:
93+
- slwrb4180a
94+
- sltb010a
95+
- xg23_rb4210a
96+
- xg24_rb4187c
97+
- xg27_dk2602a
98+
- bg29_rb4420a
99+
- xg29_rb4412a
100+
drivers.adc.dma_silabs_async:
101+
extra_args:
102+
- EXTRA_CONF_FILE="overlay-dma-silabs.conf"
103+
- CONFIG_ADC_ASYNC=y
104+
depends_on:
105+
- adc
106+
- dma
107+
platform_allow:
108+
- slwrb4180a
109+
- sltb010a
110+
- xg23_rb4210a
111+
- xg24_rb4187c
112+
- xg27_dk2602a
113+
- bg29_rb4420a
114+
- xg29_rb4412a

0 commit comments

Comments
 (0)