Skip to content

Conversation

@DerekSnell
Copy link
Contributor

@DerekSnell DerekSnell commented Nov 6, 2025

Fixes #98876

Defers init of GT911 touch, MIPI DBI, and display device drivers. lcd_par_s035_init() in shield.c now initializes these to control the GT911 INT_GPIO state during the Reset sequence.

  • Fixes issue with this shield caused by shared Reset signal between the GT911 and display driver.
  • Removes reset-gpios property from gt911 node. The GT911 driver does not need to assert the Reset signal because the display driver asserts Reset before the GT911 driver initializes.

Tested this fix on the following:

  • LCD_PAR_S035 shield with FRDM_MCXN947
  • LCD_PAR_S035 shield with FRDM_RW612

This capture is from the LCD_PAR_S035 with the FRDM_RW612 and this change applied. The GT911 INT_GPIO is driven low first, then the LCDIC display driver asserts Reset and INT_GPIO remains low through the init process.
image

@DerekSnell DerekSnell added this to the v4.3.0 milestone Nov 6, 2025
@DerekSnell DerekSnell added bug The issue is a bug, or the PR is fixing a bug area: Display area: Input Input Subsystem and Drivers platform: NXP MCU labels Nov 6, 2025
@zephyrbot zephyrbot added area: Boards/SoCs area: Shields Shields (add-on boards) labels Nov 6, 2025
Copy link
Contributor

@JarmouniA JarmouniA left a comment

Choose a reason for hiding this comment

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

Can't you deffer the initialization of display & touch controllers and do the setup in the right order in the board's (or shield's, if that's a thing) board.c?
I really do not like seeing code in the touch controller driver that actually has nothing to do with it, and it's solving a problem created by the shield.

@decsny
Copy link
Member

decsny commented Nov 6, 2025

Can't you deffer the initialization of display & touch controllers and do the setup in the right order in the board's (or shield's, if that's a thing) board.c? I really do not like seeing code in the touch controller driver that actually has nothing to do with it, and it's solving a problem created by the shield.

I don't see how deferred initialization fixes this. Whether you defer or not you still have to have the same patch @DerekSnell submitted here.

@decsny
Copy link
Member

decsny commented Nov 6, 2025

Actually I think we added the ability to put code in shields, if I'm remembering correctly, and I think I understand @JarmouniA suggestion now. It could be possible to do this by deferred initialization and handle init in shield code.

Defers init of GT911 touch, MIPI DBI, and display device drivers.
lcd_par_s035_init() in shield.c now initializes these to control the
GT911 INT_GPIO state during the Reset sequence.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
@DerekSnell DerekSnell force-pushed the gt911_touch_fix_LCD-PAR-S035 branch from 6581f53 to 72c317b Compare November 6, 2025 23:29
@DerekSnell DerekSnell changed the title drivers: input: gt911: fix LCD-PAR-S035 NXP display shield shields: nxp: lcd_par_s035: fix gt911 touch initialization Nov 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@DerekSnell
Copy link
Contributor Author

Can't you deffer the initialization of display & touch controllers and do the setup in the right order in the board's (or shield's, if that's a thing) board.c?

Hi @JarmouniA ,
Great idea! I reworked this PR as you suggested, and I agree this is much cleaner. The PR only updates the shield and does not need to touch any drivers. Thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Display area: Input Input Subsystem and Drivers area: Shields Shields (add-on boards) bug The issue is a bug, or the PR is fixing a bug platform: NXP MCU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shields: NXP: LCD-PAR-S035: touchscreen may not respond

5 participants