Skip to content

Commit be22746

Browse files
lyusupovLzw655
authored andcommitted
add support for Wireless-Tag WTP4C5MP07S Touch LCD
1 parent 12a01d6 commit be22746

File tree

8 files changed

+324
-0
lines changed

8 files changed

+324
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The functional block diagram is shown below:
5959
| [Jingcai](./docs/board/board_jingcai.md) | ESP32-4848S040C_I_Y_3 |
6060
| [Waveshare](./docs/board/board_waveshare.md) | ESP32-S3-Touch-LCD-1.85, ESP32-S3-Touch-LCD-2.1, ESP32-S3-Touch-LCD-2.8C, ESP32-S3-Touch-LCD-4.3, ESP32-S3-Touch-LCD-4.3B, ESP32-S3-Touch-LCD-5, ESP32-S3-Touch-LCD-5B, ESP32-S3-Touch-LCD-7, ESP32-P4-NANO |
6161
| [VIEWE](./docs/board/board_viewe.md) | UEDX24320024E-WB-A, UEDX24320028E-WB-A, UEDX24320035E-WB-A, UEDX32480035E-WB-A, UEDX48270043E-WB-A, UEDX48480040E-WB-A, UEDX80480043E-WB-A, UEDX80480050E-WB-A, UEDX80480070E-WB-A |
62+
| Wireless-Tag | WTP4C5MP07S |
6263

6364
📌 Click on the manufacturer name for detailed information.
6465

esp_panel_board_supported_conf.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@
164164
// #define BOARD_VIEWE_UEDX80480050E_WB_A_2
165165
// #define BOARD_VIEWE_UEDX80480070E_WB_A
166166

167+
/*
168+
* Wireless-Tag (https://www.wireless-tag.com/):
169+
*
170+
* -BOARD_WIRELESSTAG_WTP4C5MP07S (WTP4C5MP07S): https://shop.wireless-tag.com/products/7inch-lcd-touch-screen-1024x600-mipi-smart-displays-wtp4c5mp07s-esp32-lcd-board-used-with-esp32-p4-and-esp32-c5-dev-board
171+
*/
172+
// #define BOARD_WIRELESSTAG_WTP4C5MP07S
173+
167174
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
168175
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
169176
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

examples/arduino/board/board_static_config/esp_panel_board_supported_conf.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@
164164
// #define BOARD_VIEWE_UEDX80480050E_WB_A_2
165165
// #define BOARD_VIEWE_UEDX80480070E_WB_A
166166

167+
/*
168+
* Wireless-Tag (https://www.wireless-tag.com/):
169+
*
170+
* -BOARD_WIRELESSTAG_WTP4C5MP07S (WTP4C5MP07S): https://shop.wireless-tag.com/products/7inch-lcd-touch-screen-1024x600-mipi-smart-displays-wtp4c5mp07s-esp32-lcd-board-used-with-esp32-p4-and-esp32-c5-dev-board
171+
*/
172+
// #define BOARD_WIRELESSTAG_WTP4C5MP07S
173+
167174
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
168175
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
169176
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

src/board/supported/Kconfig.board_supported

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ choice
3636
bool "VIEWE"
3737
help
3838
https://viewedisplay.com/
39+
40+
config ESP_PANEL_BOARD_MANUFACTURER_WIRELESSTAG
41+
bool "Wireless-Tag"
42+
help
43+
https://www.wireless-tag.com/
3944
endchoice
4045

4146
choice
@@ -64,4 +69,8 @@ choice
6469
if ESP_PANEL_BOARD_MANUFACTURER_VIEWE || ESP_PANEL_BOARD_MANUFACTURER_ALL
6570
orsource "./viewe/Kconfig.viewe"
6671
endif
72+
73+
if ESP_PANEL_BOARD_MANUFACTURER_WIRELESSTAG || ESP_PANEL_BOARD_MANUFACTURER_ALL
74+
orsource "./wirelesstag/Kconfig.wirelesstag"
75+
endif
6776
endchoice

