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: stm32l5 FMC LCD display driver #45654

Closed

Conversation

lochej
Copy link
Collaborator

@lochej lochej commented May 14, 2022

Fixes #39289

Improvement to PR #39335 now that #44448 has been merged.

Adds support for STM32L562E-DK driver TFT color display based on the ST7789H2 driver.
The implementation uses the FMC peripheral to drive the ST7789H2 with a 16bit parallel interface.

Initial support added to STM32L562E_DK board.

lochej added 2 commits May 14, 2022 22:12
Driver implementation for st7789h2 display controller
using the STM32 series FMC peripheral for driving the
parallel bus interface.

Signed-off-by: Jeremy LOCHE <[email protected]>
Enable the color display for STM32L562E_DK board.
The driver is using the FMC peripheral to drive the bus.
The power supply to the LCD is handled by the regulator
driver at startup.

Signed-off-by: Jeremy LOCHE <[email protected]>
reg = <0x60000000
0x60000002>;

compatible = "sitronix,st7789h2-st-fmc";
Copy link
Member

Choose a reason for hiding this comment

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

@lochej That's a great work, but wouldn't it be possible to push this one step further and completely split st7792h2 driver from STM32 FMC ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@erwango thank you :-) in fact I wasn't 100% sure on how to implement the memory mapped access. As a first step, I used the reg=<> property to give the absolute addresses.

In a sense, if some other devices could drive an LCD thourgh direct memory write, then this driver will work, it doesn't have to be under a FMC bank node.

Though regarding init priorities, I've put the LCD device tree definition under its bank parent so I'm sure the bank was init before its LCD child.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, I had a similar complaint when a panel driver was introduced with vendor dependent MIPI-DSI code inside. Fortunately it lead to the experimental MIPI-DSI interface, so that panel drivers stay vendor independent. Something similar should be done here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great, I'd love to go in this direction. Could you help me find out how the splitting should be done ?
My driver implementation doesn't use any FMC vendor specific code, it just writes at a given address pointer in the reg properties.
So implementation wise, it is more or less split from the FMC driver (except from the name ?).

Are there any ideas for improving that ? Creating an a memory bus interface/driver that could be parallel bitbang or through FMC or anything else ?

Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

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

See my comments.

reg = <0x60000000
0x60000002>;

compatible = "sitronix,st7789h2-st-fmc";
Copy link
Member

Choose a reason for hiding this comment

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

Agreed, I had a similar complaint when a panel driver was introduced with vendor dependent MIPI-DSI code inside. Fortunately it lead to the experimental MIPI-DSI interface, so that panel drivers stay vendor independent. Something similar should be done here.

@erwango erwango added this to the v3.2.0 milestone May 17, 2022
@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 18, 2022
@github-actions github-actions bot closed this Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32L562E-DK display support
4 participants