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 <fabianblatz@gmail.com>
This commit is contained in:
Fabian Blatz 2023-08-30 10:01:39 +02:00 committed by Carles Cufí
parent cad51f874c
commit 42c6f3311b
31 changed files with 115 additions and 143 deletions

View file

@ -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

View file

@ -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>;

View file

@ -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

View file

@ -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>;

View file

@ -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

View file

@ -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>;

View file

@ -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

View file

@ -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>;

View file

@ -12,7 +12,7 @@ config BT_CTLR
default BT
config INPUT
default y if KSCAN
default y if LVGL
if FLASH

View file

@ -68,6 +68,11 @@
};
};
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&cst816s>;
};
vbatt {
compatible = "voltage-divider";
io-channels = <&adc 7>;

View file

@ -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

View file

@ -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";

View file

@ -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

View file

@ -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 = <I2C_BITRATE_FAST>;
ft5336@38 {
ft5336: ft5336@38 {
compatible = "focaltech,ft5336";
reg = <0x38>;
int-gpios = <&gpioi 13 0>;

View file

@ -13,7 +13,7 @@ config SPI_STM32_INTERRUPT
depends on SPI
config INPUT
default y if KSCAN
default y if LVGL
if NETWORKING

View file

@ -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 = <I2C_BITRATE_FAST>;
ft6202@2a {
ft6202: ft6202@2a {
compatible = "focaltech,ft5336";
reg = <0x2a>;
int-gpios = <&gpioi 13 0>;

View file

@ -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

View file

@ -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";

View file

@ -43,6 +43,11 @@
};
};
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&input_sdl_touch>;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;

View file

@ -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

View file

@ -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) */

View file

@ -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

View file

@ -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) */

View file

@ -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

View file

@ -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) */

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -22,11 +22,16 @@
enable-gpios = <&nxp_mipi_connector 32 GPIO_ACTIVE_HIGH>;
regulator-boot-on;
};
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&gt911_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>;

View file

@ -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

View file

@ -22,11 +22,16 @@
enable-gpios = <&nxp_mipi_connector 32 GPIO_ACTIVE_HIGH>;
regulator-boot-on;
};
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&gt911_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>;