Skip to content

Commit 4854bda

Browse files
authored
add support for Wireless-Tag WTP4C5MP07S ESP32P4 board + 7 inch MIPI DSI LCD display combo (#1281)
* add support for Wireless-Tag WTP4C5MP07S ESP32P4 + 7 inch MIPI DSI LCD display combo * a minor update of README * update of the device name/folder * exclude USE_DEVICE_AEC from the options list
1 parent 1ccd510 commit 4854bda

File tree

6 files changed

+469
-0
lines changed

6 files changed

+469
-0
lines changed

main/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ elseif(CONFIG_BOARD_TYPE_YUNLIAO_S3)
509509
set(BUILTIN_TEXT_FONT font_puhui_basic_20_4)
510510
set(BUILTIN_ICON_FONT font_awesome_20_4)
511511
set(DEFAULT_EMOJI_COLLECTION twemoji_64)
512+
elseif(CONFIG_BOARD_TYPE_WTP4C5MP07S)
513+
set(BOARD_TYPE "wireless-tag-wtp4c5mp07s")
514+
set(BUILTIN_TEXT_FONT font_puhui_basic_30_4)
515+
set(BUILTIN_ICON_FONT font_awesome_30_4)
516+
set(DEFAULT_EMOJI_COLLECTION twemoji_64)
512517
endif()
513518

514519
file(GLOB BOARD_SOURCES

main/Kconfig.projbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ choice BOARD_TYPE
386386
config BOARD_TYPE_YUNLIAO_S3
387387
bool "小智云聊-S3"
388388
depends on IDF_TARGET_ESP32S3
389+
config BOARD_TYPE_WTP4C5MP07S
390+
bool "Wireless-Tag WTP4C5MP07S"
391+
depends on IDF_TARGET_ESP32P4
389392
endchoice
390393

391394
choice
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## Wireless-Tag WTP4C5MP07S
2+
3+
[Wireless-Tag 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) product is a combo of
4+
* [Wireless-Tag WT99P4C5-S1](https://en.wireless-tag.com/product-item-66.html) ESP32-P4 development board and
5+
* 7 inch 1024x600 ZX7D00C1060M002A MIPI DSI LCD display
6+
7+
<br>
8+
9+
## Configuration
10+
11+
### ESP32P4 Configuration
12+
13+
* Set the compilation target to ESP32P4
14+
15+
idf.py set-target esp32p4
16+
17+
* Open menuconfig
18+
19+
idf.py menuconfig
20+
21+
* Select the board
22+
23+
Xiaozhi Assistant -> Board Type -> Wireless-Tag WTP4C5MP07S
24+
25+
* Select PSRAM
26+
27+
Component config -> ESP PSRAM -> PSRAM config -> Try to allocate memories of WiFi and LWIP in SPIRAM firstly -> No
28+
29+
* Select Wi-Fi slave target
30+
31+
Component config -> Wi-Fi Remote -> choose slave target -> esp32c5
32+
33+
* Select Wi-Fi buffers
34+
35+
Component config -> Wi-Fi Remote -> Wi-Fi configuration -> Max number of WiFi static RX buffers -> 10
36+
Component config -> Wi-Fi Remote -> Wi-Fi configuration -> Max number of WiFi dynamic RX buffers -> 24
37+
Component config -> Wi-Fi Remote -> Wi-Fi configuration -> Max number of WiFi static TX buffers -> 10
38+
39+
* Build
40+
41+
idf.py build
42+
43+
### ESP32C5 Configuration
44+
45+
* Flash the slave example from the esp-hosted-mcu library for the target chip ESP32C5. The esp-hosted-mcu version must match the one used in the xiaozhi-esp32 library.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#ifndef _BOARD_CONFIG_H_
2+
#define _BOARD_CONFIG_H_
3+
4+
#include <driver/gpio.h>
5+
6+
#define AUDIO_INPUT_SAMPLE_RATE 24000
7+
#define AUDIO_OUTPUT_SAMPLE_RATE 24000
8+
9+
#define AUDIO_INPUT_REFERENCE true
10+
11+
#define AUDIO_I2S_GPIO_MCLK GPIO_NUM_13
12+
#define AUDIO_I2S_GPIO_WS GPIO_NUM_10
13+
#define AUDIO_I2S_GPIO_BCLK GPIO_NUM_12
14+
#define AUDIO_I2S_GPIO_DIN GPIO_NUM_11
15+
#define AUDIO_I2S_GPIO_DOUT GPIO_NUM_9
16+
17+
#define AUDIO_CODEC_PA_PIN GPIO_NUM_53
18+
#define AUDIO_CODEC_I2C_SDA_PIN GPIO_NUM_7
19+
#define AUDIO_CODEC_I2C_SCL_PIN GPIO_NUM_8
20+
#define AUDIO_CODEC_ES8311_ADDR ES8311_CODEC_DEFAULT_ADDR
21+
22+
#define BOOT_BUTTON_GPIO GPIO_NUM_35
23+
24+
#define DISPLAY_WIDTH 1024
25+
#define DISPLAY_HEIGHT 600
26+
27+
#define LCD_BIT_PER_PIXEL (16)
28+
#define PIN_NUM_LCD_RST GPIO_NUM_23
29+
30+
#define DELAY_TIME_MS (3000)
31+
#define LCD_MIPI_DSI_LANE_NUM (2) // 2 data lanes
32+
33+
#define MIPI_DSI_PHY_PWR_LDO_CHAN (3)
34+
#define MIPI_DSI_PHY_PWR_LDO_VOLTAGE_MV (2500)
35+
36+
#define DISPLAY_SWAP_XY false
37+
#define DISPLAY_MIRROR_X false
38+
#define DISPLAY_MIRROR_Y false
39+
40+
#define DISPLAY_OFFSET_X 0
41+
#define DISPLAY_OFFSET_Y 0
42+
43+
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_20
44+
#define DISPLAY_BACKLIGHT_OUTPUT_INVERT false
45+
46+
// SD Card configuration (disabled by default)
47+
// Enable one of the following by setting to 1 and set pins accordingly.
48+
// Note: SDMMC may conflict with ESP-Hosted SDIO. If using ESP-Hosted via SDIO,
49+
// prefer SDSPI mode for SD card or disable hosted SDIO.
50+
51+
// SDMMC 1-bit/4-bit mode
52+
#ifndef SDCARD_SDMMC_ENABLED
53+
#define SDCARD_SDMMC_ENABLED 0
54+
#endif
55+
// SDMMC bus width: set to 1 or 4
56+
#ifndef SDCARD_SDMMC_BUS_WIDTH
57+
// Use 4-bit bus width when enabling SDMMC
58+
#define SDCARD_SDMMC_BUS_WIDTH 4
59+
#endif
60+
// SDMMC pin assignments (set to actual pins when enabling SDMMC)
61+
#ifndef SDCARD_SDMMC_CLK_PIN
62+
#define SDCARD_SDMMC_CLK_PIN GPIO_NUM_43 // BSP_SD_CLK
63+
#endif
64+
#ifndef SDCARD_SDMMC_CMD_PIN
65+
#define SDCARD_SDMMC_CMD_PIN GPIO_NUM_44 // BSP_SD_CMD
66+
#endif
67+
#ifndef SDCARD_SDMMC_D0_PIN
68+
#define SDCARD_SDMMC_D0_PIN GPIO_NUM_39 // BSP_SD_D0
69+
#endif
70+
#ifndef SDCARD_SDMMC_D1_PIN
71+
#define SDCARD_SDMMC_D1_PIN GPIO_NUM_40 // BSP_SD_D1
72+
#endif
73+
#ifndef SDCARD_SDMMC_D2_PIN
74+
#define SDCARD_SDMMC_D2_PIN GPIO_NUM_41 // BSP_SD_D2
75+
#endif
76+
#ifndef SDCARD_SDMMC_D3_PIN
77+
#define SDCARD_SDMMC_D3_PIN GPIO_NUM_42 // BSP_SD_D3
78+
#endif
79+
80+
// SDSPI mode (uses SPI bus)
81+
#ifndef SDCARD_SDSPI_ENABLED
82+
#define SDCARD_SDSPI_ENABLED 1
83+
#endif
84+
#ifndef SDCARD_SPI_HOST
85+
#define SDCARD_SPI_HOST SPI3_HOST
86+
#endif
87+
#ifndef SDCARD_SPI_MOSI
88+
#define SDCARD_SPI_MOSI GPIO_NUM_44 // BSP_SD_SPI_MOSI
89+
#endif
90+
#ifndef SDCARD_SPI_MISO
91+
#define SDCARD_SPI_MISO GPIO_NUM_39 // BSP_SD_SPI_MISO
92+
#endif
93+
#ifndef SDCARD_SPI_SCLK
94+
#define SDCARD_SPI_SCLK GPIO_NUM_43 // BSP_SD_SPI_CLK
95+
#endif
96+
#ifndef SDCARD_SPI_CS
97+
#define SDCARD_SPI_CS GPIO_NUM_42 // BSP_SD_SPI_CS
98+
#endif
99+
100+
#ifndef SDCARD_MOUNT_POINT
101+
#define SDCARD_MOUNT_POINT "/sdcard"
102+
#endif
103+
104+
#endif // _BOARD_CONFIG_H_
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"target": "esp32p4",
3+
"builds": [
4+
{
5+
"name": "wireless-tag-wtp4c5mp07s",
6+
"sdkconfig_append": [
7+
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
8+
"CONFIG_SLAVE_IDF_TARGET_ESP32C5=y",
9+
"CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=n",
10+
"CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM=10",
11+
"CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM=24",
12+
"CONFIG_WIFI_RMT_STATIC_TX_BUFFER_NUM=10"
13+
]
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)