ramips: clean and improve MAC address setup in 02_network
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_buffalo_wsr-600dhp.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc";
10 model = "Buffalo WSR-600DHP";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 label = "wsr-600:green:power";
28 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
29 };
30
31 wifi_o {
32 label = "wsr-600:orange:wifi";
33 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
34 };
35
36 diag {
37 label = "wsr-600:orange:diag";
38 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
39 };
40
41 wifi_g {
42 label = "wsr-600:green:wifi";
43 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
44 };
45
46 router_o {
47 label = "wsr-600:orange:router";
48 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
49 };
50
51 router_g {
52 label = "wsr-600:green:router";
53 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
54 };
55
56 internet_o {
57 label = "wsr-600:orange:internet";
58 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
59 };
60
61 internet_g {
62 label = "wsr-600:green:internet";
63 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 keys {
68 compatible = "gpio-keys-polled";
69 poll-interval = <20>;
70
71 power {
72 label = "power";
73 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_POWER>;
75 };
76
77 reset {
78 label = "reset";
79 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_RESTART>;
81 };
82
83 aoss {
84 label = "aoss";
85 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_WPS_BUTTON>;
87 };
88
89 auto {
90 label = "mode";
91 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
92 linux,code = <BTN_0>;
93 linux,input-type = <EV_SW>;
94 };
95
96 ap {
97 label = "ap";
98 gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
99 linux,code = <BTN_0>;
100 linux,input-type = <EV_SW>;
101 };
102
103 router {
104 label = "router";
105 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
106 linux,code = <BTN_0>;
107 linux,input-type = <EV_SW>;
108 };
109 };
110
111 gpio_poweroff {
112 compatible = "gpio-poweroff";
113 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
114 };
115 };
116
117 &spi0 {
118 status = "okay";
119
120 m25p80@0 {
121 compatible = "jedec,spi-nor";
122 reg = <0>;
123 spi-max-frequency = <10000000>;
124
125 partitions {
126 compatible = "fixed-partitions";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 partition@0 {
131 label = "u-boot";
132 reg = <0x0 0x30000>;
133 read-only;
134 };
135
136 partition@30000 {
137 label = "u-boot-env";
138 reg = <0x30000 0x10000>;
139 read-only;
140 };
141
142 factory: partition@40000 {
143 label = "factory";
144 reg = <0x40000 0x10000>;
145 read-only;
146 };
147
148 partition@50000 {
149 compatible = "denx,uimage";
150 label = "firmware";
151 reg = <0x50000 0xfb0000>;
152 };
153 };
154 };
155 };
156
157 &pinctrl {
158 state_default: pinctrl0 {
159 gpio {
160 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
161 ralink,function = "gpio";
162 };
163 };
164 };
165
166 &pcie {
167 status = "okay";
168 };
169
170 &pcie0 {
171 rt5592@0,0 {
172 reg = <0x0000 0 0 0 0>;
173 ralink,mtd-eeprom = <&factory 0x8000>;
174 };
175 };
176
177 &pcie1 {
178 mt76@0,0 {
179 reg = <0x0000 0 0 0 0>;
180 mediatek,mtd-eeprom = <&factory 0x0000>;
181 };
182 };
183
184 &ethernet {
185 mtd-mac-address = <&factory 0x4>;
186 };
187
188 &xhci {
189 status = "disabled";
190 };