Initial import

This commit is contained in:
2026-03-25 18:14:45 +01:00
commit d074cd2e43
99 changed files with 3781 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
if BOARD_LILYGO_TBEAM
config BOARD
default "lilygo_tbeam"
endif # BOARD_LILYGO_TBEAM

View File

@@ -0,0 +1,3 @@
config BOARD_LILYGO_TBEAM
select SOC_ESP32_PROCPU if BOARD_LILYGO_TBEAM_PROCPU
select SOC_ESP32_APPCPU if BOARD_LILYGO_TBEAM_APPCPU

View File

@@ -0,0 +1,3 @@
# LilyGo T-Beam — board.cmake
# Uses esptool for flashing over USB-to-serial (CP2104)
include(${ZEPHYR_BASE}/boards/espressif/common/board.cmake)

View File

@@ -0,0 +1,10 @@
board:
name: lilygo_tbeam
full_name: "LilyGo T-Beam"
vendor: lilygo
url: https://www.lilygo.cc/products/t-beam-v1-1
socs:
- name: esp32
variants:
- name: procpu
- name: appcpu

View File

@@ -0,0 +1,36 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* LilyGo T-Beam V1.1 — pin control definitions
* SoC: ESP32-D0WD
*/
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO1>;
output-enable;
};
group2 {
pinmux = <UART0_RX_GPIO3>;
bias-pull-up;
};
};
/* SPI3 (VSPI) for SX1276/SX1278 */
spim3_default: spim3_default {
group1 {
pinmux = <SPIM3_MISO_GPIO19>,
<SPIM3_SCLK_GPIO5>,
<SPIM3_CSEL_GPIO18>;
};
group2 {
pinmux = <SPIM3_MOSI_GPIO27>;
output-enable;
};
};
};

View File

@@ -0,0 +1,102 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* LilyGo T-Beam V1.1 — Device Tree Source (PROCPU)
*
* SoC: ESP32-D0WD
* Radio: SX1276 / SX1278 (LORA32 module)
* Flash: 4 MB
*
* LoRa: MOSI=27 MISO=19 SCK=5 NSS=18 RST=23 DIO0=26
* UART0: TX=1 RX=3 (via CP2104 USB-serial)
*/
/dts-v1/;
#include <espressif/esp32/esp32_d0wd_v3.dtsi>
#include "lilygo_tbeam-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "LilyGo T-Beam V1.1 PROCPU";
compatible = "lilygo,t-beam";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash-controller = &flash;
};
aliases {
lora0 = &lora;
};
buttons {
compatible = "gpio-keys";
boot_button: button_0 {
gpios = <&gpio0 38 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Boot Button";
zephyr,code = <INPUT_KEY_0>;
};
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&spi3 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&spim3_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
lora: lora@0 {
compatible = "semtech,sx1276";
reg = <0>;
spi-max-frequency = <8000000>;
reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
dio1-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
power-amplifier-output = "pa-boost";
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&flash0 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00010000>;
};
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00180000>;
};
slot1_partition: partition@190000 {
label = "image-1";
reg = <0x00190000 0x00180000>;
};
storage_partition: partition@310000 {
label = "storage";
reg = <0x00310000 0x000F0000>;
};
};
};

View File

@@ -0,0 +1,7 @@
CONFIG_SOC_SERIES_ESP32=y
CONFIG_BOARD_LILYGO_TBEAM=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_UART_CONSOLE=y
CONFIG_SPI=y
CONFIG_GPIO=y