Skip to content

Commit f6883c4

Browse files
Raffael Rostagnokartben
Raffael Rostagno
authored andcommitted
boards: esp32c6_devkitc: Add i2s support and samples
Add default configs for i2s and onboard LED and i2s output samples. Signed-off-by: Raffael Rostagno <[email protected]>
1 parent d8c6376 commit f6883c4

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

boards/espressif/esp32c6_devkitc/esp32c6_devkitc_hpcore.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ supported:
1616
- counter
1717
- entropy
1818
- i2c
19+
- i2s
1920
testing:
2021
ignore_tags:
2122
- bluetooth
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
i2s-tx = &i2s;
10+
};
11+
};
12+
13+
&pinctrl {
14+
i2s_default: i2s_default {
15+
group1 {
16+
pinmux = <I2S_MCLK_GPIO6>,
17+
<I2S_O_WS_GPIO5>,
18+
<I2S_O_BCK_GPIO4>,
19+
<I2S_O_SD_GPIO3>;
20+
};
21+
group2 {
22+
pinmux = <I2S_I_SD_GPIO2>;
23+
};
24+
};
25+
};
26+
27+
&i2s {
28+
status = "okay";
29+
pinctrl-0 = <&i2s_default>;
30+
pinctrl-names = "default";
31+
32+
dmas = <&dma 3>;
33+
dma-names = "tx";
34+
};
35+
36+
&dma {
37+
status = "okay";
38+
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/led/led.h>
8+
9+
/ {
10+
aliases {
11+
led-strip = &led_strip;
12+
};
13+
};
14+
15+
&pinctrl {
16+
i2s_default: i2s_default {
17+
group1 {
18+
pinmux = <I2S_MCLK_GPIO6>,
19+
<I2S_O_WS_GPIO5>,
20+
<I2S_O_BCK_GPIO4>,
21+
<I2S_O_SD_GPIO8>;
22+
};
23+
group2 {
24+
pinmux = <I2S_I_SD_GPIO2>;
25+
};
26+
};
27+
};
28+
29+
i2s_led: &i2s {
30+
status = "okay";
31+
pinctrl-0 = <&i2s_default>;
32+
pinctrl-names = "default";
33+
34+
dmas = <&dma 3>;
35+
dma-names = "tx";
36+
37+
led_strip: ws2812@0 {
38+
compatible = "worldsemi,ws2812-i2s";
39+
40+
reg = <0>;
41+
chain-length = <1>;
42+
color-mapping = <LED_COLOR_ID_GREEN
43+
LED_COLOR_ID_RED
44+
LED_COLOR_ID_BLUE>;
45+
reset-delay = <500>;
46+
};
47+
};
48+
49+
&dma {
50+
status = "okay";
51+
};

0 commit comments

Comments
 (0)