src/board/supported/esp_panel_board_config_supported.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@
120120
+ defined(BOARD_VIEWE_UEDX80480050E_WB_A_2) \
121121
+ defined(BOARD_VIEWE_UEDX80480050E_AC_A) \
122122
+ defined(BOARD_VIEWE_UEDX80480070E_WB_A) \
123+
/* Wireless-Tag */ \
124+
+ defined(BOARD_WIRELESSTAG_WTP4C5MP07S) \
123125
> 1
124126
#error "Multiple boards enabled! Please check file `esp_panel_board_supported_conf.h` and make sure only one board is enabled."
125127
#endif
@@ -225,6 +227,9 @@
225227
#include "viewe/BOARD_VIEWE_UEDX80480050E_AC_A.h"
226228
#elif defined(BOARD_VIEWE_UEDX80480070E_WB_A)
227229
#include "viewe/BOARD_VIEWE_UEDX80480070E_WB_A.h"
230+
/* Wireless-Tag */
231+
#elif defined(BOARD_WIRELESSTAG_WTP4C5MP07S)
232+
#include "wirelesstag/BOARD_WIRELESSTAG_WTP4C5MP07S.h"
228233
#else
229234
#error "Unknown board selected!"
230235
#endif

src/board/supported/esp_panel_board_kconfig_supported.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,11 @@
273273
#endif
274274
#endif
275275

