aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.9/0161-BCM270X-Enable-the-DSI-panel-node-in-the-VC4-overlay.patch
blob: 3d65f5e2690ec323062542af95a4dcabf032157c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
From 2c62d430b6b3c20867e55465e0557a1543088f09 Mon Sep 17 00:00:00 2001
From: Eric Anholt <eric@anholt.net>
Date: Thu, 2 Jun 2016 15:09:35 -0700
Subject: [PATCH] BCM270X: Enable the DSI panel node in the VC4 overlay.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts           |  5 ++++
 arch/arm/boot/dts/bcm2708-rpi-b.dts                |  5 ++++
 arch/arm/boot/dts/bcm2709-rpi-2-b.dts              |  5 ++++
 arch/arm/boot/dts/bcm270x.dtsi                     | 27 ++++++++++++++++++++++
 arch/arm/boot/dts/bcm2710-rpi-3-b.dts              |  5 ++++
 arch/arm/boot/dts/bcm2710.dtsi                     |  1 -
 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 22 ++++++++++++++++++
 7 files changed, 69 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
@@ -154,3 +154,8 @@
 		sd_debug     = <&sdhost>,"brcm,debug";
 	};
 };
+
+&i2c_dsi {
+	gpios = <&gpio 28 0
+		 &gpio 29 0>;
+};
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -144,3 +144,8 @@
 		sd_debug     = <&sdhost>,"brcm,debug";
 	};
 };
+
+&i2c_dsi {
+	gpios = <&gpio 2 0
+		 &gpio 3 0>;
+};
--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
@@ -154,3 +154,8 @@
 		sd_debug     = <&sdhost>,"brcm,debug";
 	};
 };
+
+&i2c_dsi {
+	gpios = <&gpio 28 0
+		 &gpio 29 0>;
+};
--- a/arch/arm/boot/dts/bcm270x.dtsi
+++ b/arch/arm/boot/dts/bcm270x.dtsi
@@ -137,6 +137,29 @@
 			/* Add alias */
 			status = "disabled";
 		};
+
+		i2c_dsi: i2cdsi {
+			/* We have to use i2c-gpio because the
+			 * firmware is also polling another device
+			 * using the only hardware I2C bus that could
+			 * connect to these pins.
+			 */
+			compatible = "i2c-gpio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+
+			pitouchscreen_bridge: bridge@45 {
+				compatible = "raspberrypi,touchscreen-bridge-i2c";
+				reg = <0x45>;
+			};
+
+			pitouchscreen_touch: bridge@38 {
+				compatible = "raspberrypi,touchscreen-ts-i2c";
+				reg = <0x38>;
+			};
+		};
+
 	};
 
 	vdd_5v0_reg: fixedregulator_5v0 {
@@ -155,3 +178,7 @@
 		regulator-always-on;
 	};
 };
+
+&dsi1 {
+	power-domains = <&power RPI_POWER_DOMAIN_DSI1>;
+};
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
@@ -201,3 +201,8 @@
 		sd_debug     = <&sdhost>,"brcm,debug";
 	};
 };
+
+&i2c_dsi {
+	gpios = <&gpio 44 0
+		 &gpio 45 0>;
+};
--- a/arch/arm/boot/dts/bcm2710.dtsi
+++ b/arch/arm/boot/dts/bcm2710.dtsi
@@ -145,4 +145,3 @@
 	interrupt-parent = <&local_intc>;
 	interrupts = <8>;
 };
-
--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
+++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
@@ -126,6 +126,28 @@
 		};
 	};
 
+	fragment@16 {
+		target = <&dsi1>;
+		__overlay__  {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			pitouchscreen: panel@0 {
+				compatible = "raspberrypi,touchscreen";
+				reg = <0>;
+				raspberrypi,touchscreen-bridge = <&pitouchscreen_bridge>;
+			};
+		};
+	};
+
+	fragment@17 {
+		target = <&i2c_dsi>;
+		__overlay__  {
+			status = "okay";
+		};
+	};
+
 	__overrides__ {
 		cma-256 = <0>,"+0-1-2-3-4";
 		cma-192 = <0>,"-0+1-2-3-4";