Skip to content

Commit a4a2bb2

Browse files
wmrsouzakartben
authored andcommitted
boards: esp32: add i2s for non-gdma SoC boards
Adds i2s support for boards based on: - esp32 - esp32s2 Signed-off-by: Marcio Ribeiro <[email protected]>
1 parent c01489d commit a4a2bb2

15 files changed

+182
-10
lines changed

boards/espressif/esp32_devkitc_wroom/esp32_devkitc_wroom-pinctrl.dtsi

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2022-2025 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -74,5 +74,35 @@
7474
output-high;
7575
};
7676
};
77+
78+
i2s0_default: i2s0_default {
79+
group1 {
80+
pinmux = <I2S0_O_WS_GPIO5>,
81+
<I2S0_O_BCK_GPIO6>,
82+
<I2S0_O_SD_GPIO7>,
83+
<I2S0_I_WS_GPIO15>,
84+
<I2S0_I_BCK_GPIO16>;
85+
output-enable;
86+
};
87+
group2 {
88+
pinmux = <I2S0_I_SD_GPIO17>;
89+
input-enable;
90+
};
91+
};
92+
93+
i2s1_default: i2s1_default {
94+
group1 {
95+
pinmux = <I2S1_O_WS_GPIO8>,
96+
<I2S1_O_BCK_GPIO3>,
97+
<I2S1_O_SD_GPIO9>,
98+
<I2S1_I_WS_GPIO10>,
99+
<I2S1_I_BCK_GPIO11>;
100+
output-enable;
101+
};
102+
group2 {
103+
pinmux = <I2S1_I_SD_GPIO12>;
104+
input-enable;
105+
};
106+
};
77107
};
78108

boards/espressif/esp32_devkitc_wroom/esp32_devkitc_wroom_procpu.dts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2023-2025 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -89,6 +89,18 @@
8989
pinctrl-names = "default";
9090
};
9191

92+
&i2s0 {
93+
pinctrl-0 = <&i2s0_default>;
94+
pinctrl-names = "default";
95+
status = "disabled";
96+
};
97+
98+
&i2s1 {
99+
pinctrl-0 = <&i2s1_default>;
100+
pinctrl-names = "default";
101+
status = "disabled";
102+
};
103+
92104
&spi2 {
93105
#address-cells = <1>;
94106
#size-cells = <0>;

boards/espressif/esp32_devkitc_wroom/esp32_devkitc_wroom_procpu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ supported:
99
- dac
1010
- gpio
1111
- i2c
12+
- i2s
1213
- watchdog
1314
- uart
1415
- nvs

boards/espressif/esp32_devkitc_wrover/esp32_devkitc_wrover-pinctrl.dtsi

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2022-2025 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -74,4 +74,34 @@
7474
output-high;
7575
};
7676
};
77+
78+
i2s0_default: i2s0_default {
79+
group1 {
80+
pinmux = <I2S0_O_WS_GPIO5>,
81+
<I2S0_O_BCK_GPIO6>,
82+
<I2S0_O_SD_GPIO7>,
83+
<I2S0_I_WS_GPIO15>,
84+
<I2S0_I_BCK_GPIO16>;
85+
output-enable;
86+
};
87+
group2 {
88+
pinmux = <I2S0_I_SD_GPIO17>;
89+
input-enable;
90+
};
91+
};
92+
93+
i2s1_default: i2s1_default {
94+
group1 {
95+
pinmux = <I2S1_O_WS_GPIO8>,
96+
<I2S1_O_BCK_GPIO3>,
97+
<I2S1_O_SD_GPIO9>,
98+
<I2S1_I_WS_GPIO10>,
99+
<I2S1_I_BCK_GPIO11>;
100+
output-enable;
101+
};
102+
group2 {
103+
pinmux = <I2S1_I_SD_GPIO12>;
104+
input-enable;
105+
};
106+
};
77107
};

boards/espressif/esp32_devkitc_wrover/esp32_devkitc_wrover_procpu.dts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2023-2025 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -89,6 +89,18 @@
8989
pinctrl-names = "default";
9090
};
9191

