Skip to content

Commit 65d6bcc

Browse files
committed
boards: shields: st: enable the touch input on st_lcd_dsi_mb1835
Add devicetree and configuration for the touch controller on STM32U5G9J-DK1 and st_lcd_dsi_mb1835 shield. Signed-off-by: Charles Dias <[email protected]>
1 parent 916696c commit 65d6bcc

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed

boards/shields/st_lcd_dsi_mb1835/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ if SHIELD_ST_LCD_DSI_MB1835
55

66
orsource "boards/*.defconfig"
77

8+
config INPUT
9+
default y if LVGL
10+
811
if LVGL
912

1013
config LV_Z_BITS_PER_PIXEL

boards/shields/st_lcd_dsi_mb1835/doc/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ Set ``--shield "st_lcd_dsi_mb1835"`` when you invoke ``west build``. For example
116116
:shield: st_lcd_dsi_mb1835
117117
:goals: build
118118

119+
You can test both the display and the capacitive touch using the
120+
``samples/subsys/input/draw_touch_events`` sample:
121+
122+
.. zephyr-app-commands::
123+
:zephyr-app: samples/subsys/input/draw_touch_events
124+
:board: stm32u5g9j_dk1
125+
:shield: st_lcd_dsi_mb1835
126+
:goals: build
127+
128+
This sample renders a cross that follows your finger and is a quick way to
129+
verify that the panel, LTDC, and touch controller are wired and configured
130+
correctly on STM32U5G9J-DK1 with this shield.
131+
119132
References
120133
**********
121134

boards/shields/st_lcd_dsi_mb1835/st_lcd_dsi_mb1835.overlay

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
/ {
1010
chosen {
1111
zephyr,display = &zephyr_lcd_controller;
12+
zephyr,touch = &st1633i;
13+
};
14+
15+
lvgl_pointer {
16+
compatible = "zephyr,lvgl-pointer-input";
17+
input = <&st1633i>;
1218
};
1319
};
1420

@@ -111,3 +117,12 @@
111117
vfront-porch = <50>;
112118
};
113119
};
120+
121+
&qsh_030_i2c {
122+
st1633i: st1633i@70 {
123+
compatible = "sitronix,cf1133";
124+
reg = <0x70>;
125+
int-gpios = <&dsi_lcd_qsh_030 4 GPIO_ACTIVE_LOW>;
126+
status = "okay";
127+
};
128+
};

boards/st/stm32u5g9j_dk1/doc/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,22 @@ Here is an example for the :zephyr:code-sample:`blinky` application.
140140
:goals: debug
141141

142142

143+
Using the ST LCD DSI MB1835 shield
144+
**********************************
145+
146+
The :ref:`st_lcd_dsi_mb1835` shield provides a 480x480 round LCD panel with
147+
capacitive touch for this board via MIPI DSI and I2C. You can exercise both
148+
display and touch using the :zephyr:code-sample:`draw_touch_events` sample:
149+
150+
.. zephyr-app-commands::
151+
:zephyr-app: samples/subsys/input/draw_touch_events
152+
:board: stm32u5g9j_dk1
153+
:shield: st_lcd_dsi_mb1835
154+
:goals: build flash
155+
156+
See the shield documentation for details: :ref:`st_lcd_dsi_mb1835`.
157+
158+
143159
.. _STM32U5G9J-DK1 website:
144160
https://www.st.com/en/evaluation-tools/stm32u5g9j-dk1.html
145161

boards/st/stm32u5g9j_dk1/stm32u5g9j_dk1.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,13 @@ zephyr_udc0: &usbotg_hs {
311311
status = "okay";
312312
};
313313

314+
qsh_030_i2c: &i2c5 {
315+
pinctrl-0 = <&i2c5_scl_ph5 &i2c5_sda_ph4>;
316+
pinctrl-names = "default";
317+
clock-frequency = <I2C_BITRATE_FAST>;
318+
status = "okay";
319+
};
320+
314321
/* alias used by display shields */
315322
zephyr_mipi_dsi: &mipi_dsi {};
316323

0 commit comments

Comments
 (0)