Skip to content

Commit 1c02aa2

Browse files
committed
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 de8ef6d commit 1c02aa2

40 files changed

+422
-11
lines changed

boards/espressif/esp32_devkitc_wroom/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Current Zephyr's ESP32-DevKitC-WROOM board supports the following features:
7777
+------------+------------+-------------------------------------+
7878
| PCNT | on-chip | qdec |
7979
+------------+------------+-------------------------------------+
80+
| I2S | on-chip | i2s |
81+
+------------+------------+-------------------------------------+
8082
| SPI DMA | on-chip | spi |
8183
+------------+------------+-------------------------------------+
8284
| TWAI | on-chip | can |

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/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Current Zephyr's ESP32-DevKitC-WROVER board supports the following features:
7777
+------------+------------+-------------------------------------+
7878
| PCNT | on-chip | qdec |
7979
+------------+------------+-------------------------------------+
80+
| I2S | on-chip | i2s |
81+
+------------+------------+-------------------------------------+
8082
| SPI DMA | on-chip | spi |
8183
+------------+------------+-------------------------------------+
8284
| TWAI | on-chip | can |

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>;

0 commit comments

Comments
 (0)