Skip to content

Add ES3C28P device#569

Merged
KenVanHoeylandt merged 2 commits into
TactilityProject:mainfrom
reyna-b:add-es3c28p-stickc-plus
Jul 19, 2026
Merged

Add ES3C28P device#569
KenVanHoeylandt merged 2 commits into
TactilityProject:mainfrom
reyna-b:add-es3c28p-stickc-plus

Conversation

@reyna-b

@reyna-b reyna-b commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Refs #568.

What this adds

Adds Devices/es3c28p for the LCDWIKI ES3C28P board:

  • ESP32-S3, 16 MB flash, OCT PSRAM
  • ILI9341 display via ili9341-module
  • FT5x06 touch via ft5x06-module
  • ES8311 audio codec via es8311-module / esp_codec_dev
  • audio stream module wiring
  • SDMMC storage
  • battery sense and PWM backlight DTS nodes
  • FM8002E speaker amp enable via gpio-hog

The PR is scoped to the new device folder only.

Maintainer feedback addressed

  • Reworked the board support to use the current DTS module-based driver pattern.
  • Removed the old manual HAL display/touch/audio setup.
  • Removed the unverified USB host DTS entries.
  • Kept the ES8311 codec setup in DTS instead of board-specific register programming.

Verification

Built and tested on ES3C28P hardware:

idf.py build
idf.py flash

Hardware smoke test:

boot OK
Launcher starts
display initializes
touch works
audio codec binds
SD card mounts
apps run from storage

Additional checks:

python3 device.py es3c28p
# Using partition table: partitions-16mb-with-sd.csv
# Created sdkconfig for es3c28p

python Buildscripts/DevicetreeCompiler/compile.py Devices/es3c28p /tmp/es3c28p-dt
# generated devicetree.c/devicetree.h

git show --check
# clean

Summary by CodeRabbit

  • New Features
    • Added support for the LCDWIKI ES3C28P device.
    • Configured device properties including hardware settings, display characteristics, SD-backed user storage, LVGL color depth, and launcher identity.
    • Added board hardware mapping for display, touchscreen controller, audio codec, speaker amplifier enable, battery sensing, backlight, and SD interfaces.
    • Integrated an ESP-IDF build component for the device, including basic start/stop lifecycle wiring.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 887bf466-593a-4d0d-b800-92ac86e7e1c1

📥 Commits

Reviewing files that changed from the base of the PR and between d70f474 and d82aced.

📒 Files selected for processing (3)
  • Devices/es3c28p/CMakeLists.txt
  • Devices/es3c28p/device.properties
  • Devices/es3c28p/source/module.cpp
💤 Files with no reviewable changes (1)
  • Devices/es3c28p/source/module.cpp

📝 Walkthrough

Walkthrough

Adds ES3C28P device metadata, ESP-IDF component registration, and a device-tree description for board hardware. The device tree configures wireless states, GPIO and battery sensing, I2S, I2C peripherals, display backlight, SPI display, and SD/MMC pins. A module implementation exports the device module and placeholder start/stop lifecycle hooks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: adding support for the ES3C28P device.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@reyna-b
reyna-b force-pushed the add-es3c28p-stickc-plus branch from dbe894e to 8059f1b Compare July 17, 2026 01:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
Devices/m5stack-stickc-plus/m5stack,stickc-plus.dts (1)

20-36: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider declaring the AXP192 in the devicetree.

The mpu6886 and bm8563 are defined under i2c_internal, but the axp192 (typically at address 0x34 on this bus) is omitted. Even if the AXP192 is instantiated directly in code, adding it to the devicetree improves hardware documentation and consistency.

Devices/m5stack-stickc-plus/Source/devices/Power.cpp (1)

23-25: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove duplicate register write.

The AXP192_ADC_ENABLE_1 register is configured with 0xff twice (lines 23 and 25). The duplicate call can be safely removed.

♻️ Proposed refactor
-        axp192_ioctl(driver, AXP192_ADC_ENABLE_1, 0xff); // Set all ADC enabled
         axp192_ioctl(driver, AXP192_CHARGE_CONTROL_1, 0xc0); // Battery charging at 4.2 V and 100 mA
         axp192_ioctl(driver, AXP192_ADC_ENABLE_1, 0xff); // Enable battery, AC in, Vbus, APS ADC

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e44c3f91-c642-4bb3-8ad0-17a6f5bf4f50

📥 Commits

