openwrt/target/linux/bcm27xx/patches-5.10/950-0381-dtoverlays-Add-an-...

97 lines
2.8 KiB
Diff

From e7972981794db2cfa349aa5d34171f83d4ffe830 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Fri, 6 Nov 2020 18:52:25 +0000
Subject: [PATCH] dtoverlays: Add an overlay for the EDT FT5406
touchscreen
This touchscreen controller is used by the 7" DSI panel, and
this overlay configures it for when it is NOT being polled by
the firmware.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 14 +++++++
.../boot/dts/overlays/edt-ft5406-overlay.dts | 42 +++++++++++++++++++
3 files changed, 57 insertions(+)
create mode 100644 arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -40,6 +40,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
draws.dtbo \
dwc-otg.dtbo \
dwc2.dtbo \
+ edt-ft5406.dtbo \
enc28j60.dtbo \
enc28j60-spi2.dtbo \
exc3000.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -733,6 +733,20 @@ Params: dr_mode Dual rol
[ The ds1307-rtc overlay has been deleted. See i2c-rtc. ]
+Name: edt-ft5406
+Info: Overlay for the EDT FT5406 touchscreen on the CSI/DSI I2C interface.
+ This works with the Raspberry Pi 7" touchscreen when not being polled
+ by the firmware.
+ 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>
+Params: sizex Touchscreen size x (default 800)
+ sizey Touchscreen size y (default 480)
+ invx Touchscreen inverted x axis
+ invy Touchscreen inverted y axis
+ swapxy Touchscreen swapped x y axis
+
+
Name: enc28j60
Info: Overlay for the Microchip ENC28J60 Ethernet Controller on SPI0
Load: dtoverlay=enc28j60,<param>=<val>
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/edt-ft5406-overlay.dts
@@ -0,0 +1,42 @@
+/*
+ * Device Tree overlay for RaspberryPi 7" Touchscreen panel
+ *
+ */
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&i2c_csi_dsi>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ ft5406: ts@38 {
+ compatible = "edt,edt-ft5406";
+ reg = <0x38>;
+
+ touchscreen-size-x = < 800 >;
+ touchscreen-size-y = < 480 >;
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&i2c0if>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ __overrides__ {
+ sizex = <&ft5406>,"touchscreen-size-x:0";
+ sizey = <&ft5406>,"touchscreen-size-y:0";
+ invx = <&ft5406>,"touchscreen-inverted-x?";
+ invy = <&ft5406>,"touchscreen-inverted-y?";
+ swapxy = <&ft5406>,"touchscreen-swapped-x-y?";
+ };
+};