boards: stm32h573i_dk: add touch panel support

- The stm32h573i_dk board uses a ft3267 i2c controller for the touchscreen
connected on i2c4.
  - The zephyr driver ft5336 can control it.
- Use the I2C STM32 V2 Timing calculation.

Signed-off-by: Samuel Quiniou <samuel.quiniou@rtone.fr>
This commit is contained in:
Samuel Quiniou 2025-05-04 18:04:26 +02:00 committed by Benjamin Cabé
commit 13808aee26
3 changed files with 32 additions and 5 deletions

View file

@ -31,6 +31,12 @@ endchoice
config REGULATOR
default y
config INPUT
default y if LVGL
config I2C_STM32_V2_TIMING
default y if INPUT
endif # DISPLAY
endif # BOARD_STM32H573I_DK

View file

@ -180,14 +180,14 @@ Serial Port
STM32H573I-DK Discovery board has 3 U(S)ARTs. The Zephyr console output is
assigned to USART1. Default settings are 115200 8N1.
TFT LCD screen
--------------
TFT LCD screen and touch panel
------------------------------
The TFT LCD screen is supported for the STM32H573I-DK Discovery board.
It can be tested using :zephyr:code-sample:`display` sample:
The TFT LCD screen and touch panel are supported for the STM32H573I-DK Discovery board.
They can be tested using :zephyr:code-sample:`lvgl` sample:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/display
:zephyr-app: samples/subsys/display/lvgl
:board: stm32h573i_dk
:goals: build

View file

@ -80,6 +80,13 @@
/* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>;
};
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft3267>;
display = <&st7789v>;
invert-y;
};
};
&fmc {
@ -200,6 +207,20 @@
status = "okay";
};
&i2c4 {
pinctrl-0 = <&i2c4_scl_pb8 &i2c4_sda_pb9>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
ft3267: ft3267@38 {
compatible = "focaltech,ft5336";
reg = <0x38>;
int-gpios = <&gpiog 7 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpiog 3 GPIO_ACTIVE_LOW>;
};
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default";