cc4e2039da69013e06e36f248171303c8e34daf3
[openwrt/staging/robimarko.git] /
1 From 818fff9eed1c36f404f0556a0b239b43799a094b Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 10 Nov 2020 17:49:35 +0000
4 Subject: [PATCH] Add devicetree support for RaspberryPi 7" panel over
5 DSI I2C
6
7 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
8 ---
9 arch/arm/boot/dts/overlays/Makefile | 1 +
10 arch/arm/boot/dts/overlays/README | 8 +++
11 .../overlays/vc4-kms-dsi-7inch-overlay.dts | 56 +++++++++++++++++++
12 3 files changed, 65 insertions(+)
13 create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-dsi-7inch-overlay.dts
14
15 --- a/arch/arm/boot/dts/overlays/Makefile
16 +++ b/arch/arm/boot/dts/overlays/Makefile
17 @@ -201,6 +201,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
18 upstream.dtbo \
19 upstream-pi4.dtbo \
20 vc4-fkms-v3d.dtbo \
21 + vc4-kms-dsi-7inch.dtbo \
22 vc4-kms-kippah-7inch.dtbo \
23 vc4-kms-v3d.dtbo \
24 vc4-kms-v3d-pi4.dtbo \
25 --- a/arch/arm/boot/dts/overlays/README
26 +++ b/arch/arm/boot/dts/overlays/README
27 @@ -2935,6 +2935,14 @@ Params: cma-512 CMA is 5
28 cma-default Use upstream's default value
29
30
31 +Name: vc4-kms-dsi-7inch
32 +Info: Enable the Raspberry Pi DSI 7" screen.
33 + Use edt-ft5406 for the touchscreen element.
34 + Requires vc4-kms-v3d to be loaded.
35 +Load: dtoverlay=vc4-kms-dsi-7inch
36 +Params: <None>
37 +
38 +
39 Name: vc4-kms-kippah-7inch
40 Info: Enable the Adafruit DPI Kippah with the 7" Ontat panel attached.
41 Requires vc4-kms-v3d to be loaded.
42 --- /dev/null
43 +++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-7inch-overlay.dts
44 @@ -0,0 +1,56 @@
45 +/*
46 + * Device Tree overlay for RaspberryPi 7" Touchscreen panel
47 + *
48 + */
49 +
50 +/dts-v1/;
51 +/plugin/;
52 +
53 +/ {
54 + compatible = "brcm,bcm2835";
55 +
56 + fragment@0 {
57 + target = <&dsi1>;
58 + __overlay__ {
59 + #address-cells = <1>; size-cells = <0>;
60 + status = "okay";
61 + port {
62 + dsi_out_port: endpoint {
63 + remote-endpoint = <&panel_dsi_port>;
64 + };
65 + };
66 + };
67 + };
68 +
69 + fragment@1 {
70 + target = <&i2c_csi_dsi>;
71 + __overlay__ {
72 + #address-cells = <1>;
73 + #size-cells = <0>;
74 + status = "okay";
75 + lcd@45 {
76 + compatible = "raspberrypi,7inch-touchscreen-panel";
77 + reg = <0x45>;
78 + port {
79 + panel_dsi_port: endpoint {
80 + remote-endpoint = <&dsi_out_port>;
81 + };
82 + };
83 + };
84 + };
85 + };
86 +
87 + fragment@2 {
88 + target = <&i2c0if>;
89 + __overlay__ {
90 + status = "okay";
91 + };
92 + };
93 +
94 + fragment@3 {
95 + target = <&i2c0mux>;
96 + __overlay__ {
97 + status = "okay";
98 + };
99 + };
100 +};