LILYGO T-Display-P4

  • ESP32-P4
  • MIPI
  • AMOLED
  • LoRa
  • GPS
  • ESP32-C6

T-Display-P4

Version History:

Version Update date Update description
T-Display-P4_V1.0 2025-06-13 Initial Version
T-Display-P4-Keyboard_V1.0 2025-09-12 Keyboard Expansion Board Initial Version
Product SOC FLASH PSRAM Link
T-Display-P4_V1.0 ESP32-P4 16MB - LILYGO Mall
T-Display-P4-Keyboard_V1.0 - - - LILYGO Mall

Table of Contents

Description

T-Display-P4 is a multi-functional development board based on the ESP32-P4 high-performance core, designed for complex graphics processing, multimedia interaction, and IoT applications. Main features include:

  1. High-Performance Processing: Equipped with ESP32-P4 processor, supports complex graphics and video task processing.
  2. HD Display: Features a 4.05-inch MIPI interface screen with a resolution of 540×1168px, supporting touch.
  3. Dual-Core Collaboration: Onboard ESP32-C6 auxiliary processor, supports Wi-Fi 6 and Bluetooth 5.3.
  4. Rich Peripherals: Integrates speaker, microphone, linear vibration motor, LoRa, GPS, Ethernet, camera, battery monitoring, and other modules.
  5. High Expandability: Provides abundant GPIO interfaces, supports keyboard expansion board (T-Display-P4-Keyboard).

Preview

Physical Image

T-Display-P4-1

Pin Diagram

T-Display-P4 has two versions: Amoled and TFT. Pin diagrams are as follows:

Amoled Version

alt text

TFT Version

alt text

Modules

T-Display-P4 Main Board

1. Core Processor

2. Auxiliary Processor

3. Display and Touch

Model H0405S002T002-V0 (TFT) H0410S001AMT001-V0 (AMOLED)
Size 4.05 inch 4.1 inch
Type α-Si TFT AMOLED
Resolution 540×1168px 568×1232px
Interface MIPI + I2C MIPI + I2C
Driver Chip HI8561 RM69A10 + GT9895
Brightness 550 cd/m² 500 cd/m²
Contrast 1200:1 20000:1
Touch Points 10 points 10 points
Documentation HI8561 RM69A10
GT9895

4. Audio Module

  • DAC Chip: ES8311
  • Amplifier Chip: NS4150B
  • Microphone: Mic Head
  • Communication Protocol: I2S
  • Documentation: ES8311 , NS4150B

5. Vibration Motor

  • Driver Chip: AW86224AFCR
  • Communication Protocol: I2C
  • Documentation: AW86224

6. LoRa Module

  • Module: HPD16A
  • Chip: SX1262
  • Communication Protocol: SPI
  • Documentation: SX1261-2

7. GPS Module

  • Module: L76K
  • Communication Protocol: UART
  • Documentation: L76K

8. RTC Clock

  • Chip: PCF8563
  • Communication Protocol: I2C
  • Documentation: PCF8563

9. Charging Management

  • Chip: LGS4056H
  • Description: Supports three-wire battery NTC temperature detection
  • Documentation: LGS4056H

10. Battery Monitoring

  • Chip: BQ27220
  • Communication Protocol: I2C
  • Documentation: BQ27220

11. Camera

  • Model: OV2710 (MIPI interface)
  • Documentation: OV2710

12. Inertial Sensor

  • Chip: ICM20948
  • Communication Protocol: I2C
  • Documentation: ICM20948

13. IO Expansion

  • Chip: XL9535
  • Communication Protocol: I2C
  • Documentation: XL9535

T-Display-P4-Keyboard Expansion Board

1. Keyboard Driver

  • Chip: TCA8418
  • Communication Protocol: I2C
  • Documentation: TCA8418

2. Backlight Driver

  • Chip: SY7200A
  • Communication Protocol: PWM
  • Documentation: SY7200A

3. IO Expansion

  • Chip: XL9555
  • Communication Protocol: I2C
  • Documentation: XL9555

4. Wireless Module (T-MixRF)

Module Chip Protocol Documentation
CC1101 CC1101 SPI CC1101
NRF24L01 NRF24L01 SPI NRF24L01
NFC ST25R3916 SPI ST25R3916

Overview

Component Description
MCU ESP32-S3R8 Dual-core LX7 microprocessor
FLASH 16MB
PSRAM 8MB
Display 1.91 inch RM67162 IPS AMOLED
Touch Capacitive Touch Screen
LoRa LR1121 (1276/868/915MHz)
Storage TF Card
RTC PCF85063ATL/1
Power Management AXPM65611 + BQ25896
Wireless 2.4 GHz Wi-Fi & Bluetooth 5 (LE)
USB 1 × USB Port and OTG (TYPE-C)
IO Interface 2×13 Dual-row Expansion Interface
Expansion Interface FPC Antenna + TF Card + STEMMA QT/QWIIC + JST-GH 1.25MM
Buttons 1 x RESET Button + 1 x BOOT Button
Mounting Holes 4 × 2mm Positioning Holes
Dimensions 60×32×12mm

Quick Start

Example Support

T-Display-P4 Examples

