From 42c6f3311be006e114ab943286e007e38a51a138 Mon Sep 17 00:00:00 2001 From: Fabian Blatz Date: Wed, 30 Aug 2023 10:01:39 +0200 Subject: [PATCH] boards: stop using kscan for LVGL touch input Change boards and shields which enable the LV_Z_POINTER_KSCAN symbol to use the new "zephyr,lvgl-pointer-input" compatible instead. Signed-off-by: Fabian Blatz --- boards/arm/bl5340_dvk/Kconfig.defconfig | 21 ------------------- .../bl5340_dvk/bl5340_dvk_cpuapp_common.dtsi | 10 ++++++++- boards/arm/mimxrt1050_evk/Kconfig.defconfig | 8 +------ boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts | 7 ++++++- boards/arm/mimxrt1060_evk/Kconfig.defconfig | 8 +------ boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts | 7 ++++++- boards/arm/mimxrt1064_evk/Kconfig.defconfig | 8 +------ boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts | 7 ++++++- boards/arm/pinetime_devkit0/Kconfig.defconfig | 2 +- .../arm/pinetime_devkit0/pinetime_devkit0.dts | 5 +++++ boards/arm/stm32f746g_disco/Kconfig.defconfig | 5 +---- .../arm/stm32f746g_disco/stm32f746g_disco.dts | 5 +++++ boards/arm/stm32f7508_dk/Kconfig.defconfig | 5 +---- boards/arm/stm32f7508_dk/stm32f7508_dk.dts | 7 ++++++- boards/arm/stm32f769i_disco/Kconfig.defconfig | 2 +- .../arm/stm32f769i_disco/stm32f769i_disco.dts | 7 ++++++- boards/arm/stm32h7b3i_dk/Kconfig.defconfig | 5 +---- boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts | 5 +++++ boards/posix/native_posix/native_posix.dts | 5 +++++ .../Kconfig.defconfig | 15 ------------- .../dts/adafruit_2_8_tft_touch_v2.dtsi | 10 ++++++++- .../Kconfig.defconfig | 15 ------------- .../buydisplay_2_8_tft_touch_arduino.overlay | 10 ++++++++- .../Kconfig.defconfig | 15 ------------- .../buydisplay_3_5_tft_touch_arduino.overlay | 10 ++++++++- boards/shields/g1120b0mipi/Kconfig.defconfig | 14 ------------- .../shields/g1120b0mipi/g1120b0mipi.overlay | 8 ++++++- .../shields/rk055hdmipi4m/Kconfig.defconfig | 10 +-------- .../rk055hdmipi4m/rk055hdmipi4m.overlay | 7 ++++++- .../shields/rk055hdmipi4ma0/Kconfig.defconfig | 8 +------ .../rk055hdmipi4ma0/rk055hdmipi4ma0.overlay | 7 ++++++- 31 files changed, 115 insertions(+), 143 deletions(-) diff --git a/boards/arm/bl5340_dvk/Kconfig.defconfig b/boards/arm/bl5340_dvk/Kconfig.defconfig index 04e0b1db078..38a06c8b91d 100644 --- a/boards/arm/bl5340_dvk/Kconfig.defconfig +++ b/boards/arm/bl5340_dvk/Kconfig.defconfig @@ -104,15 +104,9 @@ config BT_HCI_VS # https://www.buydisplay.com/2-8-inch-tft-touch-shield-for-arduino-w-capacitive-touch-screen-module if DISPLAY -if KSCAN - -config INPUT_FT5336 - default y - config INPUT_FT5336_INTERRUPT default y -endif # KSCAN if LVGL @@ -129,24 +123,9 @@ endchoice config LV_COLOR_16_SWAP default y -config KSCAN - default y - config INPUT default y -config LV_Z_POINTER_KSCAN - default y - -config LV_Z_POINTER_KSCAN_SWAP_XY - default y - -config LV_Z_POINTER_KSCAN_INVERT_X - default y - -config LV_Z_POINTER_KSCAN_INVERT_Y - default y - endif # LVGL endif # DISPLAY diff --git a/boards/arm/bl5340_dvk/bl5340_dvk_cpuapp_common.dtsi b/boards/arm/bl5340_dvk/bl5340_dvk_cpuapp_common.dtsi index 5e339e6d1ca..0aa18ed0189 100644 --- a/boards/arm/bl5340_dvk/bl5340_dvk_cpuapp_common.dtsi +++ b/boards/arm/bl5340_dvk/bl5340_dvk_cpuapp_common.dtsi @@ -74,6 +74,14 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + swap-xy; + invert-x; + invert-y; + }; + gpio_fwd: nrf-gpio-forwarder { compatible = "nordic,nrf-gpio-forwarder"; status = "okay"; @@ -141,7 +149,7 @@ irq-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>, <&gpio0 24 GPIO_ACTIVE_HIGH>; }; - ft5336@38 { + ft5336: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; int-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; diff --git a/boards/arm/mimxrt1050_evk/Kconfig.defconfig b/boards/arm/mimxrt1050_evk/Kconfig.defconfig index f59f3de75c3..104c6d77100 100644 --- a/boards/arm/mimxrt1050_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1050_evk/Kconfig.defconfig @@ -31,11 +31,8 @@ config FLASH_MCUX_FLEXSPI_NOR endif #FLASH -config KSCAN - default y if LVGL - config INPUT - default y if KSCAN + default y if LVGL if INPUT @@ -56,9 +53,6 @@ endif # NETWORKING if LVGL -config LV_Z_POINTER_KSCAN - default y - config LV_Z_VDB_SIZE default 16 diff --git a/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts b/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts index 666a6c351ec..04b8d3d416d 100644 --- a/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts +++ b/boards/arm/mimxrt1050_evk/mimxrt1050_evk.dts @@ -61,6 +61,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + }; + arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; @@ -219,7 +224,7 @@ arduino_serial: &lpuart3 { int2-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; }; - ft5336@38 { + ft5336: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; int-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; diff --git a/boards/arm/mimxrt1060_evk/Kconfig.defconfig b/boards/arm/mimxrt1060_evk/Kconfig.defconfig index ac7e1e29386..aef6f37c03b 100644 --- a/boards/arm/mimxrt1060_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1060_evk/Kconfig.defconfig @@ -34,11 +34,8 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH endif #FLASH -config KSCAN - default y if LVGL - config INPUT - default y if KSCAN + default y if LVGL if INPUT @@ -59,9 +56,6 @@ endif # NETWORKING if LVGL -config LV_Z_POINTER_KSCAN - default y - # LVGL should allocate buffers equal to size of display config LV_Z_VDB_SIZE default 100 diff --git a/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts b/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts index 7be0f49b2cd..b2deed94590 100644 --- a/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts +++ b/boards/arm/mimxrt1060_evk/mimxrt1060_evk.dts @@ -68,6 +68,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + }; + arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; @@ -195,7 +200,7 @@ arduino_i2c: &lpi2c1 { pinctrl-0 = <&pinmux_lpi2c1>; pinctrl-names = "default"; - ft5336@38 { + ft5336: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; int-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; diff --git a/boards/arm/mimxrt1064_evk/Kconfig.defconfig b/boards/arm/mimxrt1064_evk/Kconfig.defconfig index 8a574dc2f0e..9ebf3eaa71b 100644 --- a/boards/arm/mimxrt1064_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1064_evk/Kconfig.defconfig @@ -18,11 +18,8 @@ config DEVICE_CONFIGURATION_DATA config NXP_IMX_EXTERNAL_SDRAM default y -config KSCAN - default y if LVGL - config INPUT - default y if KSCAN + default y if LVGL if INPUT @@ -43,9 +40,6 @@ endif # NETWORKING if LVGL -config LV_Z_POINTER_KSCAN - default y - config LV_Z_VDB_SIZE default 16 diff --git a/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts b/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts index 42c036a959e..6923d0a4785 100644 --- a/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts +++ b/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts @@ -69,6 +69,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + }; + arduino_header: connector { compatible = "arduino-header-r3"; #gpio-cells = <2>; @@ -158,7 +163,7 @@ arduino_i2c: &lpi2c1 {}; }; }; - ft5336@38 { + ft5336: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; int-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; diff --git a/boards/arm/pinetime_devkit0/Kconfig.defconfig b/boards/arm/pinetime_devkit0/Kconfig.defconfig index 0edb704b90c..a90333d54a7 100644 --- a/boards/arm/pinetime_devkit0/Kconfig.defconfig +++ b/boards/arm/pinetime_devkit0/Kconfig.defconfig @@ -12,7 +12,7 @@ config BT_CTLR default BT config INPUT - default y if KSCAN + default y if LVGL if FLASH diff --git a/boards/arm/pinetime_devkit0/pinetime_devkit0.dts b/boards/arm/pinetime_devkit0/pinetime_devkit0.dts index 009c0fbaaf5..a5d7eef0e69 100644 --- a/boards/arm/pinetime_devkit0/pinetime_devkit0.dts +++ b/boards/arm/pinetime_devkit0/pinetime_devkit0.dts @@ -68,6 +68,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&cst816s>; + }; + vbatt { compatible = "voltage-divider"; io-channels = <&adc 7>; diff --git a/boards/arm/stm32f746g_disco/Kconfig.defconfig b/boards/arm/stm32f746g_disco/Kconfig.defconfig index 69ad80e9b67..cd653cd18c9 100644 --- a/boards/arm/stm32f746g_disco/Kconfig.defconfig +++ b/boards/arm/stm32f746g_disco/Kconfig.defconfig @@ -16,13 +16,10 @@ config NET_L2_ETHERNET endif # NETWORKING config INPUT - default y if KSCAN + default y if LVGL if DISPLAY -config KSCAN - default y - # MEMC needs to be enabled in order to store # display buffer to external SDRAM connected to FMC config MEMC diff --git a/boards/arm/stm32f746g_disco/stm32f746g_disco.dts b/boards/arm/stm32f746g_disco/stm32f746g_disco.dts index eddb70be0ea..6de9c8eb9bb 100644 --- a/boards/arm/stm32f746g_disco/stm32f746g_disco.dts +++ b/boards/arm/stm32f746g_disco/stm32f746g_disco.dts @@ -42,6 +42,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + }; + sdram1: sdram@c0000000 { compatible = "zephyr,memory-region", "mmio-sram"; device_type = "memory"; diff --git a/boards/arm/stm32f7508_dk/Kconfig.defconfig b/boards/arm/stm32f7508_dk/Kconfig.defconfig index a9c02111ffe..7995c1fbae7 100644 --- a/boards/arm/stm32f7508_dk/Kconfig.defconfig +++ b/boards/arm/stm32f7508_dk/Kconfig.defconfig @@ -17,9 +17,6 @@ endif # NETWORKING if DISPLAY -config KSCAN - default y - # MEMC needs to be enabled in order to store # display buffer to external SDRAM connected to FMC config MEMC @@ -28,7 +25,7 @@ config MEMC endif # DISPLAY config INPUT - default y if KSCAN + default y if LVGL if INPUT diff --git a/boards/arm/stm32f7508_dk/stm32f7508_dk.dts b/boards/arm/stm32f7508_dk/stm32f7508_dk.dts index 3b1809db66e..07f2206563e 100644 --- a/boards/arm/stm32f7508_dk/stm32f7508_dk.dts +++ b/boards/arm/stm32f7508_dk/stm32f7508_dk.dts @@ -43,6 +43,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + }; + sdram1: sdram@c0000000 { compatible = "zephyr,memory-region", "mmio-sram"; device_type = "memory"; @@ -98,7 +103,7 @@ status = "okay"; clock-frequency = ; - ft5336@38 { + ft5336: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; int-gpios = <&gpioi 13 0>; diff --git a/boards/arm/stm32f769i_disco/Kconfig.defconfig b/boards/arm/stm32f769i_disco/Kconfig.defconfig index 8ea8440dd8b..8689d03c656 100644 --- a/boards/arm/stm32f769i_disco/Kconfig.defconfig +++ b/boards/arm/stm32f769i_disco/Kconfig.defconfig @@ -13,7 +13,7 @@ config SPI_STM32_INTERRUPT depends on SPI config INPUT - default y if KSCAN + default y if LVGL if NETWORKING diff --git a/boards/arm/stm32f769i_disco/stm32f769i_disco.dts b/boards/arm/stm32f769i_disco/stm32f769i_disco.dts index de1ba818d08..d6b006e31b7 100644 --- a/boards/arm/stm32f769i_disco/stm32f769i_disco.dts +++ b/boards/arm/stm32f769i_disco/stm32f769i_disco.dts @@ -61,6 +61,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft6202>; + }; + aliases { led0 = &red_led_1; led1 = &green_led_2; @@ -125,7 +130,7 @@ arduino_serial: &usart6 {}; status = "okay"; clock-frequency = ; - ft6202@2a { + ft6202: ft6202@2a { compatible = "focaltech,ft5336"; reg = <0x2a>; int-gpios = <&gpioi 13 0>; diff --git a/boards/arm/stm32h7b3i_dk/Kconfig.defconfig b/boards/arm/stm32h7b3i_dk/Kconfig.defconfig index 45d67c67e92..8a32fb1c68f 100644 --- a/boards/arm/stm32h7b3i_dk/Kconfig.defconfig +++ b/boards/arm/stm32h7b3i_dk/Kconfig.defconfig @@ -8,11 +8,8 @@ if BOARD_STM32H7B3I_DK config BOARD default "stm32h7b3i_dk" -config KSCAN - default y if DISPLAY - config INPUT - default y if KSCAN + default y if LVGL config INPUT_FT5336_INTERRUPT default y if INPUT_FT5336 diff --git a/boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts b/boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts index 5f8aadd2895..87607966073 100644 --- a/boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts +++ b/boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts @@ -45,6 +45,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + }; + sdram2: sdram@d0000000 { compatible = "zephyr,memory-region", "mmio-sram"; device_type = "memory"; diff --git a/boards/posix/native_posix/native_posix.dts b/boards/posix/native_posix/native_posix.dts index eeadaf8ab8f..55b6f6f2b36 100644 --- a/boards/posix/native_posix/native_posix.dts +++ b/boards/posix/native_posix/native_posix.dts @@ -43,6 +43,11 @@ }; }; + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&input_sdl_touch>; + }; + cpus { #address-cells = <1>; #size-cells = <0>; diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig index fa180f92b4d..eb44e86b271 100644 --- a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig +++ b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig @@ -25,24 +25,9 @@ choice LV_COLOR_DEPTH default LV_COLOR_DEPTH_32 endchoice -config KSCAN - default y - config INPUT default y -config LV_Z_POINTER_KSCAN - default y - -config LV_Z_POINTER_KSCAN_SWAP_XY - default y - -config LV_Z_POINTER_KSCAN_INVERT_X - default y - -config LV_Z_POINTER_KSCAN_INVERT_Y - default y - endif # LVGL endif # DISPLAY diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/dts/adafruit_2_8_tft_touch_v2.dtsi b/boards/shields/adafruit_2_8_tft_touch_v2/dts/adafruit_2_8_tft_touch_v2.dtsi index e273d39c32b..b6ba21654a4 100644 --- a/boards/shields/adafruit_2_8_tft_touch_v2/dts/adafruit_2_8_tft_touch_v2.dtsi +++ b/boards/shields/adafruit_2_8_tft_touch_v2/dts/adafruit_2_8_tft_touch_v2.dtsi @@ -11,6 +11,14 @@ zephyr,display = &ili9340; zephyr,keyboard-scan = &kscan_input; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336_adafruit_2_8_tft_touch_v2>; + swap-xy; + invert-x; + invert-y; + }; }; &arduino_spi { @@ -49,7 +57,7 @@ }; &arduino_i2c { - ft5336@38 { + ft5336_adafruit_2_8_tft_touch_v2: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; /* Uncomment if IRQ line is available (requires to solder jumper) */ diff --git a/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig b/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig index 7e299c6b372..2e9c0a6ed8a 100644 --- a/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig +++ b/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig @@ -28,24 +28,9 @@ endchoice config LV_COLOR_16_SWAP default y -config KSCAN - default y - config INPUT default y -config LV_Z_POINTER_KSCAN - default y - -config LV_Z_POINTER_KSCAN_SWAP_XY - default y - -config LV_Z_POINTER_KSCAN_INVERT_X - default y - -config LV_Z_POINTER_KSCAN_INVERT_Y - default y - endif # LVGL endif # DISPLAY diff --git a/boards/shields/buydisplay_2_8_tft_touch_arduino/buydisplay_2_8_tft_touch_arduino.overlay b/boards/shields/buydisplay_2_8_tft_touch_arduino/buydisplay_2_8_tft_touch_arduino.overlay index 1cfd478f05f..fbc7f610791 100644 --- a/boards/shields/buydisplay_2_8_tft_touch_arduino/buydisplay_2_8_tft_touch_arduino.overlay +++ b/boards/shields/buydisplay_2_8_tft_touch_arduino/buydisplay_2_8_tft_touch_arduino.overlay @@ -11,6 +11,14 @@ zephyr,display = &ili9340_buydisplay_2_8_tft_touch_arduino; zephyr,keyboard-scan = &kscan_input; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336_buydisplay_2_8_tft_touch_arduino>; + swap-xy; + invert-x; + invert-y; + }; }; &arduino_spi { @@ -37,7 +45,7 @@ }; &arduino_i2c { - ft5336@38 { + ft5336_buydisplay_2_8_tft_touch_arduino: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; /* Uncomment if IRQ line is available (requires to solder jumper) */ diff --git a/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig b/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig index b2556e6aa10..1e95dee988e 100644 --- a/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig +++ b/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig @@ -25,24 +25,9 @@ choice LV_COLOR_DEPTH default LV_COLOR_DEPTH_16 endchoice -config KSCAN - default y - config INPUT default y -config LV_Z_POINTER_KSCAN - default y - -config LV_Z_POINTER_KSCAN_SWAP_XY - default y - -config LV_Z_POINTER_KSCAN_INVERT_X - default y - -config LV_Z_POINTER_KSCAN_INVERT_Y - default y - endif # LVGL endif # DISPLAY diff --git a/boards/shields/buydisplay_3_5_tft_touch_arduino/buydisplay_3_5_tft_touch_arduino.overlay b/boards/shields/buydisplay_3_5_tft_touch_arduino/buydisplay_3_5_tft_touch_arduino.overlay index 8f63c485160..741b8978f25 100644 --- a/boards/shields/buydisplay_3_5_tft_touch_arduino/buydisplay_3_5_tft_touch_arduino.overlay +++ b/boards/shields/buydisplay_3_5_tft_touch_arduino/buydisplay_3_5_tft_touch_arduino.overlay @@ -11,6 +11,14 @@ zephyr,display = &ili9488_buydisplay_3_5_tft_touch_arduino; zephyr,keyboard-scan = &kscan_input; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336_buydisplay_3_5_tft_touch_arduino>; + swap-xy; + invert-x; + invert-y; + }; }; &arduino_spi { @@ -36,7 +44,7 @@ }; &arduino_i2c { - ft5336@38 { + ft5336_buydisplay_3_5_tft_touch_arduino: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; /* Uncomment if IRQ line is available (requires to solder jumper) */ diff --git a/boards/shields/g1120b0mipi/Kconfig.defconfig b/boards/shields/g1120b0mipi/Kconfig.defconfig index 18c5e7af45e..807183c4742 100644 --- a/boards/shields/g1120b0mipi/Kconfig.defconfig +++ b/boards/shields/g1120b0mipi/Kconfig.defconfig @@ -11,20 +11,6 @@ config INPUT config INPUT_FT5336_INTERRUPT default y -# KSCAN subsystem must be enabled for KSCAN input shim driver -config KSCAN - default y - -# Configure LVGL to use touchscreen with KSCAN API -config LV_Z_POINTER_KSCAN - default y - -# Y coordinates need to be inverted for this controller. Note that -# the RM67162 display driver also reports the display orientation as rotated -# by 90 degrees, so LVGL will read coordinates correctly. -config LV_Z_POINTER_KSCAN_INVERT_Y - default y - # Swap 16 bit color setting for LVGL, to send high byte first config LV_COLOR_16_SWAP default y diff --git a/boards/shields/g1120b0mipi/g1120b0mipi.overlay b/boards/shields/g1120b0mipi/g1120b0mipi.overlay index a60fac33121..1d97b4d0a25 100644 --- a/boards/shields/g1120b0mipi/g1120b0mipi.overlay +++ b/boards/shields/g1120b0mipi/g1120b0mipi.overlay @@ -20,11 +20,17 @@ enable-gpios = <&nxp_mipi_connector 32 GPIO_ACTIVE_HIGH>; regulator-boot-on; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft3267_g1120b0mipi>; + invert-y; + }; }; &nxp_mipi_i2c { status = "okay"; - ft3267@38 { + ft3267_g1120b0mipi: ft3267@38 { /* * Note- the actual controller present on this IC is a FT3267, * but the FT35336 driver in Zephyr supports this IC. diff --git a/boards/shields/rk055hdmipi4m/Kconfig.defconfig b/boards/shields/rk055hdmipi4m/Kconfig.defconfig index 32c8cff734e..c753db84875 100644 --- a/boards/shields/rk055hdmipi4m/Kconfig.defconfig +++ b/boards/shields/rk055hdmipi4m/Kconfig.defconfig @@ -14,20 +14,12 @@ endif # DISPLAY if LVGL -# Configure LVGL to use touchscreen with KSCAN API - -config KSCAN - default y - config INPUT - default y if KSCAN + default y config INPUT_GT911_INTERRUPT default y -config LV_Z_POINTER_KSCAN - default y - # LVGL should allocate buffers equal to size of display config LV_Z_VDB_SIZE default 100 diff --git a/boards/shields/rk055hdmipi4m/rk055hdmipi4m.overlay b/boards/shields/rk055hdmipi4m/rk055hdmipi4m.overlay index ae1c42a5214..f7cb1a8377b 100644 --- a/boards/shields/rk055hdmipi4m/rk055hdmipi4m.overlay +++ b/boards/shields/rk055hdmipi4m/rk055hdmipi4m.overlay @@ -22,11 +22,16 @@ enable-gpios = <&nxp_mipi_connector 32 GPIO_ACTIVE_HIGH>; regulator-boot-on; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <>911_rk055hdmipi4m>; + }; }; &nxp_mipi_i2c { status = "okay"; - touch_controller: gt911@5d { + gt911_rk055hdmipi4m: gt911@5d { compatible = "goodix,gt911"; reg = <0x5d>; irq-gpios = <&nxp_mipi_connector 29 GPIO_ACTIVE_HIGH>; diff --git a/boards/shields/rk055hdmipi4ma0/Kconfig.defconfig b/boards/shields/rk055hdmipi4ma0/Kconfig.defconfig index f9cd659d455..938ebb3b070 100644 --- a/boards/shields/rk055hdmipi4ma0/Kconfig.defconfig +++ b/boards/shields/rk055hdmipi4ma0/Kconfig.defconfig @@ -16,18 +16,12 @@ if LVGL # Configure LVGL to use touchscreen with KSCAN API -config KSCAN - default y - config INPUT - default y if KSCAN + default y config INPUT_GT911_INTERRUPT default y -config LV_Z_POINTER_KSCAN - default y - # LVGL should allocate buffers equal to size of display config LV_Z_VDB_SIZE default 100 diff --git a/boards/shields/rk055hdmipi4ma0/rk055hdmipi4ma0.overlay b/boards/shields/rk055hdmipi4ma0/rk055hdmipi4ma0.overlay index c7e5e3966a9..d3b94ce6e72 100644 --- a/boards/shields/rk055hdmipi4ma0/rk055hdmipi4ma0.overlay +++ b/boards/shields/rk055hdmipi4ma0/rk055hdmipi4ma0.overlay @@ -22,11 +22,16 @@ enable-gpios = <&nxp_mipi_connector 32 GPIO_ACTIVE_HIGH>; regulator-boot-on; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <>911_rk055hdmipi4ma0>; + }; }; &nxp_mipi_i2c { status = "okay"; - touch_controller_rk055hdmipi4ma0: gt911-rk055hdmipi4ma0@5d { + gt911_rk055hdmipi4ma0: gt911-rk055hdmipi4ma0@5d { compatible = "goodix,gt911"; reg = <0x5d>; irq-gpios = <&nxp_mipi_connector 29 GPIO_ACTIVE_HIGH>;