brcm2708: update linux 4.4 patches to latest version
[openwrt/staging/dedeckeh.git] / target / linux / brcm2708 / patches-4.4 / 0325-BCM270X_DT-Move-vc4-node-contents-to-bcm2708_common..patch
1 From a2d2ac2146d46c29d9fd086c777ca7643eb699db Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Fri, 6 May 2016 11:48:35 -0700
4 Subject: [PATCH] BCM270X_DT: Move vc4 node contents to bcm2708_common.dtsi.
5
6 This should clarify what's going on with the overlay: The hardware is
7 always present, we're just enabling the DT node so that the vc4 driver
8 probes.
9
10 The interrupts are left in the overlay, because the firmware doesn't
11 check node status before masking out the vc4 interrupts.
12
13 By having the nodes in the common file, we'll be able to correctly
14 connect the HDMI HPD GPIO so that we can detect whether an HDMI
15 monitor is connected.
16
17 Signed-off-by: Eric Anholt <eric@anholt.net>
18 ---
19 arch/arm/boot/dts/bcm2708_common.dtsi | 51 +++++++
20 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 160 ++++++++++-----------
21 2 files changed, 129 insertions(+), 82 deletions(-)
22
23 --- a/arch/arm/boot/dts/bcm2708_common.dtsi
24 +++ b/arch/arm/boot/dts/bcm2708_common.dtsi
25 @@ -1,4 +1,7 @@
26 +#include "dt-bindings/clock/bcm2835.h"
27 #include <dt-bindings/clock/bcm2835-aux.h>
28 +#include "dt-bindings/power/raspberrypi-power.h"
29 +#include "dt-bindings/gpio/gpio.h"
30 #include "skeleton.dtsi"
31
32 / {
33 @@ -170,6 +173,18 @@
34 status = "disabled";
35 };
36
37 + pixelvalve0: pixelvalve@7e206000 {
38 + compatible = "brcm,bcm2835-pixelvalve0";
39 + reg = <0x7e206000 0x100>;
40 + status = "disabled";
41 + };
42 +
43 + pixelvalve1: pixelvalve@7e207000 {
44 + compatible = "brcm,bcm2835-pixelvalve1";
45 + reg = <0x7e207000 0x100>;
46 + status = "disabled";
47 + };
48 +
49 pwm: pwm@7e20c000 {
50 compatible = "brcm,bcm2835-pwm";
51 reg = <0x7e20c000 0x28>;
52 @@ -227,6 +242,12 @@
53 status = "disabled";
54 };
55
56 + hvs: hvs@7e400000 {
57 + compatible = "brcm,bcm2835-hvs";
58 + reg = <0x7e400000 0x6000>;
59 + status = "disabled";
60 + };
61 +
62 i2c1: i2c@7e804000 {
63 compatible = "brcm,bcm2708-i2c";
64 reg = <0x7e804000 0x1000>;
65 @@ -261,6 +282,25 @@
66 status = "disabled";
67 };
68
69 + pixelvalve2: pixelvalve@7e807000 {
70 + compatible = "brcm,bcm2835-pixelvalve2";
71 + reg = <0x7e807000 0x100>;
72 + status = "disabled";
73 + };
74 +
75 + hdmi: hdmi@7e902000 {
76 + compatible = "brcm,bcm2835-hdmi";
77 + reg = <0x7e902000 0x600>,
78 + <0x7e808000 0x100>;
79 + ddc = <&i2c2>;
80 + hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
81 + clocks = <&cprman BCM2835_PLLH_PIX>,
82 + <&cprman BCM2835_CLOCK_HSM>;
83 + clock-names = "pixel", "hdmi";
84 + power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
85 + status = "disabled";
86 + };
87 +
88 usb: usb@7e980000 {
89 compatible = "brcm,bcm2708-usb";
90 reg = <0x7e980000 0x10000>,
91 @@ -269,6 +309,12 @@
92 <1 9>;
93 };
94
95 + v3d: v3d@7ec00000 {
96 + compatible = "brcm,vc4-v3d";
97 + reg = <0x7ec00000 0x1000>;
98 + status = "disabled";
99 + };
100 +
101 firmware: firmware {
102 compatible = "raspberrypi,bcm2835-firmware";
103 mboxes = <&mailbox>;
104 @@ -303,6 +349,11 @@
105 firmware = <&firmware>;
106 };
107
108 + gpu: gpu {
109 + compatible = "brcm,bcm2835-vc4";
110 + status = "disabled";
111 + };
112 +
113 /* Onboard audio */
114 audio: audio {
115 compatible = "brcm,bcm2835-audio";
116 --- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
117 +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
118 @@ -5,129 +5,125 @@
119 /dts-v1/;
120 /plugin/;
121
122 -#include "dt-bindings/clock/bcm2835.h"
123 -#include "dt-bindings/power/raspberrypi-power.h"
124 -#include "dt-bindings/gpio/gpio.h"
125 -
126 / {
127 compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
128
129 fragment@0 {
130 + target-path = "/chosen";
131 + __overlay__ {
132 + bootargs = "cma=256M@256M";
133 + };
134 + };
135 +
136 + fragment@1 {
137 + target-path = "/chosen";
138 + __dormant__ {
139 + bootargs = "cma=192M@256M";
140 + };
141 + };
142 +
143 + fragment@2 {
144 + target-path = "/chosen";
145 + __dormant__ {
146 + bootargs = "cma=128M@128M";
147 + };
148 + };
149 +
150 + fragment@3 {
151 + target-path = "/chosen";
152 + __dormant__ {
153 + bootargs = "cma=96M@128M";
154 + };
155 + };
156 +
157 + fragment@4 {
158 + target-path = "/chosen";
159 + __dormant__ {
160 + bootargs = "cma=64M@64M";
161 + };
162 + };
163 +
164 + fragment@5 {
165 target = <&i2c2>;
166 __overlay__ {
167 status = "okay";
168 };
169 };
170
171 - fragment@1 {
172 + fragment@6 {
173 target = <&cprman>;
174 __overlay__ {
175 status = "okay";
176 };
177 };
178
179 - fragment@2 {
180 + fragment@7 {
181 target = <&fb>;
182 __overlay__ {
183 status = "disabled";
184 };
185 };
186
187 - fragment@3 {
188 - target = <&soc>;
189 + fragment@8 {
190 + target = <&pixelvalve0>;
191 __overlay__ {
192 - #address-cells = <1>;
193 - #size-cells = <1>;
194 + interrupts = <2 13>; /* pwa0 */
195 + status = "okay";
196 + };
197 + };
198
199 - pixelvalve@7e206000 {
200 - compatible = "brcm,bcm2835-pixelvalve0";
201 - reg = <0x7e206000 0x100>;
202 - interrupts = <2 13>; /* pwa0 */
203 - };
204 -
205 - pixelvalve@7e207000 {
206 - compatible = "brcm,bcm2835-pixelvalve1";
207 - reg = <0x7e207000 0x100>;
208 - interrupts = <2 14>; /* pwa1 */
209 - };
210 -
211 - hvs@7e400000 {
212 - compatible = "brcm,bcm2835-hvs";
213 - reg = <0x7e400000 0x6000>;
214 - interrupts = <2 1>;
215 - };
216 -
217 - pixelvalve@7e807000 {
218 - compatible = "brcm,bcm2835-pixelvalve2";
219 - reg = <0x7e807000 0x100>;
220 - interrupts = <2 10>; /* pixelvalve */
221 - };
222 -
223 - hdmi@7e902000 {
224 - compatible = "brcm,bcm2835-hdmi";
225 - reg = <0x7e902000 0x600>,
226 - <0x7e808000 0x100>;
227 - interrupts = <2 8>, <2 9>;
228 - ddc = <&i2c2>;
229 - hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
230 - clocks = <&cprman BCM2835_PLLH_PIX>,
231 - <&cprman BCM2835_CLOCK_HSM>;
232 - clock-names = "pixel", "hdmi";
233 - power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
234 - };
235 -
236 - v3d@7ec00000 {
237 - compatible = "brcm,vc4-v3d";
238 - reg = <0x7ec00000 0x1000>;
239 - interrupts = <1 10>;
240 - };
241 -
242 - gpu@7e4c0000 {
243 - compatible = "brcm,bcm2835-vc4";
244 - };
245 + fragment@9 {
246 + target = <&pixelvalve1>;
247 + __overlay__ {
248 + interrupts = <2 14>; /* pwa1 */
249 + status = "okay";
250 };
251 };
252
253 - fragment@4 {
254 - target-path = "/chosen";
255 - __overlay__ {
256 - bootargs = "cma=256M@256M";
257 + fragment@10 {
258 + target = <&pixelvalve2>;
259 + __overlay__ {
260 + interrupts = <2 10>; /* pixelvalve */
261 + status = "okay";
262 };
263 };
264
265 - fragment@5 {
266 - target-path = "/chosen";
267 - __dormant__ {
268 - bootargs = "cma=192M@256M";
269 + fragment@11 {
270 + target = <&hvs>;
271 + __overlay__ {
272 + interrupts = <2 1>;
273 + status = "okay";
274 };
275 };
276
277 - fragment@6 {
278 - target-path = "/chosen";
279 - __dormant__ {
280 - bootargs = "cma=128M@128M";
281 + fragment@12 {
282 + target = <&hdmi>;
283 + __overlay__ {
284 + interrupts = <2 8>, <2 9>;
285 + status = "okay";
286 };
287 };
288
289 - fragment@7 {
290 - target-path = "/chosen";
291 - __dormant__ {
292 - bootargs = "cma=96M@128M";
293 + fragment@13 {
294 + target = <&v3d>;
295 + __overlay__ {
296 + interrupts = <1 10>;
297 + status = "okay";
298 };
299 };
300
301 - fragment@8 {
302 - target-path = "/chosen";
303 - __dormant__ {
304 - bootargs = "cma=64M@64M";
305 + fragment@14 {
306 + target = <&gpu>;
307 + __overlay__ {
308 + status = "okay";
309 };
310 };
311
312 __overrides__ {
313 - cma-256 = <0>,"+4-5-6-7-8";
314 - cma-192 = <0>,"-4+5-6-7-8";
315 - cma-128 = <0>,"-4-5+6-7-8";
316 - cma-96 = <0>,"-4-5-6+7-8";
317 - cma-64 = <0>,"-4-5-6-7+8";
318 + cma-256 = <0>,"+0-1-2-3-4";
319 + cma-192 = <0>,"-0+1-2-3-4";
320 + cma-128 = <0>,"-0-1+2-3-4";
321 + cma-96 = <0>,"-0-1-2+3-4";
322 + cma-64 = <0>,"-0-1-2-3+4";
323 };
324 };