Skip to content

Commit 49f0937

Browse files
Merge pull request #96 from Y1hsiaochunnn/master
Update the new jd9365 driver
2 parents 1f1c88f + b9072a4 commit 49f0937

File tree

19 files changed

+2053
-33
lines changed

19 files changed

+2053
-33
lines changed

.github/workflows/upload_component.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ jobs:
1717
with:
1818
directories: >
1919
display/lcd/esp_lcd_jd9165;
20-
display/lcd/esp_lcd_jd9365_8;
21-
display/lcd/esp_lcd_jd9365_10_1;
20+
# display/lcd/esp_lcd_jd9365_8;
21+
# display/lcd/esp_lcd_jd9365_10_1;
22+
display/lcd/esp_lcd_jd9365;
2223
display/lcd/esp_lcd_hx8394;
2324
display/lcd/esp_lcd_dsi;
2425
display/lcd/esp_lcd_sh8601;

bsp/esp32_p4_nano/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ menu "Board Support Package(ESP32-P4)"
137137
bool "Waveshare 7-DSI-TOUCH-A Display"
138138
config BSP_LCD_TYPE_720_1280_5_INCH_A
139139
bool "Waveshare 5-DSI-TOUCH-A Display"
140+
config BSP_LCD_TYPE_720_1280_10_1_INCH_B
141+
bool "Waveshare 10.1-DSI-TOUCH-B Display"
142+
config BSP_LCD_TYPE_720_1280_9_INCH_B
143+
bool "Waveshare 9-DSI-TOUCH-B Display"
140144
config BSP_LCD_TYPE_480_640_2_8_INCH
141145
bool "Waveshare 2.8inch DSI LCD Display"
142146
config BSP_LCD_TYPE_800_800_3_4_INCH_C

bsp/esp32_p4_nano/README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Selection LCD display `Board Support Package(ESP32-P4) --> Display --> Select LC
1717
- Waveshare 8-DSI-TOUCH-A Display
1818
- Waveshare 7-DSI-TOUCH-A Display
1919
- Waveshare 5-DSI-Touch-A Display
20+
- Waveshare 10.1-DSI-Touch-B Display
21+
- Waveshare 9-DSI-Touch-B Display
2022
- Waveshare 2.8inch DSI LCD Display
2123
- Waveshare 3.4inch DSI LCD (C) Display
2224
- Waveshare 4inch DSI LCD (C) Display
@@ -44,13 +46,15 @@ Change MIPI DSI lane bitrate `Board Support Package(ESP32-P4) --> Display --> MI
4446

4547
### Recommended display screen
4648

