Skip to content

Commit 2e25820

Browse files
erwangokartben
authored andcommitted
boards: stm32n6570_dk: Add touch screen support
Configure touch screen on stm32n6570_dk. Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
1 parent 5406259 commit 2e25820

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

boards/st/stm32n6570_dk/Kconfig.defconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ endif # NETWORKING
1414

1515
if DISPLAY
1616

17+
config INPUT
18+
default y
19+
20+
config I2C_STM32_V2_TIMING
21+
default y if INPUT
22+
1723
# MEMC needs to be enabled in order to store
1824
# display frame buffer to external PSRAM
1925
config MEMC

boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@
1919
zephyr,sram = &axisram2;
2020
zephyr,canbus = &fdcan1;
2121
zephyr,display = &ltdc;
22+
zephyr,touch = &gt911;
2223
spi-flash0 = &mx66uw1g45g;
2324
};
2425

2526
aliases {
2627
led0 = &green_led_1;
2728
};
2829

30+
lvgl_pointer {
31+
compatible = "zephyr,lvgl-pointer-input";
32+
input = <&gt911>;
33+
display = <&ltdc>;
34+
invert-y;
35+
};
36+
2937
psram: memory@90000000 {
3038
compatible = "zephyr,memory-region";
3139
reg = <0x90000000 DT_SIZE_M(32)>;
@@ -48,6 +56,21 @@
4856
};
4957
};
5058

59+
&i2c2 {
60+
status = "okay";
61+
clocks = <&rcc STM32_CLOCK(APB1, 22)>,
62+
<&rcc STM32_SRC_CKPER I2C2_SEL(1)>;
63+
pinctrl-0 = <&i2c2_scl_pd14 &i2c2_sda_pd4>;
64+
pinctrl-names = "default";
65+
clock-frequency = <I2C_BITRATE_FAST>;
66+
67+
gt911: gt911@5d {
68+
compatible = "goodix,gt911";
69+
reg = <0x5d>;
70+
reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
71+
};
72+
};
73+
5174
&clk_hse {
5275
hse-div2;
5376
clock-frequency = <DT_FREQ_M(48)>;

0 commit comments

Comments
 (0)