New boards Wishlist

Waveshare ESP32-S3-Touch-LCD-4 (without "B"), Rev 4.0: working override for the 4B profile

sebastianrakSuggested this wish Β·

Summary

The ESP32-S3-Touch-LCD-4 without "B" (PCB revision V4.0) runs Tessera with an Override YAML on top of the Waveshare 4B profile. Glass and grid are the same as the 4B (480 x 480, 2 x 3); only the hardware differs. The full override is in the configuration field.

Hardware (rev V4.0)

From Waveshare's BSP esp32_s3_touch_lcd_4 and the V4.0 schematic:

  • I2C: SDA GPIO15, SCL GPIO7, shared by the GT911, the CH32V003 expander (0x24) and the PCF85063 RTC
  • ST7701S: RGB pins as in ESPHome's WAVESHARE-4-480X480 model; panel setup over SPI with CS GPIO42, SCL GPIO2, SDA GPIO1
  • CH32V003 lines: EXIO1 TP_RST, EXIO2 TP_INT, EXIO3 LCD_RST, EXIO5 SYS_EN, EXIO6 buzzer, EXIO7 RTC_INT; backlight = the expander's PWM (inverted)
  • Log over the chip's native USB; UART0 (GPIO43/44) goes to the RS485 transceiver

Findings

  • ESPHome's CH32V003 driver starts every line as an output, high. That releases the touch and LCD resets, but also switches the buzzer on until EXIO6 is driven low.
  • With reset_pin on the expander, ESPHome's GT911 driver resets the chip and probes it 56 ms later. On this board that failed every time, with and without interrupt_pin on EXIO2. Waveshare's own BSP waits 200 ms after the reset and then probes 0x5D, then 0x14.
  • What works: no reset or interrupt pin, setup_priority: 500 for ts_touch (after the display's setup of more than 150 ms), and TP_INT released to an input after boot. The override does that last step through BOOT_BOARD_SETTINGS, which is a workaround; a board file would do it its own way.
  • Backlight: ESPHome's safe PWM levels (1..247), as on the 7B, so 0 % is very dim rather than dark.

Status

Picture, touch, tiles and Home Assistant work. Not tested yet: the brightness range, standby and wake over hours, several cold starts. I have the board and can test a proper profile.

Hardware testing

We often do not have this board ourselves. Community testing helps establish what actually works. A successful report is evidence for the maintainer to review, not an automatic compatibility claim.

Board details & configuration
Model
Waveshare ESP32-S3-Touch-LCD-4 (not the 4B), PCB revision V4.0, CH32V003 IO expander at 0x24
Chip, RAM and flash
ESP32-S3 (rev 0.2), 8 MB octal PSRAM, 16 MB flash
Display and touch
4" 480x480 IPS, ST7701S over 16-bit RGB (ESPHome model WAVESHARE-4-480X480, panel setup over SPI on GPIO42/2/1); GT911 touch on I2C (SDA GPIO15, SCL GPIO7); backlight via CH32V003 PWM
Already tried
1) The Waveshare 4B profile as-is (Tessera app 0.4.90, firmware 0.57.0): boots and joins Home Assistant, backlight on, picture black. The 4B expects a TCA9554 and other pins. 2) The 4B profile plus the Override YAML below: picture, touch, tiles and Home Assistant work. Touch took two more tries: with ESPHome's GT911 reset_pin on EXIO1 (with or without interrupt_pin on EXIO2) the GT911 never answered ("touchscreen is marked FAILED: Calibration error"). Without reset and interrupt pins, and with the touchscreen set up after the display, it has been found every time so far. Not tested yet: brightness range, standby and wake over hours, several cold starts, long-term stability. Built by Tessera with ESPHome 2026.9.0; the configuration also validates on 2026.10.1.
Configuration status
working
View shared configuration
# Tessera Override YAML: Waveshare ESP32-S3-Touch-LCD-4 (WITHOUT "B"), board revision V4.0
# Built on top of the Waveshare 4B profile (packages/waveshare4b.yaml), app 0.4.90, firmware 0.57.0.
# Sources: Waveshare BSP esp32_s3_touch_lcd_4, ESPHome model WAVESHARE-4-480X480,
# github.com/PedanticAvenger/Waveshare_ESP32-S3-TOUCH-LCD-4 (rev 4.0) and the V4.0 schematic.

# Native USB for the log (this board has no USB-UART chip; UART0 goes to the RS485 transceiver)
logger:
  hardware_uart: USB_SERIAL_JTAG

# I2C: GT911, CH32V003 expander and RTC on GPIO15/GPIO7
i2c:
  id: touch_bus
  sda: GPIO15
  scl: GPIO7

# IO expander: CH32V003 at 0x24 instead of the 4B's TCA9554
pca9554: !remove

waveshare_io_ch32v003:
  - id: expander
    i2c_id: touch_bus

# Panel setup over plain GPIOs (CS GPIO42 comes from the display model)
spi:
  id: lcd
  interface: any
  clk_pin: GPIO2
  mosi_pin: GPIO1

