Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: display: support display driver on Renesas RA EK-RA8D1 #80694

Merged
merged 15 commits into from
Dec 20, 2024

Conversation

thenguyenyf
Copy link
Contributor

  • Add support for MIPI-DSI driver
  • Add support for Display driver
  • Add support for rtkmipilcdb00000be display shield
  • Add support for SDRAM on EK-RA8D1

@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 31, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@677984b zephyrproject-rtos/hal_renesas@3c68562 zephyrproject-rtos/hal_renesas@677984b4..3c685624

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Oct 31, 2024
@thenguyenyf thenguyenyf force-pushed the support_renesas_ra_display branch from 31eafc6 to 537381c Compare November 1, 2024 06:37
Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

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

Commits need to be split up here to be more granular (this suggested list is ordered from oldest to newest)

  • Hal update commit
  • Commit adding SDRAM memc driver
  • Commit adding SDRAM enablement changes at SOC level
  • Commit enabling SDRAM driver on EK-RA8D1 board
  • Commit enabling memc test for EK-RA8D1
  • Commit adding renesas_ra display driver (and dts bindings)
  • Commit adding SOC level definitions to support renesas_ra display driver
  • Commit adding dsi_renesas_ra driver (and dts bindings)
  • Commit adding SOC level definitions to support dsi_renesas_ra driver
  • Commit adding ili9806e_dsi display driver (and dts bindings)
  • Commit adding board support for renesas_ra, dsi_renesas, and ili9806_dsi display driver
  • Commit adding rtkmipilcdb00000be shield
  • Commit adding display test support for the EK-RA8D1

Note- the change request here is specifically about the use of CONFIG_RENESAS_RA_DISPLAY in generic code such as LVGL.

LOG_ERR("pin function initial failed");
return err;
}
sdram_init();
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the SDRAM initialization is defined here in the HAL: https://github.com/zephyrproject-rtos/hal_renesas/pull/45/files#diff-aebfe76749f0c33920f681bb5d983c3f86c6af05e9eca5af73030e941b239595R154

I am wondering- will this SDRAM initialization work for any SDRAM, or specifically the SDRAM part on the EK-RA8D1? I see that function sets some parameters like the CAS latency and write recovery time that I suspect could vary between SDRAM chips, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Current implementation just supports for SDRAM on EK-RA8D1

Copy link
Collaborator

@danieldegrasse danieldegrasse Nov 19, 2024

Choose a reason for hiding this comment

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

Ok- I would suggest naming the driver based on the SDRAM part number (IE renesas_ra_sdram_xxx) then. Otherwise, users may incorrectly assume that the driver will work for any SDRAM. Another (better) option would be to implement a MEMC driver capable of configuring the SDRAM controller based on settings in devicetree, so it can work for any SDRAM chip

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm still concerned about the naming of this driver. This implies the SDRAM memc driver will enable SDRAM support on any board with an RA SOC, right?

What will happen when a customer designs a board with a different SDRAM part, and tries to use this driver?

One option to explore would be making the SDRAM init part of a board specific C init file.

soc/renesas/ra/ra8d1/sections.ld Outdated Show resolved Hide resolved
@@ -25,5 +25,12 @@
renesas,programming-enable;
};
};

sdram: sdram@68000000 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again here- should this be at the SOC level? Seems like the SDRAM on the EK-RA8D1 is an external memory chip specific to that board. Perhaps the reg address can be set here, but the size probably needs to be 0, and can be overridden at the board level.

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

Copy link
Collaborator

@danieldegrasse danieldegrasse Nov 19, 2024

Choose a reason for hiding this comment

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

I think the best option here is probably one of these two approaches:

  • Define the entire SDRAM node at the board level
  • Define a node for the SDRAM controller on the SOC at the SOC level, and define the SDRAM part itself at the board level. This is similar to how we define other external devices, like flash chips on a FlexSPI bus.

The best option would be the second one- if we do that though, we would need to support setting SDRAM settings like CAS latency from devicetree (or based on the compatible for the SRAM part number).

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. I have updated as first one. Update for SDRAM controller as second one will be added later. Thanks for your idea.

boards/shields/rtkmipilcdb00000be/Kconfig.defconfig Outdated Show resolved Hide resolved
boards/shields/rtkmipilcdb00000be/Kconfig.defconfig Outdated Show resolved Hide resolved
drivers/mipi_dsi/dsi_renesas_ra.c Outdated Show resolved Hide resolved
modules/lvgl/lvgl.c Outdated Show resolved Hide resolved
@@ -85,9 +85,15 @@ int set_lvgl_rendering_cb(lv_disp_drv_t *disp_drv)
#endif
break;
case PIXEL_FORMAT_RGB_888:
#if defined(CONFIG_RENESAS_RA_DISPLAY)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same story here. It seems like the display is using ARGB8888?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change has been reverted

samples/shields/rtkmipilcdb00000be_ra_display/README.rst Outdated Show resolved Hide resolved
west.yml Outdated Show resolved Hide resolved
First commit to add support for SDRAM controller on Renesas RA SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add device node to support SDRAM controller on Renesas RA8D1 SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add support for SDRAM on Renesas RA EK-RA8D1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to add support for Graphics LCD Controller on Renesas RA

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add device node to support Graphics LCD Controller on RA8D1 SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to add support for MIPI DSI driver on Renesas RA

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add device node to support MIPI DSI driver on Renesas RA8D1 SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to add support for ili9806e_dsi driver

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
First commit to support rtkmipilcdb00000be display shield

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
@thenguyenyf thenguyenyf dismissed stale reviews from KhiemNguyenT, uLipe, and duynguyenxa via 90bdd17 December 19, 2024 08:03
@thenguyenyf thenguyenyf force-pushed the support_renesas_ra_display branch from a74f262 to 90bdd17 Compare December 19, 2024 08:03
@thenguyenyf
Copy link
Contributor Author

Hi @danieldegrasse . Could you please take a look?

Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

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

Just a minor nit- dismissing my block as it has been addressed. Otherwise LGTM


config DISPLAY_BUFFER_USE_GENERIC_SECTION
bool "Place the display buffer in a specific memory section"
default n
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit- redundant default n

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. Thanks for your support!

@danieldegrasse danieldegrasse dismissed their stale review December 19, 2024 18:01

Block itself has been addressed, only nits remain

@thenguyenyf thenguyenyf force-pushed the support_renesas_ra_display branch from 90bdd17 to c418429 Compare December 20, 2024 03:01
This commit to add support to build tests/drivers/display on ek_ra8d1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add support to build samples/drivers/display on ek_ra8d1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
This commit to add support to build samples/subsys/display on ek_ra8d1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add support for lvgl demo build with rtkmipilcdb00000be shield

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Add SDRAM controller test support

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
@thenguyenyf thenguyenyf force-pushed the support_renesas_ra_display branch from c418429 to 3b390e4 Compare December 20, 2024 03:18
Copy link
Collaborator

@uLipe uLipe left a comment

Choose a reason for hiding this comment

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

Great job!

@jhedberg jhedberg merged commit 8d2a9b3 into zephyrproject-rtos:main Dec 20, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Display area: GPIO area: LVGL Light and Versatile Graphics Library Support area: MEMC area: MIPI-DSI area: Samples Samples area: Shields Shields (add-on boards) manifest manifest-hal_renesas platform: Renesas RA Renesas Electronics Corporation, RA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants