Skip to content

Commit

Permalink
dtoverlays: Add i2c bus overrides to edt-ft5406 overlay
Browse files Browse the repository at this point in the history
Adds the option for the touch controller to be connected to any
of the I2C ports.

Signed-off-by: Dave Stevenson <[email protected]>
  • Loading branch information
6by9 committed Aug 30, 2023
1 parent 655fc65 commit d2b4c91
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
17 changes: 16 additions & 1 deletion arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,11 @@ Params: dr_mode Dual role mode: "host", "peripheral" or "otg"


Name: edt-ft5406
Info: Overlay for the EDT FT5406 touchscreen on the CSI/DSI I2C interface.
Info: Overlay for the EDT FT5406 touchscreen.
This works with the Raspberry Pi 7" touchscreen when not being polled
by the firmware.
By default the overlay uses the i2c_csi_dsi I2C interface, but this
can be overridden
You MUST use either "disable_touchscreen=1" or "ignore_lcd=1" in
config.txt to stop the firmware polling the touchscreen.
Load: dtoverlay=edt-ft5406,<param>=<val>
Expand All @@ -1051,6 +1053,19 @@ Params: sizex Touchscreen size x (default 800)
invx Touchscreen inverted x axis
invy Touchscreen inverted y axis
swapxy Touchscreen swapped x y axis
i2c0 Choose the I2C0 bus on GPIOs 0&1
i2c1 Choose the I2C1 bus on GPIOs 2&3
i2c3 Choose the I2C3 bus (configure with the i2c3
overlay - BCM2711 only)
i2c4 Choose the I2C4 bus (configure with the i2c4
overlay - BCM2711 only)
i2c5 Choose the I2C5 bus (configure with the i2c5
overlay - BCM2711 only)
i2c6 Choose the I2C6 bus (configure with the i2c6
overlay - BCM2711 only)
addr Sets the address for the touch controller. Note
that the device must be configured to use the
specified address.


Name: enc28j60
Expand Down
20 changes: 20 additions & 0 deletions arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,24 @@
status = "okay";
};
};

__overrides__ {
i2c0 = <&frag13>,"target:0=",<&i2c0>;
i2c1 = <&frag13>, "target?=0",
<&frag13>, "target-path=i2c1",
<0>,"-0-1";
i2c3 = <&frag13>, "target?=0",
<&frag13>, "target-path=i2c3",
<0>,"-0-1";
i2c4 = <&frag13>, "target?=0",
<&frag13>, "target-path=i2c4",
<0>,"-0-1";
i2c5 = <&frag13>, "target?=0",
<&frag13>, "target-path=i2c5",
<0>,"-0-1";
i2c6 = <&frag13>, "target?=0",
<&frag13>, "target-path=i2c6",
<0>,"-0-1";
addr = <&ft5406>,"reg:0";
};
};
9 changes: 8 additions & 1 deletion arch/arm/boot/dts/overlays/edt-ft5406.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
};

fragment@12 {
target = <&i2c_csi_dsi>;
target = <&i2cbus>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
Expand All @@ -37,6 +37,13 @@
};
};

frag13: fragment@13 {
target = <&i2c_csi_dsi>;
i2cbus: __overlay__ {
status = "okay";
};
};

__overrides__ {
sizex = <&ft5406>,"touchscreen-size-x:0";
sizey = <&ft5406>,"touchscreen-size-y:0";
Expand Down

0 comments on commit d2b4c91

Please sign in to comment.