Reviewing files that changed from the base of the PR and between 3b5a401 and dbe894e.

📒 Files selected for processing (18)
  • Devices/es3c28p/CMakeLists.txt
  • Devices/es3c28p/Source/Configuration.cpp
  • Devices/es3c28p/Source/devices/Display.cpp
  • Devices/es3c28p/Source/devices/Display.h
  • Devices/es3c28p/Source/module.cpp
  • Devices/es3c28p/device.properties
  • Devices/es3c28p/devicetree.yaml
  • Devices/es3c28p/es3c28p.dts
  • Devices/m5stack-stickc-plus/CMakeLists.txt
  • Devices/m5stack-stickc-plus/Source/Configuration.cpp
  • Devices/m5stack-stickc-plus/Source/devices/Display.cpp
  • Devices/m5stack-stickc-plus/Source/devices/Display.h
  • Devices/m5stack-stickc-plus/Source/devices/Power.cpp
  • Devices/m5stack-stickc-plus/Source/devices/Power.h
  • Devices/m5stack-stickc-plus/Source/module.cpp
  • Devices/m5stack-stickc-plus/device.properties
  • Devices/m5stack-stickc-plus/devicetree.yaml
  • Devices/m5stack-stickc-plus/m5stack,stickc-plus.dts

Comment thread Devices/m5stack-stickc-plus/device.properties Outdated
Comment thread Devices/m5stack-stickc-plus/Source/devices/Display.cpp Outdated
@reyna-b
reyna-b force-pushed the add-es3c28p-stickc-plus branch from 8059f1b to 713c79c Compare July 17, 2026 01:52
@reyna-b reyna-b changed the title Add ES3C28P and StickC Plus devices Add ES3C28P device Jul 17, 2026
- 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
@reyna-b
reyna-b force-pushed the add-es3c28p-stickc-plus branch from 713c79c to d70f474 Compare July 18, 2026 20:38
@reyna-b

reyna-b commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the guidance. I reworked the ES3C28P support to follow the current DTS module-based driver pattern.

Updated branch changes:

  • display now uses ili9341-module
  • touch now uses ft5x06-module
  • audio now uses es8311-module / esp_codec_dev, with audio-stream-module included
  • removed the unverified USB host DTS entries
  • removed the old manual HAL display/touch/audio setup

I also built and tested this on ES3C28P hardware. The board boots, Launcher starts, display/touch work, audio binds, SD mounts, and apps run from storage.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Devices/es3c28p/CMakeLists.txt (1)

1-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Explicitly list source files instead of using GLOB_RECURSE.

Using file(GLOB_RECURSE ...) is discouraged in CMake because adding or removing source files won't automatically trigger a CMake reconfiguration, which can lead to stale builds. Explicitly listing source files is safer and more reliable.

♻️ Proposed refactor
-file(GLOB_RECURSE SOURCE_FILES source/*.c*)
-
 idf_component_register(
-    SRCS ${SOURCE_FILES}
+    SRCS "source/module.cpp"
     REQUIRES TactilityKernel Tactility
 )

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8c750a7f-4998-435c-ad2f-6a3b37c84deb

📥 Commits

Reviewing files that changed from the base of the PR and between 713c79c and d70f474.

📒 Files selected for processing (5)
  • Devices/es3c28p/CMakeLists.txt
  • Devices/es3c28p/device.properties
  • Devices/es3c28p/devicetree.yaml
  • Devices/es3c28p/es3c28p.dts
  • Devices/es3c28p/source/module.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
  • Devices/es3c28p/devicetree.yaml
  • Devices/es3c28p/device.properties

Comment thread Devices/es3c28p/source/module.cpp Outdated
Comment thread Devices/es3c28p/CMakeLists.txt Outdated
Comment thread Devices/es3c28p/device.properties Outdated
… 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
@reyna-b

reyna-b commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated with the review feedback:

  • set general.vendor=CYD
  • added dependencies.useDeprecatedHal=false
  • removed the legacy hardwareConfiguration placeholder
  • reduced the component dependency to TactilityKernel
  • replaced the source glob with explicit source/module.cpp

Rebuilt, flashed, and smoke-tested on the ES3C28P hardware; display, touch, audio, SD, Launcher, and apps are working.

@KenVanHoeylandt
KenVanHoeylandt merged commit bd30aa0 into TactilityProject:main Jul 19, 2026
61 checks passed
@KenVanHoeylandt

Copy link
Copy Markdown
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants