blob: 9a23a008c2f245373d834716f740b6ddd26aaffe [file] [log] [blame]
/*
* Copyright (c) 2021 Instituto de Pesquisas Eldorado (eldorado.org.br)
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
* Copyright (c) 2023 The Zephyr Project Contributors
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <espressif/esp32s3/esp32s3_fn8.dtsi>
#include "heltec_wireless_stick_lite_v3-pinctrl.dtsi"
#include <zephyr/dt-bindings/pwm/pwm.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/lora/sx126x.h>
/ {
model = "heltec_wireless_stick_lite_v3";
compatible = "espressif,esp32s3";
aliases {
pwm-0 = &ledc0;
pwm-led0 = &pwm_led_white;
uart-0 = &uart0;
uart-1 = &uart1;
i2c-0 = &i2c0;
lora0 = &lora0;
sw0 = &button0;
watchdog0 = &wdt0;
};
leds {
compatible = "gpio-leds";
vext: vext {
gpios = <&gpio0 36 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Vext Control";
};
adc: adc {
gpios = <&gpio0 37 GPIO_ACTIVE_LOW>;
label = "ADC Control";
};
};
pwmleds {
compatible = "pwm-leds";
pwm_led_white: pwm_led_gpio0_35 {
label = "White PWM LED";
pwms = <&ledc0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "USER SW";
zephyr,code = <INPUT_KEY_0>;
};
};
vbatt {
compatible = "voltage-divider";
io-channels = <&adc1 0>;
output-ohms = <100000>;
full-ohms = <(100000 + 390000)>;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&adc1 {
status ="okay";
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&ledc0 {
pinctrl-0 = <&ledc0_default>;
pinctrl-names = "default";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel0@0 {
reg = <0x0>;
timer = <0>;
};
};
&i2c0 {
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&spi2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim2_default>;
pinctrl-names = "default";
lora0: lora@0 {
compatible = "semtech,sx1262";
reg = <0>;
reset-gpios = <&gpio0 12 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
busy-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
dio1-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
dio2-tx-enable;
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V8>;
tcxo-power-startup-delay-ms = <5>;
spi-max-frequency = <16000000>;
};
};
&twai {
pinctrl-0 = <&twai_default>;
pinctrl-names = "default";
bus-speed = <125000>;
};
&timer0 {
status = "okay";
};
&timer1 {
status = "okay";
};
&timer2 {
status = "okay";
};
&timer3 {
status = "okay";
};
&wdt0 {
status = "okay";
};
&trng0 {
status = "okay";
};
&uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
&flash0 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserve 64kB for the bootloader */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00010000>;
read-only;
};
/* Reserve 1024kB for the application in slot 0 */
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00100000>;
};
/* Reserve 1024kB for the application in slot 1 */
slot1_partition: partition@110000 {
label = "image-1";
reg = <0x00110000 0x00100000>;
};
/* Reserve 256kB for the scratch partition */
scratch_partition: partition@210000 {
label = "image-scratch";
reg = <0x00210000 0x00040000>;
};
storage_partition: partition@250000 {
label = "storage";
reg = <0x00250000 0x00006000>;
};
};
};