lantiq: dts: move memory node to board dts
[openwrt/staging/blogic.git] / target / linux / lantiq / files / arch / mips / boot / dts / WBMR300.dts
1 /dts-v1/;
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
7
8 / {
9 compatible = "buffalo,wbmr-300hpd", "lantiq,xway", "lantiq,vr9";
10 model = "Buffalo WBMR-300HPD";
11
12 chosen {
13 bootargs = "console=ttyLTQ0,115200";
14 };
15
16 aliases {
17 led-boot = &power_g;
18 led-failsafe = &diag_r;
19 led-running = &power_g;
20 led-upgrade = &power_g;
21
22 led-dsl = &dsl;
23 led-internet = &router_g;
24 led-wifi = &wifi_g;
25 };
26
27 memory@0 {
28 device_type = "memory";
29 reg = <0x0 0x4000000>;
30 };
31
32 gpio_poweroff {
33 compatible = "gpio-poweroff";
34 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
35 };
36
37 gpio-keys-polled {
38 compatible = "gpio-keys-polled";
39 #address-cells = <1>;
40 #size-cells = <0>;
41 poll-interval = <100>;
42
43 power {
44 label = "power";
45 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_POWER>;
47 };
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 wps {
56 label = "wps";
57 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60
61 auto {
62 label = "auto";
63 gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
64 linux,code = <BTN_0>;
65 linux,input-type = <EV_SW>;
66 };
67
68 router {
69 label = "router";
70 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
71 linux,code = <BTN_1>;
72 linux,input-type = <EV_SW>;
73 };
74 };
75
76 gpio-leds {
77 compatible = "gpio-leds";
78
79 diag_r: diag_r {
80 label = "wbmr300:red:diag";
81 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
82 default_state = "off";
83 };
84
85 wifi_g: wifi_g {
86 label = "wbmr300:green:wifi";
87 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
88 };
89
90 dsl: dsl {
91 label = "dsl";
92 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
93 };
94
95 router_y: router_y {
96 label = "wbmr300:yellow:router";
97 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
98 };
99
100 wifi_y: wifi_y {
101 label = "wbmr300:yellow:wifi";
102 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
103 };
104
105 lan1: lan1 {
106 label = "wbmr300:green:lan1";
107 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
108 };
109
110 wan: wan {
111 label = "wbmr300:green:wan";
112 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
113 };
114
115 lan3: lan3 {
116 label = "wbmr300:green:lan3";
117 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
118 };
119
120 lan2: lan2 {
121 label = "wbmr300:green:lan2";
122 gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
123 };
124
125 internet_g: internet_g {
126 label = "wbmr300:green:internet";
127 gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
128 };
129
130 internet_y: internet_y {
131 label = "wbmr300:yellow:internet";
132 gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
133 };
134
135 router_g: router_g {
136 label = "wbmr300:green:router";
137 gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
138 };
139
140 power_g: power_g {
141 label = "wbmr300:green:power";
142 gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
143 };
144 };
145
146 usb_vbus: regulator-usb-vbus {
147 compatible = "regulator-fixed";
148
149 regulator-name = "USB_VBUS";
150
151 regulator-min-microvolt = <5000000>;
152 regulator-max-microvolt = <5000000>;
153
154 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
155 enable-active-high;
156 };
157 };
158
159 &eth0 {
160 lan: interface@0 {
161 compatible = "lantiq,xrx200-pdi";
162 #address-cells = <1>;
163 #size-cells = <0>;
164 reg = <0>;
165 lantiq,switch;
166
167 ethernet@1 {
168 compatible = "lantiq,xrx200-pdi-port";
169 reg = <4>;
170 phy-mode = "mii";
171 phy-handle = <&phy13>;
172 };
173 ethernet@2 {
174 compatible = "lantiq,xrx200-pdi-port";
175 reg = <5>;
176 phy-mode = "mii";
177 phy-handle = <&phy14>;
178 };
179 ethernet@3 {
180 compatible = "lantiq,xrx200-pdi-port";
181 reg = <2>;
182 phy-mode = "mii";
183 phy-handle = <&phy11>;
184 };
185 ethernet@4 {
186 compatible = "lantiq,xrx200-pdi-port";
187 reg = <3>;
188 phy-mode = "mii";
189 phy-handle = <&phy12>;
190 };
191 };
192
193 mdio@0 {
194 #address-cells = <1>;
195 #size-cells = <0>;
196 compatible = "lantiq,xrx200-mdio";
197 reg = <0>;
198
199 phy11: ethernet-phy@11 {
200 reg = <0x11>;
201 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
202 };
203 phy12: ethernet-phy@12 {
204 reg = <0x12>;
205 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
206 };
207 phy13: ethernet-phy@13 {
208 reg = <0x13>;
209 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
210 };
211 phy14: ethernet-phy@14 {
212 reg = <0x14>;
213 compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
214 };
215 };
216 };
217
218 &gphy0 {
219 lantiq,gphy-mode = <GPHY_MODE_FE>;
220 };
221
222 &gphy1 {
223 lantiq,gphy-mode = <GPHY_MODE_FE>;
224 };
225
226 &gpio {
227 pinctrl-names = "default";
228 pinctrl-0 = <&state_default>;
229
230 state_default: pinmux {
231 mdio {
232 lantiq,groups = "mdio";
233 lantiq,function = "mdio";
234 };
235 phy-rst {
236 lantiq,pins = "io42";
237 lantiq,pull = <0>;
238 lantiq,open-drain = <0>;
239 lantiq,output = <1>;
240 };
241 pcie-rst {
242 lantiq,pins = "io38";
243 lantiq,pull = <0>;
244 lantiq,output = <1>;
245 };
246 };
247 pins_spi_default: pins_spi_default {
248 spi_in {
249 lantiq,groups = "spi_di";
250 lantiq,function = "spi";
251 };
252 spi_out {
253 lantiq,groups = "spi_do", "spi_clk",
254 "spi_cs4";
255 lantiq,function = "spi";
256 lantiq,output = <1>;
257 };
258 };
259 };
260
261 &spi {
262 status = "okay";
263
264 pinctrl-names = "default";
265 pinctrl-0 = <&pins_spi_default>;
266
267 m25p80@4 {
268 #address-cells = <1>;
269 #size-cells = <1>;
270 compatible = "jedec,spi-nor";
271 reg = <4 0>;
272 spi-max-frequency = <20000000>;
273
274 partition@0 {
275 reg = <0x0 0x10000>;
276 label = "u-boot";
277 read-only;
278 };
279
280 partition@10000 {
281 reg = <0x10000 0x10000>;
282 label = "gphyfirmware";
283 read-only;
284 };
285
286 partition@20000 {
287 reg = <0x20000 0x80000>;
288 label = "dsl_fw";
289 };
290
291 partition@de0000 {
292 reg = <0xa0000 0xf40000>;
293 label = "firmware";
294 };
295
296 partition@fe0000 {
297 reg = <0xfe0000 0x10000>;
298 label = "sysconfig";
299 read-only;
300 };
301
302 partition@ff0000 {
303 reg = <0xff0000 0x2000>;
304 label = "ubootconfig";
305 };
306
307 partition@ff3000 {
308 reg = <0xff3000 0x2000>;
309 label = "board_config";
310 read-only;
311 };
312 };
313 };
314
315 &usb_phy0 {
316 status = "okay";
317 };
318
319 &usb_phy1 {
320 status = "okay";
321 };
322
323 &usb0 {
324 status = "okay";
325 vbus-supply = <&usb_vbus>;
326 };
327
328 &usb1 {
329 status = "okay";
330 vbus-supply = <&usb_vbus>;
331 };