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