92+
&i2s0 {
93+
pinctrl-0 = <&i2s0_default>;
94+
pinctrl-names = "default";
95+
status = "disabled";
96+
};
97+
98+
&i2s1 {
99+
pinctrl-0 = <&i2s1_default>;
100+
pinctrl-names = "default";
101+
status = "disabled";
102+
};
103+
92104
&spi2 {
93105
#address-cells = <1>;
94106
#size-cells = <0>;

boards/espressif/esp32_devkitc_wrover/esp32_devkitc_wrover_procpu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ supported:
99
- dac
1010
- gpio
1111
- i2c
12+
- i2s
1213
- watchdog
1314
- uart
1415
- nvs

boards/espressif/esp32_ethernet_kit/esp32_ethernet_kit-pinctrl.dtsi

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Grant Ramsay <[email protected]>
2+
* Copyright (c) 2022-2025 Grant Ramsay <[email protected]>
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -40,4 +40,33 @@
4040
};
4141
};
4242

43+
i2s0_default: i2s0_default {
44+
group1 {
45+
pinmux = <I2S0_O_WS_GPIO5>,
46+
<I2S0_O_BCK_GPIO6>,
47+
<I2S0_O_SD_GPIO7>,
48+
<I2S0_I_WS_GPIO15>,
49+
<I2S0_I_BCK_GPIO16>;
50+
output-enable;
51+
};
52+
group2 {
53+
pinmux = <I2S0_I_SD_GPIO17>;
54+
input-enable;
55+
};
56+
};
57+
58+
i2s1_default: i2s1_default {
59+
group1 {
60+
pinmux = <I2S1_O_WS_GPIO8>,
61+
<I2S1_O_BCK_GPIO3>,
62+
<I2S1_O_SD_GPIO9>,
63+
<I2S1_I_WS_GPIO10>,
64+
<I2S1_I_BCK_GPIO11>;
65+
output-enable;
66+
};
67+
group2 {
68+
pinmux = <I2S1_I_SD_GPIO12>;
69+
input-enable;
70+
};
71+
};
4372
};

boards/espressif/esp32_ethernet_kit/esp32_ethernet_kit_procpu.dts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Grant Ramsay <[email protected]>
2+
* Copyright (c) 2022-2025 Grant Ramsay <[email protected]>
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -43,6 +43,18 @@
4343
status = "okay";
4444
};
4545

46+
&i2s0 {
47+
pinctrl-0 = <&i2s0_default>;
48+
pinctrl-names = "default";
49+
status = "disabled";
50+
};
51+
52+
&i2s1 {
53+
pinctrl-0 = <&i2s1_default>;
54+
pinctrl-names = "default";
55+
status = "disabled";
56+
};
57+
4658
&spi2 {
4759
#address-cells = <1>;
4860
#size-cells = <0>;

boards/espressif/esp32_ethernet_kit/esp32_ethernet_kit_procpu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ supported:
1010
- uart
1111
- nvs
1212
- pwm
13+
- i2s
1314
vendor: espressif

boards/espressif/esp32s2_devkitc/esp32s2_devkitc-pinctrl.dtsi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2+
* Copyright (c) 2024-2025 Espressif Systems (Shanghai) Co., Ltd.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -65,4 +65,19 @@
6565
};
6666
};
6767

68+
i2s0_default: i2s0_default {
69+
group1 {
70+
pinmux = <I2S0_MCLK_GPIO4>,
71+
<I2S0_O_WS_GPIO5>,
72+
<I2S0_O_BCK_GPIO6>,
73+
<I2S0_O_SD_GPIO7>,
74+
<I2S0_I_WS_GPIO15>,
75+
<I2S0_I_BCK_GPIO16>;
76+
output-enable;
77+
};
78+
group2 {
79+
pinmux = <I2S0_I_SD_GPIO17>;
80+
input-enable;
81+
};
82+
};
6883
};

0 commit comments

Comments
 (0)