Skip to content

Commit 5def863

Browse files
committed
feat(mipi-dsi): Updated MIPI-DSI structs for IDF6
1 parent 0cf0dc9 commit 5def863

File tree

8 files changed

+67
-39
lines changed

8 files changed

+67
-39
lines changed

bsp/esp32_p4_function_ev_board/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ This BSP supports HDMI converter Lontium LT8912B. Follow these rules for using i
5858
<div align="center">
5959
<!-- START_DEPENDENCIES -->
6060

61-
| Available | Capability | Controller/Codec | Component | Version |
62-
|------------------|------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
63-
|:heavy_check_mark:| :pager: DISPLAY |ek79007, ili9881c, lt8912b|idf<br/>[espressif/esp_lcd_ek79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007)<br/>[espressif/esp_lcd_ili9881c](https://components.espressif.com/components/espressif/esp_lcd_ili9881c)<br/>[espressif/esp_lcd_lt8912b](https://components.espressif.com/components/espressif/esp_lcd_lt8912b)|>=5.4<br/>1.*<br/>1.*<br/>>=0.1.1,<1.0.0|
64-
|:heavy_check_mark:|:black_circle: LVGL_PORT| | [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
65-
|:heavy_check_mark:| :point_up: TOUCH | gt911 | [espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911) | ^1 |
66-
| :x: | :radio_button: BUTTONS | | | |
67-
|:heavy_check_mark:| :musical_note: AUDIO | | [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ~1.5 |
68-
|:heavy_check_mark:| :speaker: AUDIO_SPEAKER| es8311 | | |
69-
|:heavy_check_mark:| :microphone: AUDIO_MIC | es8311 | | |
70-
|:heavy_check_mark:| :floppy_disk: SDCARD | | idf | >=5.4 |
71-
| :x: | :video_game: IMU | | | |
72-
|:heavy_check_mark:| :camera: CAMERA | OV5647, SC2336 | | |
61+
| Available | Capability | Controller/Codec | Component | Version |
62+
|------------------|------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
63+
|:heavy_check_mark:| :pager: DISPLAY |ek79007, ili9881c, lt8912b|idf<br/>[espressif/esp_lcd_ek79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007)<br/>[espressif/esp_lcd_ili9881c](https://components.espressif.com/components/espressif/esp_lcd_ili9881c)<br/>[espressif/esp_lcd_lt8912b](https://components.espressif.com/components/espressif/esp_lcd_lt8912b)|>=5.4<br/>>=2.0.1,<3.0.0<br/>>=1.0.3,<2.0.0<br/>>=0.1.3,<1.0.0|
64+
|:heavy_check_mark:|:black_circle: LVGL_PORT| | [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
65+
|:heavy_check_mark:| :point_up: TOUCH | gt911 | [espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911) | ^1 |
66+
| :x: | :radio_button: BUTTONS | | | |
67+
|:heavy_check_mark:| :musical_note: AUDIO | | [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ~1.5 |
68+
|:heavy_check_mark:| :speaker: AUDIO_SPEAKER| es8311 | | |
69+
|:heavy_check_mark:| :microphone: AUDIO_MIC | es8311 | | |
70+
|:heavy_check_mark:| :floppy_disk: SDCARD | | idf | >=5.4 |
71+
| :x: | :video_game: IMU | | | |
72+
|:heavy_check_mark:| :camera: CAMERA | OV5647, SC2336 | | |
7373

7474
<!-- END_DEPENDENCIES -->
7575
</div>
@@ -122,4 +122,4 @@ This BSP supports HDMI converter Lontium LT8912B. Follow these rules for using i
122122

123123

124124

125-
<!-- END_BENCHMARK -->
125+
<!-- END_BENCHMARK -->

bsp/esp32_p4_function_ev_board/esp32_p4_function_ev_board.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,9 @@ esp_err_t bsp_display_new_with_handles(const bsp_display_config_t *config, bsp_l
600600
ESP_LOGI(TAG, "Install EK79007 LCD control panel");
601601

602602
#if CONFIG_BSP_LCD_COLOR_FORMAT_RGB888
603-
esp_lcd_dpi_panel_config_t dpi_config = EK79007_1024_600_PANEL_60HZ_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB888);
603+
esp_lcd_dpi_panel_config_t dpi_config = EK79007_1024_600_PANEL_60HZ_CONFIG_CF(LCD_COLOR_FMT_RGB888);
604604
#else
605-
esp_lcd_dpi_panel_config_t dpi_config = EK79007_1024_600_PANEL_60HZ_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB565);
605+
esp_lcd_dpi_panel_config_t dpi_config = EK79007_1024_600_PANEL_60HZ_CONFIG_CF(LCD_COLOR_FMT_RGB565);
606606
#endif
607607
dpi_config.num_fbs = CONFIG_BSP_LCD_DPI_BUFFER_NUMS;
608608

@@ -625,9 +625,9 @@ esp_err_t bsp_display_new_with_handles(const bsp_display_config_t *config, bsp_l
625625
// create ILI9881C control panel
626626
ESP_LOGI(TAG, "Install ILI9881C LCD control panel");
627627
#if CONFIG_BSP_LCD_COLOR_FORMAT_RGB888
628-
esp_lcd_dpi_panel_config_t dpi_config = ILI9881C_800_1280_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB888);
628+
esp_lcd_dpi_panel_config_t dpi_config = ILI9881C_800_1280_PANEL_60HZ_DPI_CONFIG_CF(LCD_COLOR_FMT_RGB888);
629629
#else
630-
esp_lcd_dpi_panel_config_t dpi_config = ILI9881C_800_1280_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB565);
630+
esp_lcd_dpi_panel_config_t dpi_config = ILI9881C_800_1280_PANEL_60HZ_DPI_CONFIG_CF(LCD_COLOR_FMT_RGB565);
631631
#endif
632632
dpi_config.num_fbs = CONFIG_BSP_LCD_DPI_BUFFER_NUMS;
633633

@@ -977,6 +977,7 @@ lv_display_t *bsp_display_start(void)
977977
.hdmi_resolution = BSP_HDMI_RES_NONE,
978978
#endif
979979
.dsi_bus = {
980+
.phy_clk_src = MIPI_DSI_PHY_CLK_SRC_DEFAULT,
980981
.lane_bit_rate_mbps = BSP_LCD_MIPI_DSI_LANE_BITRATE_MBPS,
981982
}
982983
},

bsp/esp32_p4_function_ev_board/idf_component.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ tags:
1111
dependencies:
1212
idf: ">=5.4"
1313
lvgl/lvgl: ">=8,<10"
14-
esp_lcd_ek79007: "1.*"
14+
esp_lcd_ek79007: ">=2.0.1,<3.0.0"
1515

16-
esp_lcd_ili9881c:
17-
version: "1.*"
16+
esp_lcd_ili9881c:
17+
version: ">=1.0.3,<2.0.0"
1818
override_path: "../../components/lcd/esp_lcd_ili9881c"
19-
esp_lcd_touch_gt911:
19+
esp_lcd_touch_gt911:
2020
version: "^1"
2121
override_path: "../../components/lcd_touch/esp_lcd_touch_gt911"
2222

@@ -25,14 +25,14 @@ dependencies:
2525
public: true
2626
override_path: "../../components/esp_lvgl_port"
2727

28+
espressif/esp_lcd_lt8912b:
29+
version: ">=0.1.3,<1.0.0"
30+
override_path: "../../components/lcd/esp_lcd_lt8912b"
31+
2832
esp_codec_dev:
2933
version: "~1.5"
3034
public: true
3135

32-
espressif/esp_lcd_lt8912b:
33-
version: ">=0.1.1,<1.0.0"
34-
override_path: "../../components/lcd/esp_lcd_lt8912b"
35-
3636
esp_video:
3737
version: "~1.3"
3838
public: true

components/lcd/esp_lcd_ili9881c/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.2"
1+
version: "1.0.3"
22
targets:
33
- esp32p4
44
description: ESP LCD ILI9881C (MIPI DSI)

components/lcd/esp_lcd_ili9881c/include/esp_lcd_ili9881c.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -118,6 +118,35 @@ esp_err_t esp_lcd_new_panel_ili9881c(const esp_lcd_panel_io_handle_t io, const e
118118
}, \
119119
.flags.use_dma2d = true, \
120120
}
121+
122+
/**
123+
* @brief MIPI DPI configuration structure
124+
*
125+
* @note refresh_rate = (dpi_clock_freq_mhz * 1000000) / (h_res + hsync_pulse_width + hsync_back_porch + hsync_front_porch)
126+
* / (v_res + vsync_pulse_width + vsync_back_porch + vsync_front_porch)
127+
*
128+
* @param[in] color_format Input color format of the panel
129+
*
130+
*/
131+
#define ILI9881C_800_1280_PANEL_60HZ_DPI_CONFIG_CF(color_format) \
132+
{ \
133+
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
134+
.dpi_clock_freq_mhz = 80, \
135+
.virtual_channel = 0, \
136+
.in_color_format = color_format, \
137+
.num_fbs = 1, \
138+
.video_timing = { \
139+
.h_size = 800, \
140+
.v_size = 1280, \
141+
.hsync_back_porch = 140, \
142+
.hsync_pulse_width = 40, \
143+
.hsync_front_porch = 40, \
144+
.vsync_back_porch = 16, \
145+
.vsync_pulse_width = 4, \
146+
.vsync_front_porch = 16, \
147+
}, \
148+
.flags.use_dma2d = true, \
149+
}
121150
#endif
122151

123152
#ifdef __cplusplus

components/lcd/esp_lcd_ili9881c/test_apps/main/test_esp_lcd_ili9881c.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -36,11 +36,9 @@
3636
#define TEST_MIPI_DSI_LANE_NUM (2)
3737

3838
#if TEST_LCD_BIT_PER_PIXEL == 24
39-
#define TEST_MIPI_DPI_PX_FORMAT (LCD_COLOR_PIXEL_FORMAT_RGB888)
40-
#elif TEST_LCD_BIT_PER_PIXEL == 18
41-
#define TEST_MIPI_DPI_PX_FORMAT (LCD_COLOR_PIXEL_FORMAT_RGB666)
39+
#define TEST_MIPI_DPI_PX_FORMAT (LCD_COLOR_FMT_RGB888)
4240
#elif TEST_LCD_BIT_PER_PIXEL == 16
43-
#define TEST_MIPI_DPI_PX_FORMAT (LCD_COLOR_PIXEL_FORMAT_RGB565)
41+
#define TEST_MIPI_DPI_PX_FORMAT (LCD_COLOR_FMT_RGB565)
4442
#endif
4543

4644
#define TEST_DELAY_TIME_MS (3000)

components/lcd/esp_lcd_lt8912b/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "0.1.2"
1+
version: "0.1.3"
22
description: ESP LCD LT8912B (MIPI DSI - HDMI)
33
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd/esp_lcd_lt8912b
44
repository: "https://github.com/espressif/esp-bsp.git"

components/lcd/esp_lcd_lt8912b/include/esp_lcd_lt8912b.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ bool esp_lcd_panel_lt8912b_is_ready(esp_lcd_panel_t *panel);
158158
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
159159
.dpi_clock_freq_mhz = 40, \
160160
.virtual_channel = 0, \
161-
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
161+
.in_color_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
162162
.num_fbs = NUM_FBS, \
163163
.video_timing = { \
164164
.h_size = 800, \
@@ -203,7 +203,7 @@ bool esp_lcd_panel_lt8912b_is_ready(esp_lcd_panel_t *panel);
203203
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
204204
.dpi_clock_freq_mhz = 56, \
205205
.virtual_channel = 0, \
206-
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
206+
.in_color_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
207207
.num_fbs = NUM_FBS, \
208208
.video_timing = { \
209209
.h_size = 1024, \
@@ -248,7 +248,7 @@ bool esp_lcd_panel_lt8912b_is_ready(esp_lcd_panel_t *panel);
248248
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
249249
.dpi_clock_freq_mhz = 64, \
250250
.virtual_channel = 0, \
251-
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
251+
.in_color_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
252252
.num_fbs = NUM_FBS, \
253253
.video_timing = { \
254254
.h_size = 1280, \
@@ -293,7 +293,7 @@ bool esp_lcd_panel_lt8912b_is_ready(esp_lcd_panel_t *panel);
293293
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
294294
.dpi_clock_freq_mhz = 70, \
295295
.virtual_channel = 0, \
296-
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
296+
.in_color_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
297297
.num_fbs = NUM_FBS, \
298298
.video_timing = { \
299299
.h_size = 1280, \
@@ -338,7 +338,7 @@ bool esp_lcd_panel_lt8912b_is_ready(esp_lcd_panel_t *panel);
338338
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
339339
.dpi_clock_freq_mhz = 70, \
340340
.virtual_channel = 0, \
341-
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
341+
.in_color_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
342342
.num_fbs = NUM_FBS, \
343343
.video_timing = { \
344344
.h_size = 1920, \
@@ -386,7 +386,7 @@ bool esp_lcd_panel_lt8912b_is_ready(esp_lcd_panel_t *panel);
386386
.dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, \
387387
.dpi_clock_freq_mhz = 120, \
388388
.virtual_channel = 0, \
389-
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
389+
.in_color_format = LCD_COLOR_PIXEL_FORMAT_RGB888, \
390390
.num_fbs = NUM_FBS, \
391391
.video_timing = { \
392392
.h_size = 1920, \

0 commit comments

Comments
 (0)