diff --git a/boards/arm/rp2040/common/Kconfig b/boards/arm/rp2040/common/Kconfig index fd1e7ffafeba2..81b6ee497fa4e 100644 --- a/boards/arm/rp2040/common/Kconfig +++ b/boards/arm/rp2040/common/Kconfig @@ -552,6 +552,12 @@ config RP2040_LCD_SPI_CH range 0 1 ---help--- Select SPI channel number to use LCD display. +config LCD_ST7789_RST_GPIO + int "ST7789 LCD Reset gpio number" + default 12 + range 0 21 + ---help--- + Select Sitronix ST7789 TFT Controller Reset gpio. endif # LCD diff --git a/boards/arm/rp2040/common/src/rp2040_st7789.c b/boards/arm/rp2040/common/src/rp2040_st7789.c index cd644eedd09ae..67fd829aeea7a 100644 --- a/boards/arm/rp2040/common/src/rp2040_st7789.c +++ b/boards/arm/rp2040/common/src/rp2040_st7789.c @@ -48,7 +48,7 @@ #if LCD_SPI_PORTNO #define LCD_DC CONFIG_RP2040_SPI1_RX_GPIO -#define LCD_RST 12 +#define LCD_RST CONFIG_LCD_ST7789_RST_GPIO #define LCD_BL 13 #else #define LCD_DC CONFIG_RP2040_SPI0_RX_GPIO @@ -96,6 +96,7 @@ int board_lcd_initialize(void) rp2040_gpio_init(LCD_RST); rp2040_gpio_setdir(LCD_RST, true); + rp2040_gpio_put(LCD_RST, false); rp2040_gpio_put(LCD_RST, true); /* Set full brightness */