238b9ae2f612d42a5b556cdfa701968c37f51786
[openwrt/staging/linusw.git] /
1 From e7972981794db2cfa349aa5d34171f83d4ffe830 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 6 Nov 2020 18:52:25 +0000
4 Subject: [PATCH] dtoverlays: Add an overlay for the EDT FT5406
5 touchscreen
6
7 This touchscreen controller is used by the 7" DSI panel, and
8 this overlay configures it for when it is NOT being polled by
9 the firmware.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 arch/arm/boot/dts/overlays/Makefile | 1 +
14 arch/arm/boot/dts/overlays/README | 14 +++++++
15 .../boot/dts/overlays/edt-ft5406-overlay.dts | 42 +++++++++++++++++++
16 3 files changed, 57 insertions(+)
17 create mode 100644 arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
18
19 --- a/arch/arm/boot/dts/overlays/Makefile
20 +++ b/arch/arm/boot/dts/overlays/Makefile
21 @@ -40,6 +40,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
22 draws.dtbo \
23 dwc-otg.dtbo \
24 dwc2.dtbo \
25 + edt-ft5406.dtbo \
26 enc28j60.dtbo \
27 enc28j60-spi2.dtbo \
28 exc3000.dtbo \
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -733,6 +733,20 @@ Params: dr_mode Dual rol
32 [ The ds1307-rtc overlay has been deleted. See i2c-rtc. ]
33
34
35 +Name: edt-ft5406
36 +Info: Overlay for the EDT FT5406 touchscreen on the CSI/DSI I2C interface.
37 + This works with the Raspberry Pi 7" touchscreen when not being polled
38 + by the firmware.
39 + You MUST use either "disable_touchscreen=1" or "ignore_lcd=1" in
40 + config.txt to stop the firmware polling the touchscreen.
41 +Load: dtoverlay=edt-ft5406,<param>=<val>
42 +Params: sizex Touchscreen size x (default 800)
43 + sizey Touchscreen size y (default 480)
44 + invx Touchscreen inverted x axis
45 + invy Touchscreen inverted y axis
46 + swapxy Touchscreen swapped x y axis
47 +
48 +
49 Name: enc28j60
50 Info: Overlay for the Microchip ENC28J60 Ethernet Controller on SPI0
51 Load: dtoverlay=enc28j60,<param>=<val>
52 --- /dev/null
53 +++ b/arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
54 @@ -0,0 +1,42 @@
55 +/*
56 + * Device Tree overlay for RaspberryPi 7" Touchscreen panel
57 + *
58 + */
59 +
60 +/dts-v1/;
61 +/plugin/;
62 +
63 +/ {
64 + compatible = "brcm,bcm2835";
65 +
66 + fragment@0 {
67 + target = <&i2c_csi_dsi>;
68 + __overlay__ {
69 + #address-cells = <1>;
70 + #size-cells = <0>;
71 + status = "okay";
72 + ft5406: ts@38 {
73 + compatible = "edt,edt-ft5406";
74 + reg = <0x38>;
75 +
76 + touchscreen-size-x = < 800 >;
77 + touchscreen-size-y = < 480 >;
78 + };
79 + };
80 + };
81 +
82 + fragment@1 {
83 + target = <&i2c0if>;
84 + __overlay__ {
85 + status = "okay";
86 + };
87 + };
88 +
89 + __overrides__ {
90 + sizex = <&ft5406>,"touchscreen-size-x:0";
91 + sizey = <&ft5406>,"touchscreen-size-y:0";
92 + invx = <&ft5406>,"touchscreen-inverted-x?";
93 + invy = <&ft5406>,"touchscreen-inverted-y?";
94 + swapxy = <&ft5406>,"touchscreen-swapped-x-y?";
95 + };
96 +};