Skip to content

Commit c2235a7

Browse files
wmrsouzakartben
authored andcommitted
samples: i2s: add esp32 board overlay files
Adds esp32 board overlay files to i2s samples Signed-off-by: Marcio Ribeiro <[email protected]>
1 parent a4a2bb2 commit c2235a7

File tree

5 files changed

+128
-0
lines changed

5 files changed

+128
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&i2s0_default {
8+
group1 {
9+
pinmux = <I2S0_O_WS_GPIO33>,
10+
<I2S0_O_BCK_GPIO32>,
11+
<I2S0_O_SD_GPIO27>,
12+
<I2S0_I_WS_GPIO26>,
13+
<I2S0_I_BCK_GPIO25>;
14+
output-enable;
15+
};
16+
group2 {
17+
pinmux = <I2S0_I_SD_GPIO18>;
18+
input-enable;
19+
};
20+
};
21+
22+
i2s_rxtx: &i2s0 {
23+
status = "okay";
24+
25+
interrupts = <I2S0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
26+
<I2S0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
27+
interrupt-names = "tx", "rx";
28+
29+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&i2s0_default {
8+
group1 {
9+
pinmux = <I2S0_O_WS_GPIO17>,
10+
<I2S0_O_BCK_GPIO16>,
11+
<I2S0_O_SD_GPIO15>,
12+
<I2S0_I_WS_GPIO11>,
13+
<I2S0_I_BCK_GPIO10>;
14+
output-enable;
15+
};
16+
group2 {
17+
pinmux = <I2S0_I_SD_GPIO18>;
18+
input-enable;
19+
};
20+
};
21+
22+
i2s_rxtx: &i2s0 {
23+
status = "okay";
24+
25+
interrupts = <I2S0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>,
26+
<I2S0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
27+
interrupt-names = "tx", "rx";
28+
29+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 = &i2s0;
10+
};
11+
};
12+
13+
&i2s0_default {
14+
group1 {
15+
pinmux = <I2S0_O_WS_GPIO33>,
16+
<I2S0_O_BCK_GPIO32>,
17+
<I2S0_O_SD_GPIO27>;
18+
output-enable;
19+
};
20+
group2 {
21+
pinmux = <I2S0_I_SD_GPIO18>;
22+
input-enable;
23+
};
24+
};
25+
26+
&i2s0 {
27+
status = "okay";
28+
29+
interrupts = <I2S0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
30+
interrupt-names = "tx";
31+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_I2S=y
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+
#include <zephyr/dt-bindings/led/led.h>
8+
9+
/ {
10+
aliases {
11+
led-strip = &led_strip;
12+
};
13+
};
14+
15+
&i2s0_default {
16+
group1 {
17+
pinmux = <I2S0_O_SD_GPIO18>;
18+
output-enable;
19+
};
20+
};
21+
22+
i2s_led: &i2s0 {
23+
status = "okay";
24+
25+
interrupts = <I2S0_INTR_SOURCE IRQ_DEFAULT_PRIORITY 0>;
26+
interrupt-names = "tx";
27+
28+
led_strip: ws2812@0 {
29+
compatible = "worldsemi,ws2812-i2s";
30+
reg = <0>;
31+
32+
chain-length = <1>;
33+
color-mapping = <LED_COLOR_ID_GREEN
34+
LED_COLOR_ID_RED
35+
LED_COLOR_ID_BLUE>;
36+
reset-delay = <500>;
37+
};
38+
};

0 commit comments

Comments
 (0)