1/* 2 * Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8 9#include <espressif/esp32s2/esp32s2_solo_n4r2.dtsi> 10#include "esp32s2_devkitc-pinctrl.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12#include <zephyr/dt-bindings/input/esp32-touch-sensor-input.h> 13 14/ { 15 model = "Espressif ESP32S2_DevKitC"; 16 compatible = "espressif,esp32s2"; 17 18 aliases { 19 sw0 = &user_button; 20 i2c-0 = &i2c0; 21 watchdog0 = &wdt0; 22 }; 23 24 chosen { 25 zephyr,sram = &sram0; 26 zephyr,console = &uart0; 27 zephyr,shell-uart = &uart0; 28 zephyr,flash = &flash0; 29 zephyr,code-partition = &slot0_partition; 30 }; 31 32 gpio_keys { 33 compatible = "gpio-keys"; 34 user_button: user_button { 35 label = "BOOT"; 36 gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 37 zephyr,code = <INPUT_KEY_0>; 38 }; 39 }; 40}; 41 42&uart0 { 43 status = "okay"; 44 current-speed = <115200>; 45 pinctrl-0 = <&uart0_default>; 46 pinctrl-names = "default"; 47}; 48 49&gpio0 { 50 status = "okay"; 51}; 52 53&gpio1 { 54 status = "okay"; 55}; 56 57&touch { 58 debounce-interval-ms = <30>; 59 href-microvolt = <2700000>; 60 lref-microvolt = <500000>; 61 href-atten-microvolt = <1000000>; 62 filter-mode = <ESP32_TOUCH_FILTER_MODE_IIR_16>; 63 filter-debounce-cnt = <1>; 64 filter-noise-thr = <ESP32_TOUCH_FILTER_NOISE_THR_4_8TH>; 65 filter-jitter-step = <4>; 66 filter-smooth-level = <ESP32_TOUCH_FILTER_SMOOTH_MODE_IIR_2>; 67}; 68 69&timer0 { 70 status = "disabled"; 71}; 72 73&timer1 { 74 status = "disabled"; 75}; 76 77&timer2 { 78 status = "disabled"; 79}; 80 81&timer3 { 82 status = "disabled"; 83}; 84 85&i2c0 { 86 status = "okay"; 87 clock-frequency = <I2C_BITRATE_STANDARD>; 88 pinctrl-0 = <&i2c0_default>; 89 pinctrl-names = "default"; 90}; 91 92&i2c1 { 93 clock-frequency = <I2C_BITRATE_STANDARD>; 94 pinctrl-0 = <&i2c1_default>; 95 pinctrl-names = "default"; 96}; 97 98&trng0 { 99 status = "okay"; 100}; 101 102&spi2 { 103 #address-cells = <1>; 104 #size-cells = <0>; 105 status = "okay"; 106 pinctrl-0 = <&spim2_default>; 107 pinctrl-names = "default"; 108}; 109 110&spi3 { 111 #address-cells = <1>; 112 #size-cells = <0>; 113 status = "okay"; 114 pinctrl-0 = <&spim3_default>; 115 pinctrl-names = "default"; 116}; 117 118 119&flash0 { 120 status = "okay"; 121 122 partitions { 123 compatible = "fixed-partitions"; 124 #address-cells = <1>; 125 #size-cells = <1>; 126 127 /* Reserve 60kB for the bootloader */ 128 boot_partition: partition@1000 { 129 label = "mcuboot"; 130 reg = <0x00001000 0x0000F000>; 131 read-only; 132 }; 133 134 /* Reserve 1024kB for the application in slot 0 */ 135 slot0_partition: partition@10000 { 136 label = "image-0"; 137 reg = <0x00010000 0x00100000>; 138 }; 139 140 /* Reserve 1024kB for the application in slot 1 */ 141 slot1_partition: partition@110000 { 142 label = "image-1"; 143 reg = <0x00110000 0x00100000>; 144 }; 145 146 /* Reserve 256kB for the scratch partition */ 147 scratch_partition: partition@210000 { 148 label = "image-scratch"; 149 reg = <0x00210000 0x00040000>; 150 }; 151 152 storage_partition: partition@250000 { 153 label = "storage"; 154 reg = <0x00250000 0x00006000>; 155 }; 156 }; 157}; 158 159&wdt0 { 160 status = "okay"; 161}; 162 163&dac { 164 status = "okay"; 165}; 166