You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
162 lines
2.9 KiB
162 lines
2.9 KiB
/* |
|
* Copyright (c) 2025 Philipp Steiner <philipp.steiner@gmail.com> |
|
* |
|
* SPDX-License-Identifier: Apache-2.0 |
|
*/ |
|
|
|
/dts-v1/; |
|
|
|
#include <espressif/esp32s2/esp32s2.dtsi> |
|
#include <espressif/esp32s2/esp32s2_wroom.dtsi> |
|
#include "adafruit_feather_esp32s2-pinctrl.dtsi" |
|
#include <espressif/partitions_0x1000_default.dtsi> |
|
#include <zephyr/dt-bindings/input/input-event-codes.h> |
|
#include <dt-bindings/led/led.h> |
|
#include <dt-bindings/led/worldsemi_ws2812c.h> |
|
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> |
|
|
|
/ { |
|
compatible = "espressif,esp32s2"; |
|
|
|
chosen { |
|
zephyr,sram = &sram1; |
|
/* |
|
* uart1 is used as the default uart for zephyr,console and zephyr,shell, |
|
* because USB-OTG is until now not supported and USB-CDC is not available |
|
* for ESP32-S2. |
|
* See issue #29394 - ESP32 development overview |
|
* To use uart1 a FTDI-USB-RS232 or similar needs to be connected to the RX/TX pins. |
|
* See feather_connector.dtsi |
|
*/ |
|
zephyr,console = &uart1; |
|
zephyr,shell-uart = &uart1; |
|
zephyr,flash = &flash0; |
|
zephyr,code-partition = &slot0_partition; |
|
}; |
|
|
|
aliases { |
|
led0 = &led0; |
|
i2c-0 = &i2c0; |
|
sw0 = &user_button; |
|
led-strip = &led_strip; |
|
watchdog0 = &wdt0; |
|
}; |
|
|
|
leds { |
|
compatible = "gpio-leds"; |
|
status = "okay"; |
|
|
|
led0: led_0 { |
|
label = "Red-LED"; |
|
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
|
}; |
|
}; |
|
|
|
gpio_keys { |
|
compatible = "gpio-keys"; |
|
status = "okay"; |
|
|
|
user_button: user_button { |
|
label = "BOOT Button"; |
|
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; |
|
zephyr,code = <INPUT_KEY_0>; |
|
}; |
|
}; |
|
}; |
|
|
|
&uart0 { |
|
status = "okay"; |
|
current-speed = <115200>; |
|
pinctrl-0 = <&uart0_default>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&uart1 { |
|
status = "okay"; |
|
current-speed = <115200>; |
|
pinctrl-0 = <&uart1_default>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&gpio0 { |
|
status = "okay"; |
|
|
|
neopixel_power_enable { |
|
gpio-hog; |
|
gpios = <21 GPIO_ACTIVE_HIGH>; |
|
output-high; |
|
}; |
|
}; |
|
|
|
&gpio1 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer0 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer1 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer2 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer3 { |
|
status = "okay"; |
|
}; |
|
|
|
&i2c0 { |
|
status = "okay"; |
|
clock-frequency = <I2C_BITRATE_STANDARD>; |
|
pinctrl-0 = <&i2c0_default>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&trng0 { |
|
status = "okay"; |
|
}; |
|
|
|
&spi2 { |
|
#address-cells = <1>; |
|
#size-cells = <0>; |
|
status = "okay"; |
|
pinctrl-0 = <&spim2_default>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&spi3 { |
|
#address-cells = <1>; |
|
#size-cells = <0>; |
|
status = "okay"; |
|
pinctrl-0 = <&spim3_ws2812_led>; |
|
pinctrl-names = "default"; |
|
|
|
line-idle-low; |
|
|
|
led_strip: ws2812@0 { |
|
compatible = "worldsemi,ws2812-spi"; |
|
|
|
/* WS2812 */ |
|
reg = <0>; |
|
spi-max-frequency = <6400000>; |
|
chain-length = <1>; |
|
spi-cpha; |
|
spi-one-frame = <WS2812C_ONE_FRAME>; /* 11110000: 625ns high and 625ns low */ |
|
spi-zero-frame = <WS2812C_ZERO_FRAME>; /* 11000000: 312.5ns high and 937.5ns low */ |
|
color-mapping = <LED_COLOR_ID_GREEN>, |
|
<LED_COLOR_ID_RED>, |
|
<LED_COLOR_ID_BLUE>; |
|
}; |
|
}; |
|
|
|
&twai { |
|
pinctrl-0 = <&twai_default>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&wdt0 { |
|
status = "okay"; |
|
};
|
|
|