1 From 3fa2fbb7f6e60b85086e454403c5eab1af63b1aa Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 14 Jun 2023 13:43:58 +0100
4 Subject: [PATCH] dtoverlays: Add i2c bus overrides to edt-ft5406 overlay
6 Adds the option for the touch controller to be connected to any
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 arch/arm/boot/dts/overlays/README | 17 +++++++++++++++-
12 .../boot/dts/overlays/edt-ft5406-overlay.dts | 20 +++++++++++++++++++
13 arch/arm/boot/dts/overlays/edt-ft5406.dtsi | 9 ++++++++-
14 3 files changed, 44 insertions(+), 2 deletions(-)
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -1040,9 +1040,11 @@ Params: dr_mode Dual rol
22 -Info: Overlay for the EDT FT5406 touchscreen on the CSI/DSI I2C interface.
23 +Info: Overlay for the EDT FT5406 touchscreen.
24 This works with the Raspberry Pi 7" touchscreen when not being polled
26 + By default the overlay uses the i2c_csi_dsi I2C interface, but this
28 You MUST use either "disable_touchscreen=1" or "ignore_lcd=1" in
29 config.txt to stop the firmware polling the touchscreen.
30 Load: dtoverlay=edt-ft5406,<param>=<val>
31 @@ -1051,6 +1053,19 @@ Params: sizex Touchscr
32 invx Touchscreen inverted x axis
33 invy Touchscreen inverted y axis
34 swapxy Touchscreen swapped x y axis
35 + i2c0 Choose the I2C0 bus on GPIOs 0&1
36 + i2c1 Choose the I2C1 bus on GPIOs 2&3
37 + i2c3 Choose the I2C3 bus (configure with the i2c3
38 + overlay - BCM2711 only)
39 + i2c4 Choose the I2C4 bus (configure with the i2c4
40 + overlay - BCM2711 only)
41 + i2c5 Choose the I2C5 bus (configure with the i2c5
42 + overlay - BCM2711 only)
43 + i2c6 Choose the I2C6 bus (configure with the i2c6
44 + overlay - BCM2711 only)
45 + addr Sets the address for the touch controller. Note
46 + that the device must be configured to use the
51 --- a/arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
52 +++ b/arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
59 + i2c0 = <&frag13>,"target:0=",<&i2c0>;
60 + i2c1 = <&frag13>, "target?=0",
61 + <&frag13>, "target-path=i2c1",
63 + i2c3 = <&frag13>, "target?=0",
64 + <&frag13>, "target-path=i2c3",
66 + i2c4 = <&frag13>, "target?=0",
67 + <&frag13>, "target-path=i2c4",
69 + i2c5 = <&frag13>, "target?=0",
70 + <&frag13>, "target-path=i2c5",
72 + i2c6 = <&frag13>, "target?=0",
73 + <&frag13>, "target-path=i2c6",
75 + addr = <&ft5406>,"reg:0";
78 --- a/arch/arm/boot/dts/overlays/edt-ft5406.dtsi
79 +++ b/arch/arm/boot/dts/overlays/edt-ft5406.dtsi
84 - target = <&i2c_csi_dsi>;
93 + frag13: fragment@13 {
94 + target = <&i2c_csi_dsi>;
95 + i2cbus: __overlay__ {
101 sizex = <&ft5406>,"touchscreen-size-x:0";
102 sizey = <&ft5406>,"touchscreen-size-y:0";