47-
| Product ID | Dependency | tested |
48-
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|--------|
49-
| [10.1-DSI-TOUCH-A](https://www.waveshare.com/10.1-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/1/0/10.1-dsi-touch-a-1.jpg"> | [waveshare/esp_lcd_jd9365_10_1](display/lcd/esp_lcd_jd9365_10_1) ||
50-
| [101M-8001280-IPS-CT-K](https://www.waveshare.com/101m-8001280-ips-ct-k.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/1/0/101m-8001280-ips-ct-k-1.jpg"> | [waveshare/esp_lcd_jd9365_10_1](display/lcd/esp_lcd_jd9365_10_1) ||
51-
| [8-DSI-TOUCH-A](https://www.waveshare.com/8-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/8/-/8-dsi-touch-a-1.jpg"> | [waveshare/esp_lcd_jd9365_8](display/lcd/esp_lcd_ili9881c) ||
52-
| [7-DSI-TOUCH-A](https://www.waveshare.com/7-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/7/-/7-dsi-touch-a-1.jpg"> | [waveshare/esp_lcd_ili9881c](display/lcd/esp_lcd_ili9881c) ||
53-
| [5-DSI-TOUCH-A](https://www.waveshare.com/5-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/5/-/5-dsi-touch-a-1_1.jpg"> | [waveshare/esp_lcd_hx8394](display/lcd/esp_lcd_hx8394) ||
49+
| Product ID | Dependency | tested |
50+
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|--------|
51+
| [10.1-DSI-TOUCH-A](https://www.waveshare.com/10.1-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/1/0/10.1-dsi-touch-a-1.jpg"> | [~~waveshare/esp_lcd_jd9365_10_1~~](display/lcd/esp_lcd_jd9365_10_1)<br/>[waveshare/esp_lcd_jd9365](display/lcd/esp_lcd_jd9365) ||
52+
| [101M-8001280-IPS-CT-K](https://www.waveshare.com/101m-8001280-ips-ct-k.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/1/0/101m-8001280-ips-ct-k-1.jpg"> | [~~waveshare/esp_lcd_jd9365_10_1~~](display/lcd/esp_lcd_jd9365_10_1)<br/>[waveshare/esp_lcd_jd9365](display/lcd/esp_lcd_jd9365) ||
53+
| [8-DSI-TOUCH-A](https://www.waveshare.com/8-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/8/-/8-dsi-touch-a-1.jpg"> | [~~waveshare/esp_lcd_jd9365_8~~](display/lcd/esp_lcd_ili9881c)<br/>[waveshare/esp_lcd_jd9365](display/lcd/esp_lcd_jd9365) ||
54+
| [7-DSI-TOUCH-A](https://www.waveshare.com/7-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/7/-/7-dsi-touch-a-1.jpg"> | [waveshare/esp_lcd_ili9881c](display/lcd/esp_lcd_ili9881c) ||
55+
| [5-DSI-TOUCH-A](https://www.waveshare.com/5-dsi-touch-a.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/5/-/5-dsi-touch-a-1_1.jpg"> | [waveshare/esp_lcd_hx8394](display/lcd/esp_lcd_hx8394) ||
56+
| [10.1-DSI-TOUCH-B](https://www.waveshare.com/10.1-dsi-touch-b.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/8/-/8-dsi-touch-a-1.jpg"> | [waveshare/esp_lcd_jd9365](display/lcd/esp_lcd_jd9365) ||
57+
| [9-DSI-TOUCH-B](https://www.waveshare.com/9-dsi-touch-b.htm) <br/><img style="width: 150px; height: auto; display: block; margin: 0 auto;" src="https://www.waveshare.com/media/catalog/product/cache/1/image/800x800/9df78eab33525d08d6e5fb8d27136e95/8/-/8-dsi-touch-a-1.jpg"> | [waveshare/esp_lcd_jd9365](display/lcd/esp_lcd_jd9365) ||
5458

5559
### Common Raspberry adapter screen
5660

@@ -90,19 +94,20 @@ bsp_display_brightness_set(100);
9094
9195
<!-- Autogenerated start: Dependencies -->
9296
### Capabilities and dependencies
93-
| Capability | Available | Component | Version |
94-
|-------------|------------------|------------------------------------------------------------------------------------------------------------|---------|
95-
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_jd9365_10_1](https://components.espressif.com/components/waveshare/esp_lcd_jd9365_10_1) | 1.0.3 |
96-
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_jd9365_8](https://components.espressif.com/components/waveshare/esp_lcd_jd9365_8) | 1.0.4 |
97-
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_ili9881c](https://components.espressif.com/components/waveshare/esp_lcd_ili9881c) | 1.0.1 |
98-
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_hx8394](https://components.espressif.com/components/waveshare/esp_lcd_hx8394) | 1.0.2 |
99-
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_dsi](https://components.espressif.com/components/waveshare/esp_lcd_dsi) | 1.0.3 |
100-
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
97+
| Capability | Available | Component | Version |
98+
|-------------|------------------|----------------------------------------------------------------------------------------------------------|---------|
99+
| DISPLAY |:heavy_check_mark:| [~~waveshare/esp_lcd_jd9365_10_1~~](https://components.espressif.com/components/waveshare/esp_lcd_jd9365_10_1) | 1.0.3 |
100+
| DISPLAY |:heavy_check_mark:| [~~waveshare/esp_lcd_jd9365_8~~](https://components.espressif.com/components/waveshare/esp_lcd_jd9365_8) | 1.0.4 |
101+
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_jd9365](https://components.espressif.com/components/waveshare/esp_lcd_jd9365) | 1.0.3 |
102+
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_ili9881c](https://components.espressif.com/components/waveshare/esp_lcd_ili9881c) | 1.0.1 |
103+
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_hx8394](https://components.espressif.com/components/waveshare/esp_lcd_hx8394) | 1.0.2 |
104+
| DISPLAY |:heavy_check_mark:| [waveshare/esp_lcd_dsi](https://components.espressif.com/components/waveshare/esp_lcd_dsi) | 1.0.3 |
105+
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
101106
| TOUCH |:heavy_check_mark:| [espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911) | ^1 |
102-
| BUTTONS | :x: | | |
103-
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | 1.2.* |
104-
|AUDIO_SPEAKER|:heavy_check_mark:| | |
105-
| AUDIO_MIC |:heavy_check_mark:| | |
106-
| SDCARD |:heavy_check_mark:| idf | >=5.3 |
107-
| IMU | :x: | | |
107+
| BUTTONS | :x: | | |
108+
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | 1.2.* |
109+
|AUDIO_SPEAKER|:heavy_check_mark:| | |
110+
| AUDIO_MIC |:heavy_check_mark:| | |
111+
| SDCARD |:heavy_check_mark:| idf | >=5.3 |
112+
| IMU | :x: | | |
108113
<!-- Autogenerated end: Dependencies -->

bsp/esp32_p4_nano/esp32_p4_nano.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "usb/usb_host.h"
1313
#include "sd_pwr_ctrl_by_on_chip_ldo.h"
1414

15-
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH || CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_800_1280_8_INCH_A
15+
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH || CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_800_1280_8_INCH_A ||CONFIG_BSP_LCD_TYPE_720_1280_9_INCH_B || CONFIG_BSP_LCD_TYPE_720_1280_10_1_INCH_B
1616
#include "esp_lcd_jd9365.h"
1717
#elif CONFIG_BSP_LCD_TYPE_720_1280_7_INCH_A
1818
#include "esp_lcd_ili9881c.h"
@@ -337,7 +337,7 @@ esp_err_t bsp_display_brightness_set(int brightness_percent)
337337
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH
338338
uint8_t data_addr = 0x86;
339339
uint8_t data_to_send[2] = {data_addr, data};
340-
#elif CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_800_1280_8_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_7_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_5_INCH_A
340+
#elif CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_800_1280_8_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_7_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_5_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_9_INCH_B || CONFIG_BSP_LCD_TYPE_720_1280_10_1_INCH_B
341341
uint8_t data_addr = 0x96;
342342
uint8_t data_to_send[2] = {data_addr, data};
343343
#else
@@ -435,22 +435,28 @@ esp_err_t bsp_display_new_with_handles(const bsp_display_config_t *config, bsp_l
435435
ESP_GOTO_ON_ERROR(esp_lcd_new_panel_io_dbi(mipi_dsi_bus, &dbi_config, &io), err, TAG, "New panel IO failed");
436436

437437
esp_lcd_panel_handle_t disp_panel = NULL;
438-
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH || CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_800_1280_8_INCH_A
438+
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH || CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_800_1280_8_INCH_A ||CONFIG_BSP_LCD_TYPE_720_1280_9_INCH_B || CONFIG_BSP_LCD_TYPE_720_1280_10_1_INCH_B
439439
ESP_LOGI(TAG, "Install Waveshare LCD control panel");
440-
440+
#if CONFIG_BSP_LCD_TYPE_720_1280_9_INCH_B || CONFIG_BSP_LCD_TYPE_720_1280_10_1_INCH_B
441+
#if CONFIG_BSP_LCD_COLOR_FORMAT_RGB888
442+
esp_lcd_dpi_panel_config_t dpi_config = JD9365_720_1280_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB888);
443+
#else
444+
esp_lcd_dpi_panel_config_t dpi_config = JD9365_720_1280_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB565);
445+
#endif
446+
#else
441447
#if CONFIG_BSP_LCD_COLOR_FORMAT_RGB888
442448
esp_lcd_dpi_panel_config_t dpi_config = JD9365_800_1280_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB888);
443449
#else
444450
esp_lcd_dpi_panel_config_t dpi_config = JD9365_800_1280_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB565);
451+
#endif
445452
#endif
446453
dpi_config.num_fbs = CONFIG_BSP_LCD_DPI_BUFFER_NUMS;
447454

448455
jd9365_vendor_config_t vendor_config = {
449-
.init_cmds = lcd_init_cmds,
450-
.init_cmds_size = sizeof(lcd_init_cmds) / sizeof(lcd_init_cmds[0]),
451456
.mipi_config = {
452457
.dsi_bus = mipi_dsi_bus,
453458
.dpi_config = &dpi_config,
459+
.lane_num = 2,
454460
},
455461
};
456462
esp_lcd_panel_dev_config_t lcd_dev_config = {
@@ -659,7 +665,7 @@ esp_err_t bsp_touch_new(const bsp_touch_config_t *config, esp_lcd_touch_handle_t
659665
.interrupt = 0,
660666
},
661667
.flags = {
662-
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH || CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_7_INCH_A
668+
#if CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH || CONFIG_BSP_LCD_TYPE_800_1280_10_1_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_7_INCH_A || CONFIG_BSP_LCD_TYPE_720_1280_9_INCH_B || CONFIG_BSP_LCD_TYPE_720_1280_10_1_INCH_B
663669
.swap_xy = 0,
664670
.mirror_x = 1,
665671
.mirror_y = 1,

bsp/esp32_p4_nano/idf_component.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ dependencies:
88
version: ^2
99
idf: '>=5.3'
1010
lvgl/lvgl: '>=8,<10'
11-
waveshare/esp_lcd_jd9365_10_1: '*'
12-
waveshare/esp_lcd_jd9365_8: '*'
11+
# waveshare/esp_lcd_jd9365_10_1: '*'
12+
# waveshare/esp_lcd_jd9365_8: '*'
13+
waveshare/esp_lcd_jd9365: '*'
1314
waveshare/esp_lcd_ili9881c: '*'
1415
waveshare/esp_lcd_dsi: '*'
1516
waveshare/esp_lcd_hx8394: "^1.0.2"
@@ -24,4 +25,4 @@ tags:
2425
targets:
2526
- esp32p4
2627
url: https://www.waveshare.com/esp32-p4-nano.htm
27-
version: 1.1.7
28+
version: 1.2.0

bsp/esp32_p4_nano/include/bsp/display.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040
#define BSP_LCD_H_RES (720)
4141
#define BSP_LCD_V_RES (1280)
4242
#define BSP_LCD_MIPI_DSI_LANE_BITRATE_MBPS (700)
43+
#elif CONFIG_BSP_LCD_TYPE_720_1280_10_1_INCH_B
44+
#define BSP_LCD_H_RES (720)
45+
#define BSP_LCD_V_RES (1280)
46+
#define BSP_LCD_MIPI_DSI_LANE_BITRATE_MBPS (1200)
47+
#elif CONFIG_BSP_LCD_TYPE_720_1280_9_INCH_B
48+
#define BSP_LCD_H_RES (720)
49+
#define BSP_LCD_V_RES (1280)
50+
#define BSP_LCD_MIPI_DSI_LANE_BITRATE_MBPS (1200)
4351
#elif CONFIG_BSP_LCD_TYPE_480_640_2_8_INCH
4452
#define BSP_LCD_H_RES (480)
4553
#define BSP_LCD_V_RES (640)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ChangeLog
2+
3+
## v1.0.3 - 2025-09-15
4+
5+
### Changes:
6+
7+
* Updated phy_clk_src default value from MIPI_DSI_PHY_CLK_SRC_DEFAULT to 0
8+
9+
## v1.0.2 - 2025-01-13
10+
11+
### bugfix:
12+
13+
* Fixed the issue with macro inclusion
14+
15+
## v1.0.1 - 2024-11-10
16+
17+
### bugfix:
18+
19+
* Modified the order of reading the ID register
20+
21+
## v1.0.0 - 2024-08-12
22+
23+
### Enhancements:
24+
25+
* Component version maintenance, code improvement, and documentation enhancement
26+
27+
## v0.1.0 - 2024-05-07
28+
29+
### Enhancements:
30+
31+
* Implement the driver for the JD9365 MIPI-DSI LCD controller
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
idf_component_register(SRCS "esp_lcd_jd9365.c" INCLUDE_DIRS "include" PRIV_REQUIRES "driver" REQUIRES "esp_lcd")
2+
3+
include(package_manager)
4+
cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR})

0 commit comments

Comments
 (0)