38972b2210892f81633e6586152456b2b5e624b1
[pandora-kernel.git] / arch / arm / boot / dts / kirkwood-b3.dts
1 /*
2  * Device Tree file for Excito Bubba B3
3  *
4  * Copyright (C) 2013, Andrew Lunn <andrew@lunn.ch>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version
9  * 2 of the License, or (at your option) any later version.
10  *
11  * Note: This requires a new'ish version of u-boot, which disables the
12  * L2 cache. If your B3 silently fails to boot, u-boot is probably too
13  * old. Either upgrade, or consider the following email:
14  *
15  * http://lists.debian.org/debian-arm/2012/08/msg00128.html
16  */
17
18 /dts-v1/;
19
20 #include "kirkwood.dtsi"
21 #include "kirkwood-6281.dtsi"
22
23 / {
24         model = "Excito B3";
25         compatible = "excito,b3", "marvell,kirkwood-88f6281", "marvell,kirkwood";
26         memory { /* 512 MB */
27                 device_type = "memory";
28                 reg = <0x00000000 0x20000000>;
29         };
30
31         chosen {
32                 bootargs = "console=ttyS0,115200n8 earlyprintk";
33                 stdout-path = &uart0;
34         };
35
36         mbus {
37                 pcie-controller {
38                         status = "okay";
39
40                         /* Wifi model has Atheros chipset on pcie port */
41                         pcie@1,0 {
42                                 status = "okay";
43                         };
44                 };
45         };
46
47         ocp@f1000000 {
48                 pinctrl: pin-controller@10000 {
49                         pmx_button_power: pmx-button-power {
50                                 marvell,pins = "mpp39";
51                                 marvell,function = "gpio";
52                         };
53                         pmx_led_green: pmx-led-green {
54                                 marvell,pins = "mpp38";
55                                 marvell,function = "gpio";
56                         };
57                         pmx_led_red: pmx-led-red {
58                                 marvell,pins = "mpp41";
59                                 marvell,function = "gpio";
60                         };
61                         pmx_led_blue: pmx-led-blue {
62                                 marvell,pins = "mpp42";
63                                 marvell,function = "gpio";
64                         };
65                         pmx_beeper: pmx-beeper {
66                                 marvell,pins = "mpp40";
67                                 marvell,function = "gpio";
68                         };
69                 };
70
71                 spi@10600 {
72                         status = "okay";
73                         pinctrl-0 = <&pmx_spi>;
74                         pinctrl-names = "default";
75
76                         m25p16@0 {
77                                 #address-cells = <1>;
78                                 #size-cells = <1>;
79                                 compatible = "m25p16";
80                                 reg = <0>;
81                                 spi-max-frequency = <40000000>;
82                                 mode = <0>;
83
84                                 partition@0 {
85                                         reg = <0x0 0xc0000>;
86                                         label = "u-boot";
87                                 };
88
89                                 partition@c0000 {
90                                         reg = <0xc0000 0x20000>;
91                                         label = "u-boot env";
92                                 };
93
94                                 partition@e0000 {
95                                         reg = <0xe0000 0x120000>;
96                                         label = "data";
97                                 };
98                         };
99                 };
100
101                 i2c@11000 {
102                         status = "okay";
103                         /*
104                          * There is something on the bus at address 0x64.
105                          * Not yet identified what it is, maybe the eeprom
106                          * for the Atheros WiFi chip?
107                          */
108                 };
109
110
111                 serial@12000 {
112                         /* Internal on test pins, 3.3v TTL
113                          * UART0_RX = Testpoint 65
114                          * UART0_TX = Testpoint 66
115                          * See the Excito Wiki for more details.
116                          */
117                         status = "okay";
118                 };
119
120                 sata@80000 {
121                         /* One internal, the second as eSATA */
122                         status = "okay";
123                         nr-ports = <2>;
124                 };
125         };
126
127         gpio-leds {
128                 /*
129                  * There is one LED "port" on the front and the colours
130                  * mix together giving some interesting combinations.
131                  */
132                 compatible = "gpio-leds";
133                 pinctrl-0 = < &pmx_led_green &pmx_led_red
134                               &pmx_led_blue >;
135                 pinctrl-names = "default";
136
137                 programming_led {
138                         label = "bubba3:green:programming";
139                         gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
140                         default-state = "off";
141                 };
142
143                 error_led {
144                         label = "bubba3:red:error";
145                         gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
146                 };
147
148                 active_led {
149                         label = "bubba3:blue:active";
150                         gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
151                 };
152         };
153
154         gpio-keys {
155                 compatible = "gpio-keys";
156                 pinctrl-0 = <&pmx_button_power>;
157                 pinctrl-names = "default";
158
159                 power-button {
160                         /* On the back */
161                         label = "Power Button";
162                         linux,code = <KEY_POWER>;
163                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
164                 };
165         };
166
167         beeper: beeper {
168                 /* 4KHz Piezoelectric buzzer */
169                 compatible = "gpio-beeper";
170                 pinctrl-0 = <&pmx_beeper>;
171                 pinctrl-names = "default";
172                 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
173         };
174 };
175
176 &mdio {
177         status = "okay";
178
179         ethphy0: ethernet-phy@8 {
180                 device_type = "ethernet-phy";
181                 reg = <8>;
182         };
183
184         ethphy1: ethernet-phy@24 {
185                 device_type = "ethernet-phy";
186                 reg = <24>;
187         };
188 };
189
190 &eth0 {
191         status = "okay";
192         ethernet0-port@0 {
193                 phy-handle = <&ethphy0>;
194         };
195 };
196
197 &eth1 {
198         status = "okay";
199         ethernet1-port@0 {
200                 phy-handle = <&ethphy1>;
201         };
202 };
203