Fix the gpio-leds node to match the LEDs on RPI2.
[freebsd.git] / sys / boot / fdt / dts / arm / rpi2.dts
1 /*
2  * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@bluezbox.com>
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23  * SUCH DAMAGE.
24  *
25  * $FreeBSD$
26  */
27 /dts-v1/;
28
29 /include/ "bcm2836.dtsi"
30
31 / {
32         model = "Raspberry Pi 2 Model B";
33         compatible = "brcm,bcm2709";
34
35         memreserve = <0x08000000 0x08000000>;   /* Set by VideoCore */
36
37         cpus {
38                 #address-cells = <1>;
39                 #size-cells = <0>;
40                 cpu@0 {
41                         compatible = "arm,cortex-a7";
42                         device_type = "cpu";
43                         reg = <0xf00>;                  /* CPU ID=0xf00 */
44                         clock-frequency = <800000000>;  /* 800MHz */
45                 };
46         };
47
48         memory {
49                 device_type = "memory";
50                 reg = <0 0x8000000>; /* 128MB, Set by VideoCore */
51         
52         };
53
54         system {
55                 revision = <0>;                 /* Set by VideoCore */
56                 serial = <0 0>;                 /* Set by VideoCore */
57         };
58
59         axi {
60                 gpio: gpio {
61                         /* BSC0 */
62                         pins_bsc0_a: bsc0_a {
63                                 broadcom,function = "ALT0";
64                         };
65
66                         pins_bsc0_b: bsc0_b {
67                                 broadcom,function = "ALT0";
68                         };
69
70                         pins_bsc0_c: bsc0_c {
71                                 broadcom,function = "ALT1";
72                         };
73
74                         /* BSC1 */
75                         pins_bsc1_a: bsc1_a {
76                                 broadcom,function = "ALT0";
77                         };
78
79                         pins_bsc1_b: bsc1_b {
80                                 broadcom,function = "ALT2";
81                         };
82
83                         /* GPCLK0 */
84                         pins_gpclk0_a: gpclk0_a {
85                                 broadcom,function = "ALT0";
86                         };
87
88                         pins_gpclk0_b: gpclk0_b {
89                                 broadcom,function = "ALT5";
90                         };
91
92                         pins_gpclk0_c: gpclk0_c {
93                                 broadcom,function = "ALT0";
94                         };
95
96                         pins_gpclk0_d: gpclk0_d {
97                                 broadcom,function = "ALT0";
98                         };
99
100                         /* GPCLK1 */
101                         pins_gpclk1_a: gpclk1_a {
102                                 broadcom,function = "ALT0";
103                         };
104
105                         pins_gpclk1_b: gpclk1_b {
106                                 broadcom,function = "ALT5";
107                         };
108
109                         pins_gpclk1_c: gpclk1_c {
110                                 broadcom,function = "ALT0";
111                         };
112
113                         pins_gpclk1_d: gpclk1_d {
114                                 broadcom,function = "ALT0";
115                         };
116
117                         /* GPCLK2 */
118                         pins_gpclk2_a: gpclk2_a {
119                                 broadcom,function = "ALT0";
120                         };
121
122                         pins_gpclk2_b: gpclk2_b {
123                                 broadcom,function = "ALT0";
124                         };
125
126                         /* SPI0 */
127                         pins_spi0_a: spi0_a {
128                                 broadcom,function = "ALT0";
129                         };
130
131                         pins_spi0_b: spi0_b {
132                                 broadcom,function = "ALT0";
133                         };
134
135                         /* PWM */
136                         pins_pwm0_a: pwm0_a {
137                                 broadcom,function = "ALT0";
138                         };
139
140                         pins_pwm0_b: pwm0_b {
141                                 broadcom,function = "ALT5";
142                         };
143
144                         pins_pwm0_c: pwm0_c {
145                                 broadcom,function = "ALT0";
146                         };
147
148                         pins_pwm1_a: pwm1_a {
149                                 broadcom,function = "ALT0";
150                         };
151
152                         pins_pwm1_b: pwm1_b {
153                                 broadcom,function = "ALT5";
154                         };
155
156                         pins_pwm1_c: pwm1_c {
157                                 broadcom,function = "ALT0";
158                         };
159
160                         pins_pwm1_d: pwm1_d {
161                                 broadcom,function = "ALT0";
162                         };
163
164                         /* UART0 */
165                         pins_uart0_a: uart0_a {
166                                 broadcom,function = "ALT0";
167                         };
168
169                         pins_uart0_b: uart0_b {
170                                 broadcom,function = "ALT3";
171                         };
172
173                         pins_uart0_c: uart0_c {
174                                 broadcom,function = "ALT2";
175                         };
176
177                         pins_uart0_fc_a: uart0_fc_a {
178                                 broadcom,function = "ALT3";
179                         };
180
181                         pins_uart0_fc_b: uart0_fc_b {
182                                 broadcom,function = "ALT3";
183                         };
184
185                         pins_uart0_fc_c: uart0_fc_c {
186                                 broadcom,function = "ALT2";
187                         };
188
189                         /* PCM */
190                         pins_pcm_a: pcm_a {
191                                 broadcom,function = "ALT0";
192                         };
193
194                         pins_pcm_b: pcm_b {
195                                 broadcom,function = "ALT2";
196                         };
197
198                         /* Secondary Address Bus */
199                         pins_sm_addr_a: sm_addr_a {
200                                 broadcom,function = "ALT1";
201                         };
202
203                         pins_sm_addr_b: sm_addr_b {
204                                 broadcom,function = "ALT1";
205                         };
206
207                         pins_sm_ctl_a: sm_ctl_a {
208                                 broadcom,function = "ALT1";
209                         };
210
211                         pins_sm_ctl_b: sm_ctl_b {
212                                 broadcom,function = "ALT1";
213                         };
214
215                         pins_sm_data_8bit_a: sm_data_8bit_a {
216                                 broadcom,function = "ALT1";
217                         };
218
219                         pins_sm_data_8bit_b: sm_data_8bit_b {
220                                 broadcom,function = "ALT1";
221                         };
222
223                         pins_sm_data_16bit: sm_data_16bit {
224                                 broadcom,function = "ALT1";
225                         };
226
227                         pins_sm_data_18bit: sm_data_18bit {
228                                 broadcom,function = "ALT1";
229                         };
230
231                         /* BSCSL */
232                         pins_bscsl: bscsl {
233                                 broadcom,function = "ALT3";
234                         };
235
236                         /* SPISL */
237                         pins_spisl: spisl {
238                                 broadcom,function = "ALT3";
239                         };
240
241                         /* SPI1 */
242                         pins_spi1: spi1 {
243                                 broadcom,function = "ALT4";
244                         };
245
246                         /* UART1 */
247                         pins_uart1_a: uart1_a {
248                                 broadcom,function = "ALT5";
249                         };
250
251                         pins_uart1_b: uart1_b {
252                                 broadcom,function = "ALT5";
253                         };
254
255                         pins_uart1_c: uart1_c {
256                                 broadcom,function = "ALT5";
257                         };
258
259                         pins_uart1_fc_a: uart1_fc_a {
260                                 broadcom,function = "ALT5";
261                         };
262
263                         pins_uart1_fc_b: uart1_fc_b {
264                                 broadcom,function = "ALT5";
265                         };
266
267                         pins_uart1_fc_c: uart1_fc_c {
268                                 broadcom,function = "ALT5";
269                         };
270
271                         /* SPI2 */
272                         pins_spi2: spi2 {
273                                 broadcom,function = "ALT4";
274                         };
275
276                         /* ARM JTAG */
277                         pins_arm_jtag_trst: arm_jtag_trst {
278                                 broadcom,function = "ALT4";
279                         };
280
281                         pins_arm_jtag_a: arm_jtag_a {
282                                 broadcom,function = "ALT5";
283                         };
284
285                         pins_arm_jtag_b: arm_jtag_b {
286                                 broadcom,function = "ALT4";
287                         };
288
289                         /* Reserved */
290                         pins_reserved: reserved {
291                                 broadcom,function = "ALT3";
292                         };
293                 };
294                 usb {
295                         hub {
296                                 compatible = "usb,hub", "usb,device";
297                                 reg = <0x00000001>;
298                                 #address-cells = <1>;
299                                 #size-cells = <0>;
300                                 ethernet {
301                                         compatible = "net,ethernet",
302                                                      "usb,device";
303                                         reg = <0x00000001>;
304                                         mac-address = [00 00 00 00 00 00];
305                                 };
306                         };
307
308                 };
309         };
310
311         display {
312                 compatible = "broadcom,bcm2835-fb", "broadcom,bcm2708-fb";
313
314                 broadcom,vc-mailbox = <&vc_mbox>;
315                 broadcom,vc-channel = <1>;
316
317                 broadcom,width = <0>;           /* Set by VideoCore */
318                 broadcom,height = <0>;          /* Set by VideoCore */
319                 broadcom,depth = <0>;           /* Set by VideoCore */
320         };
321
322         leds {
323                 compatible = "gpio-leds";
324
325                 pwr {
326                         label = "pwr";
327                         gpios = <&gpio 35 0>;
328                 };
329
330                 act {
331                         label = "act";
332                         gpios = <&gpio 47 0>;
333                 };
334         };
335
336         power: regulator {
337                 compatible = "broadcom,bcm2835-power-mgr",
338                              "broadcom,bcm2708-power-mgr",
339                              "simple-bus";
340                 #address-cells = <1>;
341                 #size-cells = <0>;
342
343                 broadcom,vc-mailbox = <&vc_mbox>;
344                 broadcom,vc-channel = <0>;
345
346                 regulator-name = "VideoCore";
347                 regulator-min-microvolt = <5000000>;
348                 regulator-max-microvolt = <5000000>;
349                 regulator-always-on = <1>;
350
351                 sd_card_power: regulator@0 {
352                         compatible = "broadcom,bcm2835-power-dev",
353                                      "broadcom,bcm2708-power-dev";
354                         reg = <0>;
355
356                         vin-supply = <&power>;
357                         regulator-name = "SD Card";
358                         regulator-min-microvolt = <3300000>;
359                         regulator-max-microvolt = <3300000>;
360                 };
361
362                 /* This is for the controller itself, not the root port */
363                 usb_hcd_power: regulator@3 {
364                         compatible = "broadcom,bcm2835-power-dev",
365                                      "broadcom,bcm2708-power-dev";
366                         reg = <3>;
367
368                         vin-supply = <&power>;
369                         regulator-name = "USB HCD";
370                         regulator-min-microvolt = <5000000>;
371                         regulator-max-microvolt = <5000000>;
372                 };
373         };
374
375         aliases {
376                 uart0 = &uart0;
377         };
378
379         chosen {
380                 bootargs = "";                  /* Set by VideoCore */
381                 stdin = "uart0";
382                 stdout = "uart0";
383         };
384
385 };