cf703b0029565363af1a6f7eca42576cca40cf85
[openwrt/staging/ldir.git] /
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
5
6 Adds the option for the touch controller to be connected to any
7 of the I2C ports.
8
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
10 ---
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(-)
15
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
19
20
21 Name: edt-ft5406
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
25 by the firmware.
26 + By default the overlay uses the i2c_csi_dsi I2C interface, but this
27 + can be overridden
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
47 + specified address.
48
49
50 Name: enc28j60
51 --- a/arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
52 +++ b/arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
53 @@ -23,4 +23,24 @@
54 status = "okay";
55 };
56 };
57 +
58 + __overrides__ {
59 + i2c0 = <&frag13>,"target:0=",<&i2c0>;
60 + i2c1 = <&frag13>, "target?=0",
61 + <&frag13>, "target-path=i2c1",
62 + <0>,"-0-1";
63 + i2c3 = <&frag13>, "target?=0",
64 + <&frag13>, "target-path=i2c3",
65 + <0>,"-0-1";
66 + i2c4 = <&frag13>, "target?=0",
67 + <&frag13>, "target-path=i2c4",
68 + <0>,"-0-1";
69 + i2c5 = <&frag13>, "target?=0",
70 + <&frag13>, "target-path=i2c5",
71 + <0>,"-0-1";
72 + i2c6 = <&frag13>, "target?=0",
73 + <&frag13>, "target-path=i2c6",
74 + <0>,"-0-1";
75 + addr = <&ft5406>,"reg:0";
76 + };
77 };
78 --- a/arch/arm/boot/dts/overlays/edt-ft5406.dtsi
79 +++ b/arch/arm/boot/dts/overlays/edt-ft5406.dtsi
80 @@ -23,7 +23,7 @@
81 };
82
83 fragment@12 {
84 - target = <&i2c_csi_dsi>;
85 + target = <&i2cbus>;
86 __overlay__ {
87 #address-cells = <1>;
88 #size-cells = <0>;
89 @@ -37,6 +37,13 @@
90 };
91 };
92
93 + frag13: fragment@13 {
94 + target = <&i2c_csi_dsi>;
95 + i2cbus: __overlay__ {
96 + status = "okay";
97 + };
98 + };
99 +
100 __overrides__ {
101 sizex = <&ft5406>,"touchscreen-size-x:0";
102 sizey = <&ft5406>,"touchscreen-size-y:0";