1/*
2 * Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6/dts-v1/;
7
8#include <espressif/esp32/esp32_wrover_e_n4r8.dtsi>
9#include "esp32_devkitc_wrover-pinctrl.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11#include <zephyr/dt-bindings/input/esp32-touch-sensor-input.h>
12#include <espressif/partitions_0x1000_amp.dtsi>
13
14/ {
15	model = "Espressif ESP32-DevkitC WROVER-E PROCPU";
16	compatible = "espressif,esp32";
17
18	aliases {
19		uart-0 = &uart0;
20		i2c-0 = &i2c0;
21		sw0 = &button0;
22		watchdog0 = &wdt0;
23	};
24
25	buttons {
26		compatible = "gpio-keys";
27		button0: button_0 {
28			gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
29			label = "BOOT Button";
30			zephyr,code = <INPUT_KEY_0>;
31		};
32	};
33
34	chosen {
35		zephyr,sram = &sram1;
36		zephyr,console = &uart0;
37		zephyr,shell-uart = &uart0;
38		zephyr,flash = &flash0;
39		zephyr,code-partition = &slot0_partition;
40		zephyr,bt-hci = &esp32_bt_hci;
41	};
42};
43
44&uart0 {
45	status = "okay";
46	current-speed = <115200>;
47	pinctrl-0 = <&uart0_default>;
48	pinctrl-names = "default";
49};
50
51&uart1 {
52	current-speed = <115200>;
53	pinctrl-0 = <&uart1_default>;
54	pinctrl-names = "default";
55};
56
57&uart2 {
58	current-speed = <115200>;
59	pinctrl-0 = <&uart2_default>;
60	pinctrl-names = "default";
61};
62
63&gpio0 {
64	status = "okay";
65};
66
67&gpio1 {
68	status = "okay";
69};
70
71&touch {
72	debounce-interval-ms = <30>;
73	href-microvolt = <2700000>;
74	lref-microvolt = <500000>;
75	href-atten-microvolt = <1000000>;
76	filter-mode = <ESP32_TOUCH_FILTER_MODE_IIR_16>;
77	filter-debounce-cnt = <1>;
78	filter-noise-thr = <ESP32_TOUCH_FILTER_NOISE_THR_4_8TH>;
79	filter-jitter-step = <4>;
80	filter-smooth-level = <ESP32_TOUCH_FILTER_SMOOTH_MODE_IIR_2>;
81};
82
83&i2c0 {
84	status = "okay";
85	clock-frequency = <I2C_BITRATE_STANDARD>;
86	sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>;
87	scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>;
88	pinctrl-0 = <&i2c0_default>;
89	pinctrl-names = "default";
90};
91
92&spi2 {
93	#address-cells = <1>;
94	#size-cells = <0>;
95	status = "okay";
96	pinctrl-0 = <&spim2_default>;
97	pinctrl-names = "default";
98};
99
100&spi3 {
101	#address-cells = <1>;
102	#size-cells = <0>;
103	status = "okay";
104	pinctrl-0 = <&spim3_default>;
105	pinctrl-names = "default";
106};
107
108&timer0 {
109	status = "disabled";
110};
111
112&timer1 {
113	status = "disabled";
114};
115
116&timer2 {
117	status = "disabled";
118};
119
120&timer3 {
121	status = "disabled";
122};
123
124&trng0 {
125	status = "okay";
126};
127
128&esp32_bt_hci {
129	status = "okay";
130};
131