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.
177 lines
3.3 KiB
177 lines
3.3 KiB
/* |
|
* Copyright (c) 2024 Lothar Felten <lothar.felten@gmail.com> |
|
* |
|
* SPDX-License-Identifier: Apache-2.0 |
|
*/ |
|
/dts-v1/; |
|
|
|
#include <espressif/esp32/esp32_pico_d4.dtsi> |
|
#include "ttgo_tbeam-pinctrl.dtsi" |
|
#include <zephyr/dt-bindings/input/input-event-codes.h> |
|
#include <espressif/partitions_0x1000_amp.dtsi> |
|
|
|
/ { |
|
model = "TTGO TBeam PROCPU"; |
|
compatible = "lilygo,ttgo-tbeam"; |
|
|
|
aliases { |
|
led0 = &red_led; |
|
uart-0 = &uart0; |
|
i2c-0 = &i2c0; |
|
watchdog0 = &wdt0; |
|
lora0 = &lora0; |
|
gnss = &gnss; |
|
regulator0 = &axp2101; |
|
}; |
|
|
|
chosen { |
|
zephyr,sram = &sram1; |
|
zephyr,console = &uart0; |
|
zephyr,shell-uart = &uart0; |
|
zephyr,flash = &flash0; |
|
zephyr,code-partition = &slot0_partition; |
|
zephyr,display = &ssd1306_128x64; |
|
}; |
|
|
|
leds { |
|
compatible = "gpio-leds"; |
|
|
|
red_led: led_0 { |
|
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; |
|
label = "Red - LED0"; |
|
}; |
|
}; |
|
}; |
|
|
|
&uart0 { |
|
status = "okay"; |
|
current-speed = <115200>; |
|
pinctrl-0 = <&uart0_default>; |
|
pinctrl-names = "default"; |
|
}; |
|
|
|
&uart1 { |
|
status = "okay"; |
|
current-speed = <9600>; |
|
pinctrl-0 = <&uart1_default>; |
|
pinctrl-names = "default"; |
|
|
|
gnss: gnss-nmea-generic { |
|
compatible = "gnss-nmea-generic"; |
|
}; |
|
}; |
|
|
|
&gpio0 { |
|
status = "okay"; |
|
}; |
|
|
|
&gpio1 { |
|
status = "okay"; |
|
}; |
|
|
|
&i2c0 { |
|
status = "okay"; |
|
clock-frequency = <I2C_BITRATE_STANDARD>; |
|
sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>; |
|
scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>; |
|
pinctrl-0 = <&i2c0_default>; |
|
pinctrl-names = "default"; |
|
|
|
ssd1306_128x64: ssd1306@3c { |
|
compatible = "solomon,ssd1306fb"; |
|
reg = <0x3c>; |
|
width = <128>; |
|
height = <64>; |
|
segment-offset = <0>; |
|
page-offset = <0>; |
|
display-offset = <0>; |
|
multiplex-ratio = <63>; |
|
segment-remap; |
|
com-invdir; |
|
prechargep = <0x22>; |
|
}; |
|
|
|
axp2101: axp2101@34 { |
|
status = "okay"; |
|
reg = <0x34>; |
|
compatible = "x-powers,axp2101"; |
|
regulator { |
|
compatible = "x-powers,axp2101-regulator"; |
|
|
|
vdd_mcu: DCDC1 { |
|
regulator-min-microvolt = <3200000>; |
|
regulator-max-microvolt = <3300000>; |
|
regulator-boot-on; |
|
regulator-always-on; |
|
}; |
|
|
|
vdd_lora: ALDO2 { |
|
regulator-min-microvolt = <2900000>; |
|
regulator-max-microvolt = <3000000>; |
|
regulator-boot-on; |
|
regulator-always-on; |
|
}; |
|
|
|
vdd_gnss: ALDO3 { |
|
regulator-min-microvolt = <2700000>; |
|
regulator-max-microvolt = <2800000>; |
|
regulator-boot-on; |
|
}; |
|
}; |
|
|
|
charger: charger { |
|
compatible = "x-powers,axp2101-charger"; |
|
charge-term-current-microamp = <25000>; |
|
constant-charge-current-max-microamp = <1000000>; |
|
constant-charge-voltage-max-microvolt = <4200000>; |
|
}; |
|
|
|
fuel_gauge: fuel_gauge { |
|
compatible = "x-powers,axp2101-fuel-gauge"; |
|
}; |
|
}; |
|
}; |
|
|
|
&spi3 { |
|
#address-cells = <1>; |
|
#size-cells = <0>; |
|
status = "okay"; |
|
pinctrl-0 = <&spim3_default>; |
|
pinctrl-names = "default"; |
|
cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; |
|
|
|
lora0: lora@0 { |
|
compatible = "semtech,sx1276"; |
|
reg = <0>; |
|
reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; |
|
dio-gpios = |
|
/* SX1276 D0 -> GPIO26 */ |
|
<&gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, |
|
/* SX1276 D1 -> GPIO33 */ |
|
<&gpio1 1 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, |
|
/* SX1276 D2 -> GPIO32 */ |
|
<&gpio1 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; |
|
spi-max-frequency = <1000000>; |
|
power-amplifier-output = "pa-boost"; |
|
}; |
|
}; |
|
|
|
&timer0 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer1 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer2 { |
|
status = "okay"; |
|
}; |
|
|
|
&timer3 { |
|
status = "okay"; |
|
}; |
|
|
|
&trng0 { |
|
status = "okay"; |
|
};
|
|
|