From f8f70c2ac720907f54db18b82b5c723a8f2ed56f Mon Sep 17 00:00:00 2001 From: Daniel DeGrasse Date: Mon, 26 Aug 2024 15:58:32 +0000 Subject: [PATCH] boards: shields: lcd_par_s035: enable reset gpio within input module 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 --- boards/shields/lcd_par_s035/Kconfig.defconfig | 9 +++++++++ boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/boards/shields/lcd_par_s035/Kconfig.defconfig b/boards/shields/lcd_par_s035/Kconfig.defconfig index 8e375f8b1a8..a536a16f534 100644 --- a/boards/shields/lcd_par_s035/Kconfig.defconfig +++ b/boards/shields/lcd_par_s035/Kconfig.defconfig @@ -28,4 +28,13 @@ config INPUT_GT911_INTERRUPT endif # LVGL +if INPUT + +# GT911 driver drives reset pin low, so it needs to initialize before +# the display driver but after the MIPI DBI driver +config INPUT_INIT_PRIORITY + default 82 + +endif # INPUT + endif # SHIELD_LCD_PAR_S035 diff --git a/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay b/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay index bd305564be4..ca374649bab 100644 --- a/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay +++ b/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay @@ -24,8 +24,8 @@ gt911_lcd_par_s035: gt911-lcd_par_s035@5d { compatible = "goodix,gt911"; reg = <0x5d>; - alt-addr = <0x14>; irq-gpios = <&nxp_lcd_8080_connector 9 GPIO_ACTIVE_HIGH>; + reset-gpios = <&nxp_lcd_8080_connector 11 GPIO_ACTIVE_LOW>; }; };