Skip to content

Commit

Permalink
Merge branch 'feat/add_mipi_components' into 'master'
Browse files Browse the repository at this point in the history
feat(lcd): Add some mipi  components

Closes AEG-1535, AEG-1538, AEG-1539, and AEG-1540

See merge request ae_group/esp-iot-solution!987
  • Loading branch information
leeebo committed Jun 7, 2024
2 parents ae92cbf + 0e52acc commit 3651de5
Show file tree
Hide file tree
Showing 89 changed files with 6,700 additions and 1,393 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
components/bootloader_support_plus;
components/button;
components/display/lcd/esp_lcd_axs15231b;
components/display/lcd/esp_lcd_ek79007;
components/display/lcd/esp_lcd_jd9165;
components/display/lcd/esp_lcd_jd9365;
components/display/lcd/esp_lcd_gc9b71;
components/display/lcd/esp_lcd_panel_io_additions;
components/display/lcd/esp_lcd_nv3022b;
Expand Down
32 changes: 31 additions & 1 deletion .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,36 @@ build_components_display_lcd_esp_lcd_axs15231b_test_apps:
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_axs15231b/test_apps

build_components_display_lcd_esp_lcd_ek79007_test_apps:
extends:
- .build_examples_template
- .rules:build:components_display_lcd_esp_lcd_ek79007_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:release-v5.3
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_ek79007/test_apps

build_components_display_lcd_esp_lcd_jd9165_test_apps:
extends:
- .build_examples_template
- .rules:build:components_display_lcd_esp_lcd_jd9165_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:release-v5.3
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_jd9165/test_apps

build_components_display_lcd_esp_lcd_jd9365_test_apps:
extends:
- .build_examples_template
- .rules:build:components_display_lcd_esp_lcd_jd9365_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:release-v5.3
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_jd9365/test_apps

build_components_display_lcd_esp_lcd_gc9b71_test_apps:
extends:
- .build_examples_template
Expand Down Expand Up @@ -864,7 +894,7 @@ build_components_display_lcd_esp_lcd_st7701_test_apps:
- .rules:build:components_display_lcd_esp_lcd_st7701_test_apps
parallel:
matrix:
- IMAGE: espressif/idf:release-v5.1
- IMAGE: espressif/idf:release-v5.3
variables:
EXAMPLE_DIR: components/display/lcd/esp_lcd_st7701/test_apps

Expand Down
45 changes: 45 additions & 0 deletions .gitlab/ci/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@
.patterns-components_display_lcd_esp_lcd_axs15231b: &patterns-components_display_lcd_esp_lcd_axs15231b
- "components/display/lcd/esp_lcd_axs15231b/**/*"

.patterns-components_display_lcd_esp_lcd_ek79007: &patterns-components_display_lcd_esp_lcd_ek79007
- "components/display/lcd/esp_lcd_ek79007/**/*"

.patterns-components_display_lcd_esp_lcd_jd9165: &patterns-components_display_lcd_esp_lcd_jd9165
- "components/display/lcd/esp_lcd_jd9165/**/*"

.patterns-components_display_lcd_esp_lcd_jd9365: &patterns-components_display_lcd_esp_lcd_jd9365
- "components/display/lcd/esp_lcd_jd9365/**/*"

.patterns-components_display_lcd_esp_lcd_axs15231b: &patterns-components_display_lcd_esp_lcd_axs15231b
- "components/display/lcd/esp_lcd_axs15231b/**/*"

.patterns-components_display_lcd_esp_lcd_gc9b71: &patterns-components_display_lcd_esp_lcd_gc9b71
- "components/display/lcd/esp_lcd_gc9b71/**/*"

Expand Down Expand Up @@ -1389,6 +1401,39 @@
- <<: *if-dev-push
changes: *patterns-components_display_lcd_esp_lcd_axs15231b

.rules:build:components_display_lcd_esp_lcd_ek79007_test_apps:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-trigger-job
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-components_display_lcd_esp_lcd_ek79007

.rules:build:components_display_lcd_esp_lcd_jd9165_test_apps:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-trigger-job
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-components_display_lcd_esp_lcd_jd9165

.rules:build:components_display_lcd_esp_lcd_jd9365_test_apps:
rules:
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-trigger-job
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-components_display_lcd_esp_lcd_jd9365

.rules:build:components_display_lcd_esp_lcd_gc9b71_test_apps:
rules:
- <<: *if-protected
Expand Down
20 changes: 0 additions & 20 deletions .gitlab/ci/target_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,26 +391,6 @@ components_test_esp_lcd_spd2010:
TEST_FOLDER: components/display/lcd/esp_lcd_spd2010
TEST_ENV: esp32_s3_lcd_ev_board