example [vscode][esp-idf-v5.4.0] description picture
afe

alt text

aw86224

alt text

bq27220

alt text

deep_sleep

alt text

es8311

alt text

es8311_sd_wav

alt text

esp_hosted_mcu_sdio_wifi

alt text

esp32c6_at_host_sdio_uart

alt text

esp32c6_at_host_sdio_wifi

alt text

icm20948

alt text

iic_scan

alt text

l76k

alt text

lvgl_9_ui

alt text

Factory Example
pcf8563

alt text

radiolib_sx1262_send_receive

alt text

screen_camera

alt text

screen_lvgl

alt text

screen_lvgl_touch_draw

alt text

sgm38121

alt text

sx1262_gfsk_send_receive

alt text

sx1262_lora_send_receive

alt text

sx1262_tx_continuous_wave

alt text

tusb_serial_device

alt text

xl9535

alt text

xiaozhi

alt text

T-Display-P4-Keyboard Examples

example [vscode][esp-idf-v5.4.0] description picture
radiolib_cc1101_send_receive

alt text

radiolib_nrf24l01_send_receive

alt text

screen_tca8418_lvgl_touch_draw

alt text

st25r3916

alt text

tca8418

alt text

xl9555

alt text

ESP-IDF Visual Studio Code

  1. Install Visual Studio Code, choose the installation according to your system type.

  2. Open the "Extensions" in the sidebar of Visual Studio Code (or use Ctrl+Shift+X to open extensions), search for the "ESP-IDF" extension and install it.

  3. While the extension is installing, use the git command to clone the repository:

     git clone --recursive https://github.com/Xinyuan-LilyGO/T-Display-P4.git
    
    

    You need to add "--recursive" when cloning. If not added during cloning, you need to initialize the submodules later:

     git submodule update --init --recursive
    
    
  4. Download and install ESP-IDF v5.4.1, record the installation path, open the previously installed "ESP-IDF" extension and open "Configure ESP-IDF Extension", select the "USE EXISTING SETUP" menu, select the "Search ESP-IDF in system" field, correctly configure the previously recorded installation path:

    • ESP-IDF directory (IDF_PATH): Your installation path xxx\Espressif\frameworks\esp-idf-v5.4
    • ESP-IDF Tools directory (IDF_TOOLS_PATH): Your installation path xxx\Espressif

    Click the "install" button in the bottom right corner to install the framework.

  5. Click the ESP-IDF extension menu "SDK Configuration Editor" in the bottom menu bar of Visual Studio Code, search for the "Select the example to build" field in the search bar, select the project you need to compile, then search for the "Select the camera type" field in the search bar, select the camera type onboard your board, and click Save.

  6. Click "Set Espressif device target" in the bottom menu bar of Visual Studio Code, select ESP32P4, click "Build Project" in the bottom menu bar, wait for the build to complete, then click "Select port to use" in the bottom menu bar, then click "Flash Project" in the bottom menu bar to flash the program.

example

Firmware Downloads

firmware description picture
t_display_p4_lvgl_9_ui Factory Program
t_display_p4_keyboard_lvgl_9_ui Keyboard Expansion Board Factory Program
esp32c6_at esp32c6-at Factory Program
esp32c6_slave_esp_hosted_mcu_network_adapter
t_display_p4_xiaozhi

Pin Overview

For pin definitions, please refer to the configuration files:


t_display_p4_config.h
t_display_p4_keyboard_config.h

Development Platforms

  1. Micropython
  2. Arduino IDE
  3. Platform IO

Power Consumption

firmware program description picture
deep_sleep(single_board) deep_sleep Average current consumption: 1.2mA For more information, please view Power Consumption Test Log

Camera

program description picture
uvc_sc2336 Original image and captured screen image screenshot effect

example

uvc_ov2710 Original image and captured screen image screenshot effect

example

FAQ

  • Q. I still don't know how to set up the programming environment after reading the above tutorial. What should I do?
  • A. If you still don't understand how to set up the environment after reading the above tutorial, you can refer to the LilyGo-Document documentation for setup instructions.

  • Q. Why does my board keep failing to upload programs?
  • A. Please hold down the "BOOT" button and try uploading the program again.

  • Q. Why do I fail when selecting the target compilation chip in the espidf framework or when configuring menuconfig in the SDK, reporting the following error:

      asyncio.exceptions.LimitOverrunError: Separator is found, but chunk is longer than limit
    
      ValueError: Separator is found, but chunk is longer than limit
    
    
  • A. This is a bug in the espidf framework v5.4~v5.5. You need to modify line 351 of the file at path esp-idf-v5.x\tools\idf_py_actions\tools.py as follows:

      Original code:
      p = await asyncio.create_subprocess_exec(*cmd, env=env_copy, limit=1024 * 256, cwd=self.cwd, stdout=asyncio.subprocess.PIPE,stderr=asyncio.subprocess.PIPE)
      Modified code:
      p = await asyncio.create_subprocess_exec(*cmd, env=env_copy, limit=1024 * 512, cwd=self.cwd, stdout=asyncio.subprocess.PIPE,stderr=asyncio.subprocess.PIPE)
    
    
    

Projects

Resources

Dependent Libraries