Skip to content

esp32s3/lcd: Add support to 7" LCD on Waveshare ESP32S3-Touch-LCD-7 - #19937

Merged
jerpelea merged 4 commits into
apache:masterfrom
acassis:esp32s3-touch-lcd7
Aug 24, 2026
Merged

esp32s3/lcd: Add support to 7" LCD on Waveshare ESP32S3-Touch-LCD-7#19937
jerpelea merged 4 commits into
apache:masterfrom
acassis:esp32s3-touch-lcd7

Conversation

@acassis

@acassis acassis commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

These patches add an I/O expander used on this board to control the LCD, USB, CAN, etc and the support to LCD itself.
Including a fix to LCD rolling from ESP-IDF.

Impact

Users will be able to use this board with LCD

Testing

nsh> fb

image

@github-actions github-actions Bot added Arch: xtensa Issues related to the Xtensa architecture Area: Drivers Drivers issues Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: xtensa labels Aug 23, 2026
@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Comment thread Documentation/components/drivers/special/ioexpander.rst Outdated
Comment thread Documentation/components/drivers/special/ioexpander.rst
Comment thread include/nuttx/ioexpander/ch422g.h
@cederom

cederom commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The second commit states "esp32s3: Add support to LCD" while this one is about adding support to "esp32-touch-lcd7" board.. there are other esp32s3 boards with lcd support already here. I would rename commit subject to "add lcd support to esp32s3-touch-lcd7" or something like that :-)

Thank you @acassis for this great new feature :-)

@acassis

acassis commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

The second commit states "esp32s3: Add support to LCD" while this one is about adding support to "esp32-touch-lcd7" board.. there are other esp32s3 boards with lcd support already here. I would rename commit subject to "add lcd support to esp32s3-touch-lcd7" or something like that :-)

Thank you @acassis for this great new feature :-)

True, good idea!

@acassis
acassis force-pushed the esp32s3-touch-lcd7 branch from c766a2c to 56d0f6c Compare August 23, 2026 15:33
@github-actions github-actions Bot added the Arch: x86 Issues related to the x86 architecture label Aug 23, 2026
Comment thread drivers/ioexpander/ch422g.c Outdated
Comment thread arch/x86/src/qemu/syslinux_entry.S Outdated
@acassis
acassis force-pushed the esp32s3-touch-lcd7 branch from 56d0f6c to e3d2a0c Compare August 23, 2026 16:35
@github-actions github-actions Bot removed the Arch: x86 Issues related to the x86 architecture label Aug 23, 2026
The CH422G offers eight bi-directional pins, IO0-IO7, and four open-drain
outputs, OC0-OC3.  It appears on boards that have run out of usable GPIOs
once a parallel RGB panel has taken its share, the Waveshare
ESP32-S3-Touch-LCD-7 among them, where it holds the panel and touch
controller in and out of reset and switches the backlight.

Two things about the device do not fit the shape a register-per-address
I2C driver usually takes, and both are handled here rather than pushed on
to board logic:

  - A register is selected by the I2C address the transfer is addressed
    to, not by a register address written ahead of the data.  Each access
    carries a single byte to one of four addresses.
  - None of the write-only registers can be read back, so the driver
    keeps a shadow copy of each and updates it in step with the device.

IO0-IO7 have no individual direction control; one bit of the system
parameter register drives the whole group.  The driver records the
direction asked of each pin and puts the group in output mode once at
least one of them is an output, which is what a board that drives some of
the pins would expect.  Reading a pin of a group held in output mode
reports the value last written, because the hardware cannot report the
level, and that is documented rather than hidden.

The four open-drain outputs are presented as pins 8-11 of the same
ioexpander_dev_s so that one instance covers the chip, which means
CONFIG_IOEXPANDER_NPINS must be at least 12.

Builds clean with no new warnings on esp32s3-touch-lcd7:usbnsh and passes
nxstyle.

Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com>
Assisted-by: Claude Code
This patch get some fixes from ESP-IDF to fix a rolling issue
that happens on big resolution LCDs such as 800x480 LCDs.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
Assisted-by: Claude Code
This patch adds support to 7" 800x480 LCD on esp32s3-touch-lcd7
board.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
Assisted-by: Claude Code
This commit updates the board documentation.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
Assisted-by: Claude Code
@acassis
acassis force-pushed the esp32s3-touch-lcd7 branch from e3d2a0c to dcd6abc Compare August 23, 2026 16:41
@jerpelea
jerpelea merged commit 1267f78 into apache:master Aug 24, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: xtensa Issues related to the Xtensa architecture Area: Drivers Drivers issues Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants