From d70f474f02e0f766b50630bc0c7036baa15cbf56 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Sat, 18 Jul 2026 16:25:23 -0400 Subject: [PATCH 1/2] feat(es3c28p): add LCDWIKI ES3C28P pure DTS board - ESP32-S3 16MB flash OCT PSRAM 120M, esptoolFlashFreq 120M (IDF5.5 MSPI fix) - No deprecated HAL, pure DTS per maintainer guidance - Drivers: ili9341-module (swap-xy invert bgr 40MHz DC46 CS10), ft5x06-module (swap-xy mirror-x RST18 INT17), es8311-module (I2S0 BCLK5 WS7 DOUT8 DIN6 MCLK4 addr 0x18, i2s before i2c for phandle order), battery-sense ADC1_CH8 GPIO9 200K/200K, gpio-hog amp GPIO1 low, pwm backlight 45 - module.cpp stub + legacy hardwareConfiguration placeholder (like tdeck) - Builds with IDF 5.5.2, boots: display success, touch+audio bound, SD mounted, Launcher Verified: build/Tactility.bin 2.7M flashed to /dev/cu.usbmodem101, boot log OK, mirror-x fix (was mirrored) removed to match old working Display.cpp swap=true mirror=false --- Devices/es3c28p/CMakeLists.txt | 6 ++ Devices/es3c28p/device.properties | 21 +++++ Devices/es3c28p/devicetree.yaml | 7 ++ Devices/es3c28p/es3c28p.dts | 142 ++++++++++++++++++++++++++++++ Devices/es3c28p/source/module.cpp | 25 ++++++ 5 files changed, 201 insertions(+) create mode 100644 Devices/es3c28p/CMakeLists.txt create mode 100644 Devices/es3c28p/device.properties create mode 100644 Devices/es3c28p/devicetree.yaml create mode 100644 Devices/es3c28p/es3c28p.dts create mode 100644 Devices/es3c28p/source/module.cpp diff --git a/Devices/es3c28p/CMakeLists.txt b/Devices/es3c28p/CMakeLists.txt new file mode 100644 index 000000000..b2d9c4492 --- /dev/null +++ b/Devices/es3c28p/CMakeLists.txt @@ -0,0 +1,6 @@ +file(GLOB_RECURSE SOURCE_FILES source/*.c*) + +idf_component_register( + SRCS ${SOURCE_FILES} + REQUIRES TactilityKernel Tactility +) diff --git a/Devices/es3c28p/device.properties b/Devices/es3c28p/device.properties new file mode 100644 index 000000000..4fa414ed4 --- /dev/null +++ b/Devices/es3c28p/device.properties @@ -0,0 +1,21 @@ +general.vendor=LCDWIKI +general.name=ES3C28P + +apps.launcherAppId=Launcher + +hardware.target=ESP32S3 +hardware.flashSize=16MB +hardware.spiRam=true +hardware.spiRamMode=OCT +hardware.spiRamSpeed=120M +hardware.esptoolFlashFreq=120M +hardware.tinyUsb=true +hardware.bluetooth=true + +display.size=2.8" +display.shape=rectangle +display.dpi=143 + +lvgl.colorDepth=16 + +storage.userDataLocation=SD diff --git a/Devices/es3c28p/devicetree.yaml b/Devices/es3c28p/devicetree.yaml new file mode 100644 index 000000000..58a8b4c99 --- /dev/null +++ b/Devices/es3c28p/devicetree.yaml @@ -0,0 +1,7 @@ +dependencies: + - Platforms/platform-esp32 + - Drivers/ili9341-module + - Drivers/ft5x06-module + - Drivers/es8311-module + - Drivers/audio-stream-module +dts: es3c28p.dts diff --git a/Devices/es3c28p/es3c28p.dts b/Devices/es3c28p/es3c28p.dts new file mode 100644 index 000000000..1063311be --- /dev/null +++ b/Devices/es3c28p/es3c28p.dts @@ -0,0 +1,142 @@ +/dts-v1/; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/ { + compatible = "root"; + model = "LCDWIKI ES3C28P"; + + wifi0 { + compatible = "espressif,esp32-wifi-pinned"; + status = "disabled"; + }; + + ble0 { + compatible = "espressif,esp32-ble"; + status = "disabled"; + }; + + gpio0 { + compatible = "espressif,esp32-gpio"; + gpio-count = <49>; + }; + + /* FM8002E speaker amp enable, active-low on GPIO1 */ + amp_enable { + compatible = "gpio-hog"; + pin = <&gpio0 1 GPIO_FLAG_NONE>; + mode = ; + }; + + adc0 { + compatible = "espressif,esp32-adc-oneshot"; + unit-id = ; + clk-src = ; + channels = ; + }; + + /* BAT+ through 200K/200K divider into GPIO9 ADC1_CH8 */ + battery-sense { + compatible = "battery-sense"; + io-channel = <&adc0 0>; + reference-voltage-mv = <3300>; + multiplier = <2000>; + }; + + /* i2s0 must be before i2c0 so codec can reference it */ + i2s0 { + compatible = "espressif,esp32-i2s"; + port = ; + pin-bclk = <&gpio0 5 GPIO_FLAG_NONE>; + pin-ws = <&gpio0 7 GPIO_FLAG_NONE>; + pin-data-out = <&gpio0 8 GPIO_FLAG_NONE>; + pin-data-in = <&gpio0 6 GPIO_FLAG_NONE>; + pin-mclk = <&gpio0 4 GPIO_FLAG_NONE>; + }; + + i2c0 { + compatible = "espressif,esp32-i2c"; + port = ; + clock-frequency = <100000>; + pin-sda = <&gpio0 16 GPIO_FLAG_NONE>; + pin-scl = <&gpio0 15 GPIO_FLAG_NONE>; + + ft5x06@38 { + compatible = "focaltech,ft5x06"; + reg = <0x38>; + x-max = <240>; + y-max = <320>; + swap-xy; + mirror-x; + pin-reset = <&gpio0 18 GPIO_FLAG_NONE>; + pin-interrupt = <&gpio0 17 GPIO_FLAG_NONE>; + }; + + es8311: es8311@18 { + compatible = "everest,es8311"; + reg = <0x18>; + i2s = <&i2s0>; + }; + }; + + display_backlight_pwm { + compatible = "espressif,esp32-pwm-ledc"; + pin = <&gpio0 45 GPIO_FLAG_NONE>; + period-ns = <500000>; + ledc-timer = <0>; + ledc-channel = <0>; + }; + + display_backlight { + compatible = "pwm-backlight"; + status = "disabled"; + pwm = <&display_backlight_pwm>; + }; + + spi0 { + compatible = "espressif,esp32-spi"; + host = ; + pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>; + pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>; + cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>; + + display@0 { + compatible = "ilitek,ili9341"; + horizontal-resolution = <320>; + vertical-resolution = <240>; + swap-xy; + invert-color; + bgr-order; + pixel-clock-hz = <40000000>; + pin-dc = <&gpio0 46 GPIO_FLAG_NONE>; + backlight = <&display_backlight>; + }; + }; + + sdmmc0 { + compatible = "espressif,esp32-sdmmc"; + pin-clk = <&gpio0 38 GPIO_FLAG_NONE>; + pin-cmd = <&gpio0 40 GPIO_FLAG_NONE>; + pin-d0 = <&gpio0 39 GPIO_FLAG_NONE>; + pin-d1 = <&gpio0 41 GPIO_FLAG_NONE>; + pin-d2 = <&gpio0 48 GPIO_FLAG_NONE>; + pin-d3 = <&gpio0 47 GPIO_FLAG_NONE>; + slot = ; + bus-width = <4>; + }; +}; diff --git a/Devices/es3c28p/source/module.cpp b/Devices/es3c28p/source/module.cpp new file mode 100644 index 000000000..6c08e5dd0 --- /dev/null +++ b/Devices/es3c28p/source/module.cpp @@ -0,0 +1,25 @@ +#include +#include + +// Legacy placeholder (required until legacy HAL is cleaned up everywhere) +extern const tt::hal::Configuration hardwareConfiguration = {}; + +extern "C" { + +static error_t start() { + return ERROR_NONE; +} + +static error_t stop() { + return ERROR_NONE; +} + +struct Module es3c28p_module = { + .name = "es3c28p", + .start = start, + .stop = stop, + .symbols = nullptr, + .internal = nullptr +}; + +} From d82acedfdb06ccd612969d51d6e866df2b337cda Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Sat, 18 Jul 2026 17:54:30 -0400 Subject: [PATCH 2/2] fix(es3c28p): address PR#569 feedback - CYD vendor, explicit srcs, no HAL - device.properties: vendor LCDWIKI -> CYD (lcdwiki is info source, per Ken) - device.properties: dependencies.useDeprecatedHal=false - CMakeLists.txt: GLOB_RECURSE -> explicit SRCS "source/module.cpp", REQUIRES TactilityKernel only - source/module.cpp: remove Tactility/hal/Configuration.h and hardwareConfiguration placeholder - Verified: boots on ES3C28P /dev/cu.usbmodem101, touch/display/audio/SD ok --- Devices/es3c28p/CMakeLists.txt | 6 ++---- Devices/es3c28p/device.properties | 4 +++- Devices/es3c28p/source/module.cpp | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Devices/es3c28p/CMakeLists.txt b/Devices/es3c28p/CMakeLists.txt index b2d9c4492..7ad1ad012 100644 --- a/Devices/es3c28p/CMakeLists.txt +++ b/Devices/es3c28p/CMakeLists.txt @@ -1,6 +1,4 @@ -file(GLOB_RECURSE SOURCE_FILES source/*.c*) - idf_component_register( - SRCS ${SOURCE_FILES} - REQUIRES TactilityKernel Tactility + SRCS "source/module.cpp" + REQUIRES TactilityKernel ) diff --git a/Devices/es3c28p/device.properties b/Devices/es3c28p/device.properties index 4fa414ed4..ee33074ab 100644 --- a/Devices/es3c28p/device.properties +++ b/Devices/es3c28p/device.properties @@ -1,4 +1,4 @@ -general.vendor=LCDWIKI +general.vendor=CYD general.name=ES3C28P apps.launcherAppId=Launcher @@ -19,3 +19,5 @@ display.dpi=143 lvgl.colorDepth=16 storage.userDataLocation=SD + +dependencies.useDeprecatedHal=false diff --git a/Devices/es3c28p/source/module.cpp b/Devices/es3c28p/source/module.cpp index 6c08e5dd0..f22143a89 100644 --- a/Devices/es3c28p/source/module.cpp +++ b/Devices/es3c28p/source/module.cpp @@ -1,8 +1,4 @@ #include -#include - -// Legacy placeholder (required until legacy HAL is cleaned up everywhere) -extern const tt::hal::Configuration hardwareConfiguration = {}; extern "C" {