components_test_esp_lcd_st7701:
extends:
- .pytest_template
- .rules:build:components_display_lcd_esp_lcd_st7701_test_apps
needs:
- job: "build_components_display_lcd_esp_lcd_st7701_test_apps"
artifacts: true
optional: false
parallel:
matrix:
- IDF_VERSION: "5.1"
tags:
- esp32s3
- esp32s3_lcd_ev
image: $DOCKER_TARGET_TEST_v5_1_ENV_IMAGE
variables:
TEST_TARGET: esp32s3
TEST_FOLDER: components/display/lcd/esp_lcd_st7701
TEST_ENV: esp32_s3_lcd_ev_board

components_test_esp_lcd_st77903_qspi:
extends:
- .pytest_template
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ The registered components in ESP-IoT-Solution are listed below:
| [cmake_utilities](https://components.espressif.com/components/espressif/cmake_utilities) | [![Component Registry](https://components.espressif.com/components/espressif/cmake_utilities/badge.svg)](https://components.espressif.com/components/espressif/cmake_utilities) |
| [esp_lcd_gc9b71](https://components.espressif.com/components/espressif/esp_lcd_gc9b71) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_gc9b71/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_gc9b71) |
| [esp_lcd_axs15231b](https://components.espressif.com/components/espressif/esp_lcd_axs15231b) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_axs15231b/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_axs15231b) |
| [esp_lcd_ek79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_ek79007/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_ek79007) |
| [esp_lcd_jd9165](https://components.espressif.com/components/espressif/esp_lcd_jd9165) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_jd9165/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_jd9165) |
| [esp_lcd_jd9365](https://components.espressif.com/components/espressif/esp_lcd_jd9365) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_jd9365/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_jd9365) |
| [esp_lcd_panel_io_additions](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions) |
| [esp_lcd_nv3022b](https://components.espressif.com/components/espressif/esp_lcd_nv3022b) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_nv3022b/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_nv3022b)
| [esp_lcd_sh8601](https://components.espressif.com/components/espressif/esp_lcd_sh8601) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_sh8601/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_sh8601) |
Expand Down
3 changes: 3 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ ESP-IoT-Solution 中注册的组件如下:
| [button](https://components.espressif.com/components/espressif/button) | [![Component Registry](https://components.espressif.com/components/espressif/button/badge.svg)](https://components.espressif.com/components/espressif/button) |
| [cmake_utilities](https://components.espressif.com/components/espressif/cmake_utilities) | [![Component Registry](https://components.espressif.com/components/espressif/cmake_utilities/badge.svg)](https://components.espressif.com/components/espressif/cmake_utilities) |
| [esp_lcd_axs15231b](https://components.espressif.com/components/espressif/esp_lcd_axs15231b) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_axs15231b/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_axs15231b) |
| [esp_lcd_ek79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_ek79007/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_ek79007) |
| [esp_lcd_jd9165](https://components.espressif.com/components/espressif/esp_lcd_jd9165) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_jd9165/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_jd9165) |
| [esp_lcd_jd9365](https://components.espressif.com/components/espressif/esp_lcd_jd9365) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_jd9365/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_jd9365) |
| [esp_lcd_gc9b71](https://components.espressif.com/components/espressif/esp_lcd_gc9b71) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_gc9b71/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_gc9b71) |
| [esp_lcd_panel_io_additions](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_panel_io_additions) |
| [esp_lcd_nv3022b](https://components.espressif.com/components/espressif/esp_lcd_nv3022b) | [![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_nv3022b/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_nv3022b)
Expand Down
14 changes: 13 additions & 1 deletion components/.build-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ components/display/lcd/esp_lcd_axs15231b/test_apps:
enable:
- if: INCLUDE_DEFAULT == 1

components/display/lcd/esp_lcd_ek79007/test_apps:
enable:
- if: IDF_TARGET in ["esp32p4"]

components/display/lcd/esp_lcd_jd9165/test_apps:
enable:
- if: IDF_TARGET in ["esp32p4"]

components/display/lcd/esp_lcd_jd9365/test_apps:
enable:
- if: IDF_TARGET in ["esp32p4"]

components/display/lcd/esp_lcd_gc9b71/test_apps:
enable:
- if: INCLUDE_DEFAULT == 1
Expand All @@ -84,7 +96,7 @@ components/display/lcd/esp_lcd_spd2010/test_apps:

components/display/lcd/esp_lcd_st7701/test_apps:
enable:
- if: IDF_TARGET in ["esp32s3"]
- if: IDF_TARGET in ["esp32s3", "esp32p4"]

components/display/lcd/esp_lcd_st77903_qspi:
enable:
Expand Down
7 changes: 7 additions & 0 deletions components/display/lcd/esp_lcd_ek79007/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ChangeLog

## v0.1.0 - 2024-05-07

### Enhancements:

* Implement the driver for the EK79007 MIPI-DSI LCD controller
4 changes: 4 additions & 0 deletions components/display/lcd/esp_lcd_ek79007/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
idf_component_register(SRCS "esp_lcd_ek79007.c" INCLUDE_DIRS "include" PRIV_REQUIRES "driver" REQUIRES "esp_lcd")

include(package_manager)
cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR})
80 changes: 80 additions & 0 deletions components/display/lcd/esp_lcd_ek79007/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# ESP LCD EK79007

[![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_ek79007/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_ek79007)

Implementation of the EK79007 LCD controller with esp_lcd component.

| LCD controller | Communication interface | Component name | Link to datasheet |
| :------------: | :---------------------: | :------------: | :-----------------------------------------------------------------------------------: |
| EK79007 | MIPI-DSI | esp_lcd_ek79007 | [PDF](https://dl.espressif.com/AE/esp-iot-solution/EK79007DA-H3_DS_V0.01_20200819.pdf) |

**Note**: MIPI-DSI interface only supports ESP-IDF v5.3 and above versions.

## Add to project

Packages from this repository are uploaded to [Espressif's component service](https://components.espressif.com/).
You can add them to your project via `idf.py add-dependancy`, e.g.

```
idf.py add-dependency "espressif/esp_lcd_ek79007"
```

Alternatively, you can create `idf_component.yml`. More is in [Espressif's documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html).

## Example use

```c
/**
* Uncomment these line if use custom initialization commands.
* The array should be declared as static const and positioned outside the function.
*/
// static const ek79007_lcd_init_cmd_t lcd_init_cmds[] = {
// {cmd, { data }, data_size, delay_ms}
// {0xE0, (uint8_t []){0x00}, 1, 0},
// {0xE1, (uint8_t []){0x93}, 1, 0},
// {0xE2, (uint8_t []){0x65}, 1, 0},
// {0xE3, (uint8_t []){0xF8}, 1, 0},
// ...
// };

ESP_LOGI(TAG, "MIPI DSI PHY Powered on");
esp_ldo_channel_handle_t ldo_mipi_phy = NULL;
esp_ldo_channel_config_t ldo_mipi_phy_config = {
.chan_id = 3,
.voltage_mv = 2500,
};
ESP_ERROR_CHECK(esp_ldo_acquire_channel(&ldo_mipi_phy_config, &ldo_mipi_phy));

ESP_LOGI(TAG, "Initialize MIPI DSI bus");
esp_lcd_dsi_bus_handle_t mipi_dsi_bus = NULL;
esp_lcd_dsi_bus_config_t bus_config = EK79007_PANEL_BUS_DSI_2CH_CONFIG();
ESP_ERROR_CHECK(esp_lcd_new_dsi_bus(&bus_config, &mipi_dsi_bus));

ESP_LOGI(TAG, "Install panel IO");
esp_lcd_panel_io_handle_t mipi_dbi_io = NULL;
esp_lcd_dbi_io_config_t dbi_config = EK79007_PANEL_IO_DBI_CONFIG();
ESP_ERROR_CHECK(esp_lcd_new_panel_io_dbi(mipi_dsi_bus, &dbi_config, &mipi_dbi_io));

ESP_LOGI(TAG, "Install EK79007S panel driver");
esp_lcd_panel_handle_t panel_handle = NULL;
const esp_lcd_dpi_panel_config_t dpi_config = EK79007_1024_600_PANEL_60HZ_CONFIG(EXAMPLE_MIPI_DPI_PX_FORMAT);
ek79007_vendor_config_t vendor_config = {
.flags = {
.use_mipi_interface = 1,
},
.mipi_config = {
.dsi_bus = mipi_dsi_bus,
.dpi_config = &dpi_config,
},
};
const esp_lcd_panel_dev_config_t panel_config = {
.reset_gpio_num = EXAMPLE_LCD_IO_RST, // Set to -1 if not use
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB, // Implemented by LCD command `36h`
.bits_per_pixel = EXAMPLE_LCD_BIT_PER_PIXEL, // Implemented by LCD command `3Ah` (16/18/24)
.vendor_config = &vendor_config,
};
ESP_ERROR_CHECK(esp_lcd_new_panel_ek79007(mipi_dbi_io, &panel_config, &panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));
ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(panel_handle, true));
```
Loading

0 comments on commit 3651de5

Please sign in to comment.