Skip to content

Conversation

CharlesDias
Copy link
Contributor

@CharlesDias CharlesDias commented Aug 12, 2025

This panel is used on https://docs.zephyrproject.org/latest/boards/st/stm32u5g9j_dk1/doc/index.html board.

Driver implementation based on ST code sample DSI_VideoMode_SingleBuffer from :
https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5x9J-DK/Examples/DSI/DSI_VideoMode_SingleBuffer

Tested with:

  • west build -p -b stm32u5g9j_dk1 --shield st_mb1835 samples/drivers/display

And also

  • west build -p -b stm32u5g9j_dk1 --shield st_mb1835 samples/modules/lvgl/demos -- -DCONFIG_LV_Z_DEMO_MUSIC=y

Related to:

WhatsApp.Video.2025-08-12.at.19.57.52.mp4

@erwango @ajarmouni-st

@CharlesDias CharlesDias force-pushed the panel_hx8379c_driver branch 3 times, most recently from 99733d8 to b4a9c66 Compare August 14, 2025 05:08
@CharlesDias CharlesDias marked this pull request as ready for review August 14, 2025 09:04
memset(capabilities, 0, sizeof(struct display_capabilities));
capabilities->x_resolution = config->panel_width;
capabilities->y_resolution = config->panel_height;
capabilities->supported_pixel_formats = config->pixel_format;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a bitmask of all the supported pixel formats?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. Done! Thanks for your review.


ret = hx8379c_transmit(dev, 0xC7, c7_config, sizeof(c7_config));
if (ret < 0) {
LOG_ERR("Panel SETVCOM failed (%d)", ret);
Copy link
Contributor

@kartben kartben Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy paste error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Comment on lines 181 to 183
static const uint8_t c7_config[4] = {0x00, 0x00, 0x00, 0xC0};

ret = hx8379c_transmit(dev, 0xC7, c7_config, sizeof(c7_config));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit mysterious - can this have some comments, or, if possible, 0xC7 be a proper macro?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Register 0xC7 is not mentioned in the datasheet, but searching the internet, it is available for other Himax displays like SETTCON.


ret = hx8379c_transmit(dev, HX8379C_SETGIP_0, gip0_config, sizeof(gip0_config));
if (ret < 0) {
LOG_ERR("Panel register SETGIP_0 failed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG_ERR("Panel register SETGIP_0 failed");
LOG_ERR("Panel register SETGIP_0 failed", ret);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@kartben kartben requested a review from Copilot August 14, 2025 16:01
Copilot

This comment was marked as outdated.

@CharlesDias CharlesDias force-pushed the panel_hx8379c_driver branch 3 times, most recently from 7bb3979 to 8b19473 Compare August 14, 2025 19:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new display driver for the Himax HX8379C TFT-LCD controller to support the STM32U5G9J-DK1 development board. The implementation is based on the ST Microelectronics reference code and has been tested with Zephyr's display and LVGL samples.

  • Implements HX8379C display driver with MIPI DSI support
  • Adds device tree bindings and configuration files
  • Includes test overlay for driver build validation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
drivers/display/display_hx8379c.c Main driver implementation with panel initialization and display control
dts/bindings/display/himax,hx8379c.yaml Device tree binding definition for HX8379C display controller
drivers/display/Kconfig.hx8379c Kconfig options for HX8379C driver configuration
drivers/display/Kconfig Updated to include HX8379C Kconfig source
drivers/display/CMakeLists.txt Added HX8379C driver to build system
tests/drivers/build_all/display/app.overlay Test configuration for build validation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@CharlesDias CharlesDias force-pushed the panel_hx8379c_driver branch from 8b19473 to f5178be Compare August 21, 2025 18:43
@CharlesDias
Copy link
Contributor Author

Fixed the reset-gpios and bl-gpios, also updated the LOG_ERR to print out the error code.

@CharlesDias CharlesDias force-pushed the panel_hx8379c_driver branch from f5178be to de85820 Compare August 21, 2025 19:00
@sonarqubecloud
Copy link

@CharlesDias CharlesDias requested a review from kartben September 19, 2025 07:19
@CharlesDias
Copy link
Contributor Author

Hi @erwango, @JarmouniA, @avolmat-st, when possible, could you please review this PR?
I appreciate your support.

@kartben kartben dismissed their stale review September 20, 2025 07:50

Comments addressed, thanks!

VynDragon
VynDragon previously approved these changes Sep 29, 2025
@VynDragon
Copy link
Contributor

VynDragon commented Oct 8, 2025

@JarmouniA PTAL at this one in priority, it has been sitting ready for a really long time

@CharlesDias
Copy link
Contributor Author

Implemented the @JarmouniA's requests.

Add binding file for Himax HX8379C panel driver.

Signed-off-by: Charles Dias <[email protected]>
Add driver files for Himax HX8379C panel.

Signed-off-by: Charles Dias <[email protected]>
@CharlesDias
Copy link
Contributor Author

Rebase

JarmouniA
JarmouniA previously approved these changes Oct 16, 2025
@JarmouniA JarmouniA requested a review from VynDragon October 16, 2025 12:53
@JarmouniA JarmouniA added this to the v4.3.0 milestone Oct 16, 2025
Include HX8379C in test app.

Signed-off-by: Charles Dias <[email protected]>
@CharlesDias
Copy link
Contributor Author

Remove bl-gpios from app.overlay file.

@sonarqubecloud
Copy link

@cfriedt cfriedt merged commit c52ed39 into zephyrproject-rtos:main Oct 16, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Bindings area: Display area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants