Skip to content

Conversation

@danieldegrasse
Copy link
Contributor

@danieldegrasse danieldegrasse commented Aug 26, 2024

Enable support for 8080 mode on the NXP LCDIC peripheral. This support has been validated on the rd_rw612_bga board using lcd_par_s035_8080 shield, with the following samples:

  • samples/drivers/display
  • samples/modules/lvgl/demos

Additionally, this PR was tested on the frdm_mcxn947//cpu0 using the lcd_par_s035_8080 shield with samples/modules/lvgl/demos.

Depends on #77578, #77579, and #77584 for various driver fixes (commits from those PRs are currently included in this one)
Blocked by #78415 due a CI fix needed

Copy link
Member

Choose a reason for hiding this comment

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

why is this deleted? might want to mention in commit message

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've added a blurb in the commit message. For anyone interested, the best I can tell this was working because the FRDM-MCXN947 board (previously the only in tree board using this display) was configuring the INT pin for the display in the MIPI-DBI pincontrol node. The pin control setting was such that when the RESET pin for the display (and touch screen) controller is toggled low, the touch screen controller will select the 0x14 alternate I2C address. This workaround wasn't working on the RW612 board, so I opted to properly set initialization order, thereby making sure the GT911 driver is able to pull the reset pin low and set the INT pin properly as needed to get the GT911 IC to select the standard 0x5D I2C address.

decsny
decsny previously approved these changes Sep 16, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to remove "Only SPI mode is currently supported."(L:6)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we should. I'll update this PR, thanks for catching that

jfischer-no
jfischer-no previously approved these changes Sep 20, 2024
decsny
decsny previously approved these changes Sep 20, 2024
Copy link
Contributor

@kartben kartben left a comment

Choose a reason for hiding this comment

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

Minor doc comment -- we now have a "--shield" west arg

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
:gen-args: -DSHIELD=adafruit_2_8_tft_touch_v2
:shield: adafruit_2_8_tft_touch_v2

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
:gen-args: -DSHIELD=lcd_par_s035_8080
:shield: lcd_par_s035_8080

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
* invert the reported pixel format if rgb_is_inverted"
* invert the reported pixel format if "rgb_is_inverted"

Copy link
Contributor

Choose a reason for hiding this comment

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

@danieldegrasse Shouldn't this be renamed to something generic prefixed with zephyr_ as we did in #77854? This way the shield's overlay can be used with boards from multiple vendors as is.

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 is a good point, it should be. I'll add a commit into this PR doing that cleanup.

Although the parallel mipi dbi mode pinout used for the LCD PAR S035
display is specific to NXP boards, the definition of the display is
generic, and does not require NXP-specific parallel mipi dbi IP.
Therefore, rename the MIPI DBI node for this display from
`nxp_flexio_lcd` to `zephyr_mipi_dbi_parallel`. The gpio-nexus node name
is unchanged, as the pinout it describes is specific to NXP.

Signed-off-by: Daniel DeGrasse <[email protected]>
Update ST7796s display driver to respect the setting of rgb_is_inverted
in 8080 8 bit mode, as it was previously not applied for this mode.

Also, simplify the logic check for 16 bit mode- the new check is
functionally equivalent, but no longer inverts both boolean values.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable support for 8 bit 8080 mode in the NXP LCDIC driver. Support
for programming the minimum duration of the write active/inactive signal
is also added, since this will be required to support high display
clocks in 8080 mode.

Signed-off-by: Daniel DeGrasse <[email protected]>
The LCD_PAR_S035 display module shares the reset pin between the display
module and the touchscreen controller. The touchscreen controller needs
the reset pin to be toggled low during boot in order to select the
expected I2C address. However, the reset sequence must occur before the
display is initialized. To enable this, set a custom INPUT driver init
priority when using this display module, so that INPUT drivers start
after MIPI DBI drivers but before DISPLAY drivers.

Since the reset sequence is now operating as expected, we no longer need
to use the alt-addr probing method. This method was previously only
working correctly because boards using this display were configuring
the display INT pin using the pin control API prior to resetting the
display, so when the display was reset it would select the alt-addr
I2C address.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable the rd_rw612_bga board with the LCD_PAR_S035 shield. This shield
cannot be connected directly to the board, but the connection can be
made with a set of jumper wires.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add documentation about supported displays on this board, as the list is
getting rather long and each display has its own bespoke connection
requirements.

Signed-off-by: Daniel DeGrasse <[email protected]>
@danieldegrasse
Copy link
Contributor Author

Rebased to pick up CI fixes

@danieldegrasse
Copy link
Contributor Author

@kartben ping- could you take another look at this PR?

@decsny decsny removed their request for review October 4, 2024 17:20
@fabiobaltieri fabiobaltieri merged commit 8a30c23 into zephyrproject-rtos:main Oct 4, 2024
@danieldegrasse danieldegrasse deleted the feature/rw612-8080 branch October 7, 2024 14:14
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.

9 participants