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