1/*
2 * Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6/dts-v1/;
7
8#include <espressif/esp32s3/esp32s3_wroom_n16r8.dtsi>
9#include "ttgo_t8s3-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_0x0_amp.dtsi>
13
14/ {
15	model = "TTGO T8S3 PROCPU";
16	compatible = "espressif,esp32s3";
17
18	aliases {
19		i2c-0 = &i2c0;
20		watchdog0 = &wdt0;
21		sdhc0 = &sd0;
22		uart-0 = &uart0;
23		sw0 = &button0;
24	};
25
26	chosen {
27		zephyr,sram = &sram0;
28		/* console can be UART or USB CDC */
29		/* zephyr,console = &uart0; */
30		/* zephyr,shell-uart = &uart0; */
31		zephyr,console = &usb_serial;
32		zephyr,shell-uart = &usb_serial;
33		zephyr,flash = &flash0;
34		zephyr,code-partition = &slot0_partition;
35		zephyr,bt-hci = &esp32_bt_hci;
36	};
37
38	buttons {
39		compatible = "gpio-keys";
40		button0: button_0 {
41			gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
42			label = "BOOT Button";
43			zephyr,code = <INPUT_KEY_0>;
44		};
45	};
46};
47
48&uart0 {
49	status = "okay";
50	current-speed = <115200>;
51	pinctrl-0 = <&uart0_default>;
52	pinctrl-names = "default";
53};
54
55&gpio0 {
56	status = "okay";
57};
58
59&gpio1 {
60	status = "okay";
61};
62
63&touch {
64	debounce-interval-ms = <30>;
65	href-microvolt = <2700000>;
66	lref-microvolt = <500000>;
67	href-atten-microvolt = <1000000>;
68	filter-mode = <ESP32_TOUCH_FILTER_MODE_IIR_16>;
69	filter-debounce-cnt = <1>;
70	filter-noise-thr = <ESP32_TOUCH_FILTER_NOISE_THR_4_8TH>;
71	filter-jitter-step = <4>;
72	filter-smooth-level = <ESP32_TOUCH_FILTER_SMOOTH_MODE_IIR_2>;
73};
74
75&i2c0 {
76	clock-frequency = <I2C_BITRATE_STANDARD>;
77	pinctrl-0 = <&i2c0_default>;
78	pinctrl-names = "default";
79};
80
81&spi2 {
82	#address-cells = <1>;
83	#size-cells = <0>;
84	status = "okay";
85	pinctrl-0 = <&spim2_default>;
86	pinctrl-names = "default";
87	/* dma-enabled; TODO */
88	clock-frequency = <20000000>;
89	cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
90	sd0: sd@0 {
91		compatible = "zephyr,sdhc-spi-slot";
92		reg = <0>;
93		status = "okay";
94		spi-max-frequency = <20000000>;
95		mmc {
96			compatible = "zephyr,sdmmc-disk";
97			disk-name = "SD";
98			status = "okay";
99		};
100	};
101};
102
103&spi3 {
104	#address-cells = <1>;
105	#size-cells = <0>;
106	status = "okay";
107	pinctrl-0 = <&spim3_default>;
108	pinctrl-names = "default";
109};
110
111&twai {
112	pinctrl-0 = <&twai_default>;
113	pinctrl-names = "default";
114};
115
116&usb_serial {
117	status = "okay";
118};
119
120&timer0 {
121	status = "okay";
122};
123
124&timer1 {
125	status = "okay";
126};
127
128&timer2 {
129	status = "okay";
130};
131
132&timer3 {
133	status = "okay";
134};
135
136&wdt0 {
137	status = "okay";
138};
139
140&trng0 {
141	status = "okay";
142};
143
144&esp32_bt_hci {
145	status = "okay";
146};
147