output:
  # Remove the 4B parts: backlight on GPIO4 and the parked setup lines on the TCA9554
  - id: !remove gpio_backlight_pwm
  - id: !remove lcd_select_idle
  - id: !remove lcd_data_idle
  - id: !remove lcd_clock_idle
  # Backlight: CH32V003 PWM, inverted (low = bright); ESPHome's default safe levels (1..247)
  - platform: waveshare_io_ch32v003
    id: gpio_backlight_pwm
    waveshare_io_ch32v003_id: expander
    inverted: true
    safe_pwm_levels:
      min_value: 1
      max_value: 247

switch:
  # EXIO5 = SYS_EN: Waveshare's BSP drives it high at start
  - platform: gpio
    id: board_sys_enable
    internal: true
    restore_mode: ALWAYS_ON
    pin:
      waveshare_io_ch32v003: expander
      number: 5
      mode:
        output: true
  # EXIO6 = buzzer enable: the expander starts with every line high, so keep it off
  - platform: gpio
    id: board_buzzer
    internal: true
    restore_mode: ALWAYS_OFF
    pin:
      waveshare_io_ch32v003: expander
      number: 6
      mode:
        output: true

# The 4B dims an analog input (gamma 1.0); the CH32V003 PWM takes ESPHome's default gamma
light:
  - id: !extend back_light
    gamma_correct: 2.8

# Touch: GT911 (schematic V4.0: TP_RST on EXIO1, TP_INT on EXIO2).
# No reset_pin/interrupt_pin: with them, ESPHome's GT911 driver resets the chip through the expander and
# probes it 56 ms later, which failed here every time ("Calibration error"). Without them the expander's
# start (every line high) releases the reset, the display setup takes >150 ms, and only then the driver
# probes 0x5D / 0x14. setup_priority 500 = after the display (600), before LVGL (400).
touchscreen:
  - id: !extend ts_touch
    setup_priority: 500

substitutions:
  # After boot, release TP_INT (input) so the expander does not drive against the GT911
  BOOT_BOARD_SETTINGS: |-
    id(expander)->pin_mode(2, gpio::FLAG_INPUT);

# Display: ST7701S 480x480 over RGB, reset on EXIO3
display:
  - id: !remove my_display
  - platform: mipi_rgb
    model: WAVESHARE-4-480X480
    id: my_display
    spi_id: lcd
    reset_pin:
      waveshare_io_ch32v003: expander
      number: 3
      mode:
        output: true
    update_interval: never
    auto_clear_enabled: false
    # Init sequence from Waveshare's BSP (esp32_s3_touch_lcd_4.c), as in the rev 4.0 community config
    init_sequence:
      - [0x11, 0x00]
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10]
      - [0xC0, 0x3B, 0x00]
      - [0xC1, 0x0D, 0x02]
      - [0xC2, 0x21, 0x08]
      - [0xCD, 0x08]
      - [0xB0, 0x00, 0x11, 0x18, 0x0E, 0x11, 0x06, 0x07, 0x08, 0x07, 0x22, 0x04, 0x12, 0x0F, 0xAA, 0x31, 0x18]
      - [0xB1, 0x00, 0x11, 0x19, 0x0E, 0x12, 0x07, 0x08, 0x08, 0x08, 0x22, 0x04, 0x11, 0x11, 0xA9, 0x32, 0x18]
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x11]
      - [0xB0, 0x60]
      - [0xB1, 0x30]
      - [0xB2, 0x87]
      - [0xB3, 0x80]
      - [0xB5, 0x49]
      - [0xB7, 0x85]
      - [0xB8, 0x21]
      - [0xC1, 0x78]
      - [0xC2, 0x78]
      - delay 20ms
      - [0xE0, 0x00, 0x1B, 0x02]
      - [0xE1, 0x08, 0xA0, 0x00, 0x00, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x44, 0x44]
      - [0xE2, 0x11, 0x11, 0x44, 0x44, 0xED, 0xA0, 0x00, 0x00, 0xEC, 0xA0, 0x00, 0x00]
      - [0xE3, 0x00, 0x00, 0x11, 0x11]
      - [0xE4, 0x44, 0x44]
      - [0xE5, 0x0A, 0xE9, 0xD8, 0xA0, 0x0C, 0xEB, 0xD8, 0xA0, 0x0E, 0xED, 0xD8, 0xA0, 0x10, 0xEF, 0xD8, 0xA0]
      - [0xE6, 0x00, 0x00, 0x11, 0x11]
      - [0xE7, 0x44, 0x44]
      - [0xE8, 0x09, 0xE8, 0xD8, 0xA0, 0x0B, 0xEA, 0xD8, 0xA0, 0x0D, 0xEC, 0xD8, 0xA0, 0x0F, 0xEE, 0xD8, 0xA0]
      - [0xEB, 0x02, 0x00, 0xE4, 0xE4, 0x88, 0x00, 0x40]
      - [0xEC, 0x3C, 0x00]
      - [0xED, 0xAB, 0x89, 0x76, 0x54, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x45, 0x67, 0x98, 0xBA]
      - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x00]

1 owner has volunteered to test.

Sign in to volunteer

Discussion 0

Add a comment

Start the conversation

Share an example, ask a question or explain how you would use this.

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images Β· URLs on their own line become previews0 / 10,000
Create your account to join in

We need a verified email address to reach you about your contribution. Your address stays private.

Continue with GitHub

Your draft stays in this tab. Return here after verification.