kernel: update kernel 4.4 to 4.4.59
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0591-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch
1 From 97425acaefeeb2bf4a704225b544cdd863bc5bc6 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 24 May 2016 16:30:05 +0100
4 Subject: [PATCH] BCM270X_DT: Add bcm2708-rpi-0-w.dts
5
6 Add DT support for the Pi Zero W. N.B. It will not be loaded
7 automatically without a corresponding change to the firmware.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
10 ---
11 arch/arm/boot/dts/Makefile | 1 +
12 arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 200 ++++++++++++++++++++++++++++++++++
13 2 files changed, 201 insertions(+)
14 create mode 100644 arch/arm/boot/dts/bcm2708-rpi-0-w.dts
15
16 --- a/arch/arm/boot/dts/Makefile
17 +++ b/arch/arm/boot/dts/Makefile
18 @@ -2,6 +2,7 @@ ifeq ($(CONFIG_OF),y)
19
20 dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b.dtb
21 dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb
22 +dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-0-w.dtb
23 dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-cm.dtb
24 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-cm.dtb
25 dtb-$(CONFIG_ARCH_BCM2709) += bcm2709-rpi-2-b.dtb
26 --- /dev/null
27 +++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
28 @@ -0,0 +1,200 @@
29 +/dts-v1/;
30 +
31 +#include "bcm2708.dtsi"
32 +
33 +/ {
34 + compatible = "brcm,bcm2708";
35 + model = "Raspberry Pi Zero W";
36 +};
37 +
38 +&gpio {
39 + sdhost_pins: sdhost_pins {
40 + brcm,pins = <48 49 50 51 52 53>;
41 + brcm,function = <4>; /* alt0 */
42 + };
43 +
44 + spi0_pins: spi0_pins {
45 + brcm,pins = <9 10 11>;
46 + brcm,function = <4>; /* alt0 */
47 + };
48 +
49 + spi0_cs_pins: spi0_cs_pins {
50 + brcm,pins = <8 7>;
51 + brcm,function = <1>; /* output */
52 + };
53 +
54 + i2c0_pins: i2c0 {
55 + brcm,pins = <0 1>;
56 + brcm,function = <4>;
57 + };
58 +
59 + i2c1_pins: i2c1 {
60 + brcm,pins = <2 3>;
61 + brcm,function = <4>;
62 + };
63 +
64 + i2s_pins: i2s {
65 + brcm,pins = <18 19 20 21>;
66 + brcm,function = <4>; /* alt0 */
67 + };
68 +
69 + sdio_pins: sdio_pins {
70 + brcm,pins = <34 35 36 37 38 39>;
71 + brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
72 + brcm,pull = <0 2 2 2 2 2>;
73 + };
74 +
75 + bt_pins: bt_pins {
76 + brcm,pins = <43>;
77 + brcm,function = <4>; /* alt0:GPCLK2 */
78 + brcm,pull = <0>; /* none */
79 + };
80 +
81 + uart0_pins: uart0_pins {
82 + brcm,pins = <30 31 32 33>;
83 + brcm,function = <7>; /* alt3=UART0 */
84 + brcm,pull = <2 0 0 2>; /* up none none up */
85 + };
86 +
87 + uart1_pins: uart1_pins {
88 + brcm,pins;
89 + brcm,function;
90 + brcm,pull;
91 + };
92 +
93 + audio_pins: audio_pins {
94 + brcm,pins = <>;
95 + brcm,function = <>;
96 + };
97 +};
98 +
99 +&sdhost {
100 + pinctrl-names = "default";
101 + pinctrl-0 = <&sdhost_pins>;
102 + bus-width = <4>;
103 + status = "okay";
104 +};
105 +
106 +&mmc {
107 + pinctrl-names = "default";
108 + pinctrl-0 = <&sdio_pins>;
109 + non-removable;
110 + bus-width = <4>;
111 + status = "okay";
112 +};
113 +
114 +&fb {
115 + status = "okay";
116 +};
117 +
118 +&uart0 {
119 + pinctrl-names = "default";
120 + pinctrl-0 = <&uart0_pins &bt_pins>;
121 + status = "okay";
122 +};
123 +
124 +&uart1 {
125 + pinctrl-names = "default";
126 + pinctrl-0 = <&uart1_pins>;
127 + status = "okay";
128 +};
129 +
130 +&spi0 {
131 + pinctrl-names = "default";
132 + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
133 + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
134 +
135 + spidev0: spidev@0{
136 + compatible = "spidev";
137 + reg = <0>; /* CE0 */
138 + #address-cells = <1>;
139 + #size-cells = <0>;
140 + spi-max-frequency = <500000>;
141 + };
142 +
143 + spidev1: spidev@1{
144 + compatible = "spidev";
145 + reg = <1>; /* CE1 */
146 + #address-cells = <1>;
147 + #size-cells = <0>;
148 + spi-max-frequency = <500000>;
149 + };
150 +};
151 +
152 +&i2c0 {
153 + pinctrl-names = "default";
154 + pinctrl-0 = <&i2c0_pins>;
155 + clock-frequency = <100000>;
156 +};
157 +
158 +&i2c1 {
159 + pinctrl-names = "default";
160 + pinctrl-0 = <&i2c1_pins>;
161 + clock-frequency = <100000>;
162 +};
163 +
164 +&i2c2 {
165 + clock-frequency = <100000>;
166 +};
167 +
168 +&i2s {
169 + #sound-dai-cells = <0>;
170 + pinctrl-names = "default";
171 + pinctrl-0 = <&i2s_pins>;
172 +};
173 +
174 +&random {
175 + status = "okay";
176 +};
177 +
178 +&leds {
179 + act_led: act {
180 + label = "led0";
181 + linux,default-trigger = "mmc0";
182 + gpios = <&gpio 47 0>;
183 + };
184 +};
185 +
186 +&hdmi {
187 + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
188 +};
189 +
190 +&audio {
191 + pinctrl-names = "default";
192 + pinctrl-0 = <&audio_pins>;
193 +};
194 +
195 +/ {
196 + chosen {
197 + bootargs = "8250.nr_uarts=1";
198 + };
199 +};
200 +
201 +/ {
202 + __overrides__ {
203 + uart0 = <&uart0>,"status";
204 + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
205 + uart1 = <&uart1>,"status";
206 + i2s = <&i2s>,"status";
207 + spi = <&spi0>,"status";
208 + i2c0 = <&i2c0>,"status";
209 + i2c1 = <&i2c1>,"status";
210 + i2c2_iknowwhatimdoing = <&i2c2>,"status";
211 + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
212 + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
213 + i2c2_baudrate = <&i2c2>,"clock-frequency:0";
214 + core_freq = <&clk_core>,"clock-frequency:0";
215 +
216 + act_led_gpio = <&act_led>,"gpios:4";
217 + act_led_activelow = <&act_led>,"gpios:8";
218 + act_led_trigger = <&act_led>,"linux,default-trigger";
219 +
220 + audio = <&audio>,"status";
221 + watchdog = <&watchdog>,"status";
222 + random = <&random>,"status";
223 + sd_overclock = <&sdhost>,"brcm,overclock-50:0";
224 + sd_force_pio = <&sdhost>,"brcm,force-pio?";
225 + sd_pio_limit = <&sdhost>,"brcm,pio-limit:0";
226 + sd_debug = <&sdhost>,"brcm,debug";
227 + };
228 +};