eb3b06d376a59065fd5fe026f468da35fbf2dc02
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.19 / 950-0507-BCM270X_DT-Rename-Pi-Zero-W-DT-files.patch
1 From 9bda47356e96d8f946446990fe2642d7916c4f0d Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 28 May 2019 16:36:04 +0100
4 Subject: [PATCH 507/782] BCM270X_DT: Rename Pi Zero W DT files
5
6 The downtream Pi Zero W dts file uses the digit 0, whereas upstream
7 chose to spell it out - "zero-w". The firmware has, for a long time,
8 looked for bcm2708-rpi-zero-w.dtb first before falling back to the
9 numerical version. Therefore it is better to follow upstream and
10 make the switch to "bcm2708-rpi-zero-w".
11
12 At the same time, remove some overrides that duplicate values
13 inherited from the shared .dtsi files.
14
15 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
16 ---
17 arch/arm/boot/dts/Makefile | 2 +-
18 .../boot/dts/{bcm2708-rpi-0-w.dts => bcm2708-rpi-zero-w.dts} | 5 -----
19 2 files changed, 1 insertion(+), 6 deletions(-)
20 rename arch/arm/boot/dts/{bcm2708-rpi-0-w.dts => bcm2708-rpi-zero-w.dts} (97%)
21
22 --- a/arch/arm/boot/dts/Makefile
23 +++ b/arch/arm/boot/dts/Makefile
24 @@ -4,7 +4,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
25 bcm2708-rpi-b.dtb \
26 bcm2708-rpi-b-plus.dtb \
27 bcm2708-rpi-cm.dtb \
28 - bcm2708-rpi-0-w.dtb \
29 + bcm2708-rpi-zero-w.dtb \
30 bcm2709-rpi-2-b.dtb \
31 bcm2710-rpi-3-b.dtb \
32 bcm2710-rpi-3-b-plus.dtb \
33 --- a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
34 +++ /dev/null
35 @@ -1,167 +0,0 @@
36 -/dts-v1/;
37 -
38 -#include "bcm2708.dtsi"
39 -#include "bcm283x-rpi-csi1-2lane.dtsi"
40 -
41 -/ {
42 - compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
43 - model = "Raspberry Pi Zero W";
44 -
45 - chosen {
46 - bootargs = "coherent_pool=1M 8250.nr_uarts=1";
47 - };
48 -
49 - aliases {
50 - serial0 = &uart1;
51 - serial1 = &uart0;
52 - mmc1 = &mmcnr;
53 - };
54 -};
55 -
56 -&gpio {
57 - spi0_pins: spi0_pins {
58 - brcm,pins = <9 10 11>;
59 - brcm,function = <4>; /* alt0 */
60 - };
61 -
62 - spi0_cs_pins: spi0_cs_pins {
63 - brcm,pins = <8 7>;
64 - brcm,function = <1>; /* output */
65 - };
66 -
67 - i2c0_pins: i2c0 {
68 - brcm,pins = <0 1>;
69 - brcm,function = <4>;
70 - };
71 -
72 - i2c1_pins: i2c1 {
73 - brcm,pins = <2 3>;
74 - brcm,function = <4>;
75 - };
76 -
77 - i2s_pins: i2s {
78 - brcm,pins = <18 19 20 21>;
79 - brcm,function = <4>; /* alt0 */
80 - };
81 -
82 - sdio_pins: sdio_pins {
83 - brcm,pins = <34 35 36 37 38 39>;
84 - brcm,function = <7>; /* ALT3 = SD1 */
85 - brcm,pull = <0 2 2 2 2 2>;
86 - };
87 -
88 - bt_pins: bt_pins {
89 - brcm,pins = <43>;
90 - brcm,function = <4>; /* alt0:GPCLK2 */
91 - brcm,pull = <0>; /* none */
92 - };
93 -
94 - uart0_pins: uart0_pins {
95 - brcm,pins = <30 31 32 33>;
96 - brcm,function = <7>; /* alt3=UART0 */
97 - brcm,pull = <2 0 0 2>; /* up none none up */
98 - };
99 -
100 - uart1_pins: uart1_pins {
101 - brcm,pins;
102 - brcm,function;
103 - brcm,pull;
104 - };
105 -
106 - audio_pins: audio_pins {
107 - brcm,pins = <>;
108 - brcm,function = <>;
109 - };
110 -};
111 -
112 -&mmcnr {
113 - pinctrl-names = "default";
114 - pinctrl-0 = <&sdio_pins>;
115 - bus-width = <4>;
116 - status = "okay";
117 -};
118 -
119 -&uart0 {
120 - pinctrl-names = "default";
121 - pinctrl-0 = <&uart0_pins &bt_pins>;
122 - status = "okay";
123 -};
124 -
125 -&uart1 {
126 - pinctrl-names = "default";
127 - pinctrl-0 = <&uart1_pins>;
128 - status = "okay";
129 -};
130 -
131 -&spi0 {
132 - pinctrl-names = "default";
133 - pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
134 - cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
135 -
136 - spidev0: spidev@0{
137 - compatible = "spidev";
138 - reg = <0>; /* CE0 */
139 - #address-cells = <1>;
140 - #size-cells = <0>;
141 - spi-max-frequency = <125000000>;
142 - };
143 -
144 - spidev1: spidev@1{
145 - compatible = "spidev";
146 - reg = <1>; /* CE1 */
147 - #address-cells = <1>;
148 - #size-cells = <0>;
149 - spi-max-frequency = <125000000>;
150 - };
151 -};
152 -
153 -&i2c0 {
154 - pinctrl-names = "default";
155 - pinctrl-0 = <&i2c0_pins>;
156 - clock-frequency = <100000>;
157 -};
158 -
159 -&i2c1 {
160 - pinctrl-names = "default";
161 - pinctrl-0 = <&i2c1_pins>;
162 - clock-frequency = <100000>;
163 -};
164 -
165 -&i2c2 {
166 - clock-frequency = <100000>;
167 -};
168 -
169 -&i2s {
170 - #sound-dai-cells = <0>;
171 - pinctrl-names = "default";
172 - pinctrl-0 = <&i2s_pins>;
173 -};
174 -
175 -&random {
176 - status = "okay";
177 -};
178 -
179 -&leds {
180 - act_led: act {
181 - label = "led0";
182 - linux,default-trigger = "mmc0";
183 - gpios = <&gpio 47 0>;
184 - };
185 -};
186 -
187 -&hdmi {
188 - hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
189 -};
190 -
191 -&audio {
192 - pinctrl-names = "default";
193 - pinctrl-0 = <&audio_pins>;
194 -};
195 -
196 -/ {
197 - __overrides__ {
198 - act_led_gpio = <&act_led>,"gpios:4";
199 - act_led_activelow = <&act_led>,"gpios:8";
200 - act_led_trigger = <&act_led>,"linux,default-trigger";
201 - };
202 -};
203 --- /dev/null
204 +++ b/arch/arm/boot/dts/bcm2708-rpi-zero-w.dts
205 @@ -0,0 +1,162 @@
206 +/dts-v1/;
207 +
208 +#include "bcm2708.dtsi"
209 +#include "bcm283x-rpi-csi1-2lane.dtsi"
210 +
211 +/ {
212 + compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
213 + model = "Raspberry Pi Zero W";
214 +
215 + chosen {
216 + bootargs = "coherent_pool=1M 8250.nr_uarts=1";
217 + };
218 +
219 + aliases {
220 + serial0 = &uart1;
221 + serial1 = &uart0;
222 + mmc1 = &mmcnr;
223 + };
224 +};
225 +
226 +&gpio {
227 + spi0_pins: spi0_pins {
228 + brcm,pins = <9 10 11>;
229 + brcm,function = <4>; /* alt0 */
230 + };
231 +
232 + spi0_cs_pins: spi0_cs_pins {
233 + brcm,pins = <8 7>;
234 + brcm,function = <1>; /* output */
235 + };
236 +
237 + i2c0_pins: i2c0 {
238 + brcm,pins = <0 1>;
239 + brcm,function = <4>;
240 + };
241 +
242 + i2c1_pins: i2c1 {
243 + brcm,pins = <2 3>;
244 + brcm,function = <4>;
245 + };
246 +
247 + i2s_pins: i2s {
248 + brcm,pins = <18 19 20 21>;
249 + brcm,function = <4>; /* alt0 */
250 + };
251 +
252 + sdio_pins: sdio_pins {
253 + brcm,pins = <34 35 36 37 38 39>;
254 + brcm,function = <7>; /* ALT3 = SD1 */
255 + brcm,pull = <0 2 2 2 2 2>;
256 + };
257 +
258 + bt_pins: bt_pins {
259 + brcm,pins = <43>;
260 + brcm,function = <4>; /* alt0:GPCLK2 */
261 + brcm,pull = <0>; /* none */
262 + };
263 +
264 + uart0_pins: uart0_pins {
265 + brcm,pins = <30 31 32 33>;
266 + brcm,function = <7>; /* alt3=UART0 */
267 + brcm,pull = <2 0 0 2>; /* up none none up */
268 + };
269 +
270 + uart1_pins: uart1_pins {
271 + brcm,pins;
272 + brcm,function;
273 + brcm,pull;
274 + };
275 +
276 + audio_pins: audio_pins {
277 + brcm,pins = <>;
278 + brcm,function = <>;
279 + };
280 +};
281 +
282 +&mmcnr {
283 + pinctrl-names = "default";
284 + pinctrl-0 = <&sdio_pins>;
285 + bus-width = <4>;
286 + status = "okay";
287 +};
288 +
289 +&uart0 {
290 + pinctrl-names = "default";
291 + pinctrl-0 = <&uart0_pins &bt_pins>;
292 + status = "okay";
293 +};
294 +
295 +&uart1 {
296 + pinctrl-names = "default";
297 + pinctrl-0 = <&uart1_pins>;
298 + status = "okay";
299 +};
300 +
301 +&spi0 {
302 + pinctrl-names = "default";
303 + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
304 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
305 +
306 + spidev0: spidev@0{
307 + compatible = "spidev";
308 + reg = <0>; /* CE0 */
309 + #address-cells = <1>;
310 + #size-cells = <0>;
311 + spi-max-frequency = <125000000>;
312 + };
313 +
314 + spidev1: spidev@1{
315 + compatible = "spidev";
316 + reg = <1>; /* CE1 */
317 + #address-cells = <1>;
318 + #size-cells = <0>;
319 + spi-max-frequency = <125000000>;
320 + };
321 +};
322 +
323 +&i2c0 {
324 + pinctrl-names = "default";
325 + pinctrl-0 = <&i2c0_pins>;
326 + clock-frequency = <100000>;
327 +};
328 +
329 +&i2c1 {
330 + pinctrl-names = "default";
331 + pinctrl-0 = <&i2c1_pins>;
332 + clock-frequency = <100000>;
333 +};
334 +
335 +&i2c2 {
336 + clock-frequency = <100000>;
337 +};
338 +
339 +&i2s {
340 + pinctrl-names = "default";
341 + pinctrl-0 = <&i2s_pins>;
342 +};
343 +
344 +&leds {
345 + act_led: act {
346 + label = "led0";
347 + linux,default-trigger = "mmc0";
348 + gpios = <&gpio 47 0>;
349 + };
350 +};
351 +
352 +&hdmi {
353 + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
354 +};
355 +
356 +&audio {
357 + pinctrl-names = "default";
358 + pinctrl-0 = <&audio_pins>;
359 +};
360 +
361 +/ {
362 + __overrides__ {
363 + act_led_gpio = <&act_led>,"gpios:4";
364 + act_led_activelow = <&act_led>,"gpios:8";
365 + act_led_trigger = <&act_led>,"linux,default-trigger";
366 + };
367 +};