blob: de020fcfded598db9c7008226d5e6489ceaa4866 [file] [log] [blame] [edit]
/*
* 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_lora32-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <espressif/partitions_0x1000_amp.dtsi>
/ {
model = "ttgo LoRa32 PROCPU";
compatible = "lilygo,ttgo-lora32";
aliases {
led0 = &green_led;
uart-0 = &uart0;
i2c-0 = &i2c0;
watchdog0 = &wdt0;
lora0 = &lora0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,display = &ssd1306_128x64;
};
leds {
compatible = "gpio-leds";
green_led: led_0 {
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
label = "Green - LED0";
};
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
/* OLED display */
&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>;
};
};
&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 -> GPIO35 */
<&gpio1 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
/* SX1276 D1 -> GPIO34 */
<&gpio1 2 (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";
};
&sdhc {
sdhc1: sdhc@1 {
status = "okay";
pinctrl-0 = <&sdhc0_default>;
pinctrl-names = "default";
power-delay-ms = <100>;
max-bus-freq = <52000000>;
bus-width = <4>;
clk-pin = <14>;
cmd-pin = <15>;
d0-pin = <2>;
d1-pin = <4>;
d2-pin = <12>;
d3-pin = <13>;
mmc {
compatible = "zephyr,sdmmc-disk";
disk-name = "SD";
status = "okay";
};
};
};