1/*
2 * SPDX-License-Identifier: Apache-2.0
3 */
4/dts-v1/;
5
6#include <espressif/esp32/esp32_wroom_32ue_n16.dtsi>
7#include <zephyr/dt-bindings/led/led.h>
8#include "yd_esp32-pinctrl.dtsi"
9#include <zephyr/dt-bindings/input/input-event-codes.h>
10#include <espressif/partitions_0x1000_amp.dtsi>
11
12/ {
13	model = "VCC-GND Studio YD-ESP32 PROCPU";
14	compatible = "espressif,esp32";
15
16	aliases {
17		uart-0 = &uart0;
18		i2c-0 = &i2c0;
19		sw0 = &button0;
20		watchdog0 = &wdt0;
21		led-strip = &rgb_led;
22	};
23
24	buttons {
25		compatible = "gpio-keys";
26		button0: button_0 {
27			gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
28			label = "BOOT Button";
29			zephyr,code = <INPUT_KEY_0>;
30		};
31	};
32
33	chosen {
34		zephyr,sram = &sram1;
35		zephyr,console = &uart0;
36		zephyr,shell-uart = &uart0;
37		zephyr,flash = &flash0;
38		zephyr,code-partition = &slot0_partition;
39		zephyr,bt-hci = &esp32_bt_hci;
40	};
41};
42
43&pinctrl {
44	spim2_default: spim2_default {
45		group2 {
46			pinmux = <SPIM2_MOSI_GPIO16>;
47			output-low;
48		};
49	};
50};
51
52&uart0 {
53	status = "okay";
54	current-speed = <115200>;
55	pinctrl-0 = <&uart0_default>;
56	pinctrl-names = "default";
57};
58
59&uart1 {
60	current-speed = <115200>;
61	pinctrl-0 = <&uart1_default>;
62	pinctrl-names = "default";
63};
64
65&uart2 {
66	current-speed = <115200>;
67	pinctrl-0 = <&uart2_default>;
68	pinctrl-names = "default";
69};
70
71&gpio0 {
72	status = "okay";
73};
74
75&gpio1 {
76	status = "okay";
77};
78
79&i2c0 {
80	status = "okay";
81	clock-frequency = <I2C_BITRATE_STANDARD>;
82	sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>;
83	scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>;
84	pinctrl-0 = <&i2c0_default>;
85	pinctrl-names = "default";
86};
87
88&spi2 {
89	#address-cells = <1>;
90	#size-cells = <0>;
91	status = "okay";
92	pinctrl-0 = <&spim2_default>;
93	pinctrl-names = "default";
94
95	rgb_led: ws2812@0 {
96		compatible = "worldsemi,ws2812-spi";
97
98		/* SPI */
99		reg = <0>; /* ignored, but necessary for SPI bindings */
100		spi-max-frequency = <6400000>;
101
102		/* XL-5050RGBC-WS2812B */
103		chain-length = <1>;
104		spi-one-frame = <0xfc>; /* 11111100: 0.937 us high and 0.313 us low */
105		spi-zero-frame = <0xc0>; /* 11000000: 0.313 us high and 0.937 us low */
106		color-mapping = <LED_COLOR_ID_GREEN
107				 LED_COLOR_ID_RED
108				 LED_COLOR_ID_BLUE>;
109	};
110};
111
112&spi3 {
113	#address-cells = <1>;
114	#size-cells = <0>;
115	status = "okay";
116	pinctrl-0 = <&spim3_default>;
117	pinctrl-names = "default";
118};
119
120&timer0 {
121	status = "disabled";
122};
123
124&timer1 {
125	status = "disabled";
126};
127
128&timer2 {
129	status = "disabled";
130};
131
132&timer3 {
133	status = "disabled";
134};
135
136&trng0 {
137	status = "okay";
138};
139
140&esp32_bt_hci {
141	status = "okay";
142};
143