276+
// Wireless-Tag
277+
#ifndef BOARD_WIRELESSTAG_WTP4C5MP07S
278+
#ifdef CONFIG_BOARD_WIRELESSTAG_WTP4C5MP07S
279+
#define BOARD_WIRELESSTAG_WTP4C5MP07S CONFIG_BOARD_WIRELESSTAG_WTP4C5MP07S
280+
#endif
281+
#endif
282+
276283
// *INDENT-ON*
Lines changed: 284 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/**
7+
* @file BOARD_WIRELESSTAG_WTP4C5MP07S.h
8+
* @brief Configuration file for Wireless-Tag WTP4C5MP07S
9+
* @author @lyusupov
10+
* @link https://shop.wireless-tag.com/products/7inch-lcd-touch-screen-1024x600-mipi-smart-displays-wtp4c5mp07s-esp32-lcd-board-used-with-esp32-p4-and-esp32-c5-dev-board
11+
*/
12+
13+
#pragma once
14+
15+
// *INDENT-OFF*
16+
17+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
18+
//////////////////////////// Please update the following macros to configure general panel /////////////////////////////
19+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20+
/**
21+
* @brief Board name
22+
*/
23+
#define ESP_PANEL_BOARD_NAME "Wireless-Tag:WTP4C5MP07S"
24+
25+
/**
26+
* @brief Panel resolution configuration in pixels
27+
*/
28+
#define ESP_PANEL_BOARD_WIDTH (1024) // Panel width (horizontal, in pixels)
29+
#define ESP_PANEL_BOARD_HEIGHT (600) // Panel height (vertical, in pixels)
30+
31+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
32+
//////////////////////////// Please update the following macros to configure the LCD panel /////////////////////////////
33+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
34+
/**
35+
* @brief LCD panel configuration flag (0/1)
36+
*
37+
* Set to `1` to enable LCD panel support, `0` to disable
38+
*/
39+
#define ESP_PANEL_BOARD_USE_LCD (1)
40+
41+
#if ESP_PANEL_BOARD_USE_LCD
42+
/**
43+
* @brief LCD controller selection
44+
*/
45+
#define ESP_PANEL_BOARD_LCD_CONTROLLER EK79007
46+
47+
/**
48+
* @brief LCD bus type selection
49+
*/
50+
#define ESP_PANEL_BOARD_LCD_BUS_TYPE (ESP_PANEL_BUS_TYPE_MIPI_DSI)
51+
52+
/**
53+
* @brief LCD bus parameters configuration
54+
*
55+
* Configure parameters based on the selected bus type. Parameters for other bus types will be ignored.
56+
* For detailed parameter explanations, see:
57+
* https://docs.espressif.com/projects/esp-idf/en/v5.3.1/esp32s3/api-reference/peripherals/lcd/index.html
58+
* https://docs.espressif.com/projects/esp-iot-solution/en/latest/display/lcd/index.html
59+
*/
60+
#if ESP_PANEL_BOARD_LCD_BUS_TYPE == ESP_PANEL_BUS_TYPE_MIPI_DSI
61+
62+
/**
63+
* @brief MIPI DSI bus
64+
*/
65+
/* For host */
66+
#define ESP_PANEL_BOARD_LCD_MIPI_DSI_LANE_NUM (2) // ESP32-P4 supports 1 or 2 lanes
67+
#define ESP_PANEL_BOARD_LCD_MIPI_DSI_LANE_RATE_MBPS (1000) // Single lane bit rate, should check the LCD drive IC
68+
// datasheet for the supported lane rate. Different
69+
// color format (RGB565/RGB888) may have different
70+
// lane bit rate requirements.
71+
// ESP32-P4 supports max 1500Mbps
72+
/* For refresh panel (DPI) */
73+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_CLK_MHZ (52)
74+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_PIXEL_BITS (ESP_PANEL_LCD_COLOR_BITS_RGB565)
75+
// ESP_PANEL_LCD_COLOR_BITS_RGB565/RGB666/RGB888
76+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_HPW (10)
77+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_HBP (160)
78+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_HFP (160)
79+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_VPW (1)
80+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_VBP (23)
81+
#define ESP_PANEL_BOARD_LCD_MIPI_DPI_VFP (12)
82+
/* For DSI power PHY */
83+
#define ESP_PANEL_BOARD_LCD_MIPI_PHY_LDO_ID (3) // -1 if not used.
84+
85+
#endif // ESP_PANEL_BOARD_LCD_BUS_TYPE
86+
87+
/**
88+
* @brief LCD vendor initialization commands
89+
*
90+
* Vendor specific initialization can be different between manufacturers, should consult the LCD supplier for
91+
* initialization sequence code. Please uncomment and change the following macro definitions. Otherwise, the LCD driver
92+
* will use the default initialization sequence code.
93+
*
94+
* The initialization sequence can be specified in two formats:
95+
* 1. Raw format:
96+
* {command, (uint8_t []){data0, data1, ...}, data_size, delay_ms}
97+
* 2. Helper macros:
98+
* - ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(delay_ms, command, {data0, data1, ...})
99+
* - ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(delay_ms, command)
100+
*/
101+
/*
102+
#define ESP_PANEL_BOARD_LCD_VENDOR_INIT_CMD() \
103+
{ \
104+
{0xFF, (uint8_t []){0x77, 0x01, 0x00, 0x00, 0x10}, 5, 0}, \
105+
{0xC0, (uint8_t []){0x3B, 0x00}, 2, 0}, \
106+
{0xC1, (uint8_t []){0x0D, 0x02}, 2, 0}, \
107+
{0x29, (uint8_t []){0x00}, 0, 120}, \
108+
or
109+
ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xFF, {0x77, 0x01, 0x00, 0x00, 0x10}), \
110+
ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC0, {0x3B, 0x00}), \
111+
ESP_PANEL_LCD_CMD_WITH_8BIT_PARAM(0, 0xC1, {0x0D, 0x02}), \
112+
ESP_PANEL_LCD_CMD_WITH_NONE_PARAM(120, 0x29), \
113+
}
114+
*/
115+
116+
/**
117+
* @brief LCD color configuration
118+
*/
119+
#define ESP_PANEL_BOARD_LCD_COLOR_BITS (ESP_PANEL_LCD_COLOR_BITS_RGB565)
120+
// ESP_PANEL_LCD_COLOR_BITS_RGB565/RGB666/RGB888
121+
#define ESP_PANEL_BOARD_LCD_COLOR_BGR_ORDER (0) // 0: RGB, 1: BGR
122+
#define ESP_PANEL_BOARD_LCD_COLOR_INEVRT_BIT (0) // 0/1
123+
124+
/**
125+
* @brief LCD transformation configuration
126+
*/
127+
#define ESP_PANEL_BOARD_LCD_SWAP_XY (0) // 0/1
128+
#define ESP_PANEL_BOARD_LCD_MIRROR_X (0) // 0/1
129+
#define ESP_PANEL_BOARD_LCD_MIRROR_Y (0) // 0/1
130+
#define ESP_PANEL_BOARD_LCD_GAP_X (0) // [0, ESP_PANEL_BOARD_WIDTH]
131+
#define ESP_PANEL_BOARD_LCD_GAP_Y (0) // [0, ESP_PANEL_BOARD_HEIGHT]
132+
133+
/**
134+
* @brief LCD reset pin configuration
135+
*/
136+
#define ESP_PANEL_BOARD_LCD_RST_IO (23) // Reset pin, -1 if not used
137+
#define ESP_PANEL_BOARD_LCD_RST_LEVEL (1) // Reset active level, 0: low, 1: high
138+
139+
#endif // ESP_PANEL_BOARD_USE_LCD
140+
141+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
142+
//////////////////////////// Please update the following macros to configure the touch panel ///////////////////////////
143+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
144+
/**
145+
* @brief Touch panel configuration flag (0/1)
146+
*
147+
* Set to `1` to enable touch panel support, `0` to disable
148+
*/
149+
#define ESP_PANEL_BOARD_USE_TOUCH (1)
150+
151+
#if ESP_PANEL_BOARD_USE_TOUCH
152+
/**
153+
* @brief Touch controller selection
154+
*/
155+
#define ESP_PANEL_BOARD_TOUCH_CONTROLLER GT911
156+
157+
/**
158+
* @brief Touch bus type selection
159+
*/
160+
#define ESP_PANEL_BOARD_TOUCH_BUS_TYPE (ESP_PANEL_BUS_TYPE_I2C)
161+
162+
#if (ESP_PANEL_BOARD_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C) || \
163+
(ESP_PANEL_BOARD_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_SPI)
164+
/**
165+
* If set to 1, the bus will skip to initialize the corresponding host. Users need to initialize the host in advance.
166+
*
167+
* For drivers which created by this library, even if they use the same host, the host will be initialized only once.
168+
* So it is not necessary to set the macro to `1`. For other drivers (like `Wire`), please set the macro to `1`
169+
* ensure that the host is initialized only once.
170+
*/
171+
#define ESP_PANEL_BOARD_TOUCH_BUS_SKIP_INIT_HOST (0) // 0/1. Typically set to 0
172+
#endif
173+
174+
/**
175+
* @brief Touch bus parameters configuration
176+
*/
177+
#if ESP_PANEL_BOARD_TOUCH_BUS_TYPE == ESP_PANEL_BUS_TYPE_I2C
178+
179+
/**
180+
* @brief I2C bus
181+
*/
182+
/* For general */
183+
#define ESP_PANEL_BOARD_TOUCH_I2C_HOST_ID (0) // Typically set to 0
184+
#if !ESP_PANEL_BOARD_TOUCH_BUS_SKIP_INIT_HOST
185+
/* For host */
186+
#define ESP_PANEL_BOARD_TOUCH_I2C_CLK_HZ (400 * 1000)
187+
// Typically set to 400K
188+
#define ESP_PANEL_BOARD_TOUCH_I2C_SCL_PULLUP (0) // 0/1. Typically set to 1
189+
#define ESP_PANEL_BOARD_TOUCH_I2C_SDA_PULLUP (0) // 0/1. Typically set to 1
190+
#define ESP_PANEL_BOARD_TOUCH_I2C_IO_SCL (8)
191+
#define ESP_PANEL_BOARD_TOUCH_I2C_IO_SDA (7)
192+
#endif
193+
/* For panel */
194+
#define ESP_PANEL_BOARD_TOUCH_I2C_ADDRESS (0) // Typically set to 0 to use the default address.
195+
// - For touchs with only one address, set to 0
196+
// - For touchs with multiple addresses, set to 0 or
197+
// the address. Like GT911, there are two addresses:
198+
// 0x5D(default) and 0x14
199+
200+
#endif // ESP_PANEL_BOARD_TOUCH_BUS_TYPE
201+
202+
/**
203+
* @brief Touch panel transformation flags
204+
*/
205+
#define ESP_PANEL_BOARD_TOUCH_SWAP_XY (0) // 0/1
206+
#define ESP_PANEL_BOARD_TOUCH_MIRROR_X (1) // 0/1
207+
#define ESP_PANEL_BOARD_TOUCH_MIRROR_Y (1) // 0/1
208+
209+
/**
210+
* @brief Touch panel control pins
211+
*/
212+
#define ESP_PANEL_BOARD_TOUCH_RST_IO (-1) // Reset pin, -1 if not used
213+
#define ESP_PANEL_BOARD_TOUCH_RST_LEVEL (1) // Reset active level, 0: low, 1: high
214+
#define ESP_PANEL_BOARD_TOUCH_INT_IO (21) // Interrupt pin, -1 if not used
215+
#define ESP_PANEL_BOARD_TOUCH_INT_LEVEL (0) // Interrupt active level, 0: low, 1: high
216+
217+
#endif // ESP_PANEL_BOARD_USE_TOUCH
218+
219+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
220+
///////////////////////////// Please update the following macros to configure the backlight ////////////////////////////
221+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
222+
/**
223+
* @brief Backlight configuration flag (0/1)
224+
*
225+
* Set to `1` to enable backlight support, `0` to disable
226+
*/
227+
#define ESP_PANEL_BOARD_USE_BACKLIGHT (1)
228+
229+
#if ESP_PANEL_BOARD_USE_BACKLIGHT
230+
/**
231+
* @brief Backlight control type selection
232+
*/
233+
#define ESP_PANEL_BOARD_BACKLIGHT_TYPE (ESP_PANEL_BACKLIGHT_TYPE_SWITCH_GPIO)
234+
235+
#if (ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_SWITCH_GPIO) || \
236+
(ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_SWITCH_EXPANDER) || \
237+
(ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC)
238+
239+
/**
240+
* @brief Backlight control pin configuration
241+
*/
242+
#define ESP_PANEL_BOARD_BACKLIGHT_IO (20) // Output GPIO pin number
243+
#define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high
244+
245+
#endif // ESP_PANEL_BOARD_BACKLIGHT_TYPE
246+
247+
/**
248+
* @brief Backlight idle state configuration (0/1)
249+
*
250+
* Set to 1 if want to turn off the backlight after initializing. Otherwise, the backlight will be on.
251+
*/
252+
#define ESP_PANEL_BOARD_BACKLIGHT_IDLE_OFF (0)
253+
254+
#endif // ESP_PANEL_BOARD_USE_BACKLIGHT
255+
256+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
257+
///////////////////////////// Please update the following macros to configure the IO expander //////////////////////////
258+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
259+
/**
260+
* @brief IO expander configuration flag (0/1)
261+
*
262+
* Set to `1` to enable IO expander support, `0` to disable
263+
*/
264+
#define ESP_PANEL_BOARD_USE_EXPANDER (0)
265+
266+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
267+
/////////////////////// Please utilize the following macros to execute any additional code if required /////////////////
268+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
269+
270+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
271+
/////////////////////////////////////////////// File Version ///////////////////////////////////////////////////////////
272+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
273+
/**
274+
* Do not change the following versions. These version numbers are used to check compatibility between this
275+
* configuration file and the library. Rules for version numbers:
276+
* 1. Major version mismatch: Configurations are incompatible, must use library version
277+
* 2. Minor version mismatch: May be missing new configurations, recommended to update
278+
* 3. Patch version mismatch: No impact on functionality
279+
*/
280+
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1
281+
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1
282+
#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0
283+
284+
// *INDENT-ON*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config BOARD_WIRELESSTAG_WTP4C5MP07S
2+
bool "Wireless-Tag WTP4C5MP07S (with 7-inch 1024x600 LCD)"
3+
help
4+
https://shop.wireless-tag.com/products/7inch-lcd-touch-screen-1024x600-mipi-smart-displays-wtp4c5mp07s-esp32-lcd-board-used-with-esp32-p4-and-esp32-c5-dev-board

0 commit comments

Comments
 (0)