shields: adafruit_2_8_tft_touch_v2: enable touch input support
Enable FT6x06 controller driver and touch input support.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
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 b3b02c1..4b5a0e1 100644
--- a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig
+++ b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig
@@ -11,6 +11,22 @@
config ILI9340
default y
+if KSCAN
+
+config I2C
+ default y
+
+config KSCAN_FT5336
+ default y
+
+config KSCAN_FT5336_INTERRUPT
+ default n
+
+config KSCAN_INIT_PRIORITY
+ default 60
+
+endif # KSCAN
+
if LVGL
config LVGL_DISPLAY_DEV_NAME
@@ -28,6 +44,15 @@
config LVGL_BITS_PER_PIXEL
default 24
+config KSCAN
+ default y
+
+config LVGL_POINTER_KSCAN
+ default y
+
+config LVGL_POINTER_KSCAN_DEV_NAME
+ default "FT5336"
+
endif # LVGL
endif # DISPLAY
diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/adafruit_2_8_tft_touch_v2.overlay b/boards/shields/adafruit_2_8_tft_touch_v2/adafruit_2_8_tft_touch_v2.overlay
index 3784497..93b856f 100644
--- a/boards/shields/adafruit_2_8_tft_touch_v2/adafruit_2_8_tft_touch_v2.overlay
+++ b/boards/shields/adafruit_2_8_tft_touch_v2/adafruit_2_8_tft_touch_v2.overlay
@@ -17,3 +17,11 @@
cmd-data-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
};
};
+
+&arduino_i2c {
+ touch_controller: ft5336@38 {
+ compatible = "focaltech,ft5336";
+ reg = <0x38>;
+ label = "FT5336";
+ };
+};
diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/doc/index.rst b/boards/shields/adafruit_2_8_tft_touch_v2/doc/index.rst
index 6d27dec..ddad8c1 100644
--- a/boards/shields/adafruit_2_8_tft_touch_v2/doc/index.rst
+++ b/boards/shields/adafruit_2_8_tft_touch_v2/doc/index.rst
@@ -11,7 +11,7 @@
This shield comes with a resistive (STMPE610 controller)
or capacitive (FT6206 controller) touchscreen. While the
Zephyr RTOS supports display output to these screens,
-it currently does not support touchscreen input.
+touchscreen input is supported only on Capacitive Touch version.
More information about the shield can be found
at the `Adafruit 2.8" TFT Touch Shield v2 website`_.