lantiq: update binding for ralink EEPROM swap
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_arcadyan_vgv7519.dtsi
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
5
6 / {
7 compatible = "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200 mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp";
11 };
12
13 aliases {
14 led-boot = &power_green;
15 led-failsafe = &power_red;
16 led-running = &power_green;
17 led-upgrade = &power_green;
18
19 led-dsl = &broadband_green;
20 led-internet = &internet_green;
21 led-wifi = &wireless_green;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x4000000>;
27 };
28
29 keys {
30 compatible = "gpio-keys-polled";
31 poll-interval = <100>;
32 reset {
33 label = "reset";
34 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 eco {
38 label = "eco";
39 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
40 linux,code = <BTN_0>;
41 };
42 rfkill {
43 label = "rfkill";
44 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RFKILL>;
46 };
47 wps {
48 label = "wps";
49 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53
54 leds {
55 compatible = "gpio-leds";
56
57 eco {
58 label = "blue:eco";
59 gpios = <&stp 2 GPIO_ACTIVE_LOW>;
60 };
61 wps_red {
62 label = "red:wps";
63 gpios = <&stp 3 GPIO_ACTIVE_LOW>;
64 };
65 wps_green {
66 label = "green:wps";
67 gpios = <&stp 4 GPIO_ACTIVE_LOW>;
68 };
69 upgrade {
70 label = "blue:upgrade";
71 gpios = <&stp 5 GPIO_ACTIVE_LOW>;
72 };
73 tv {
74 label = "green:tv";
75 gpios = <&stp 6 GPIO_ACTIVE_LOW>;
76 };
77 internet_green: internet_green {
78 label = "green:internet";
79 gpios = <&stp 7 GPIO_ACTIVE_LOW>;
80 };
81 internet_red {
82 label = "red:internet";
83 gpios = <&stp 8 GPIO_ACTIVE_LOW>;
84 };
85 broadband_red {
86 label = "red:broadband";
87 gpios = <&stp 9 GPIO_ACTIVE_LOW>;
88 };
89 broadband_green: broadband_green {
90 label = "green:broadband";
91 gpios = <&stp 10 GPIO_ACTIVE_LOW>;
92 };
93 voice {
94 label = "green:voice";
95 gpios = <&stp 11 GPIO_ACTIVE_LOW>;
96 };
97 wireless_red {
98 label = "red:wireless";
99 gpios = <&stp 12 GPIO_ACTIVE_LOW>;
100 };
101 wireless_green: wireless_green {
102 label = "green:wireless";
103 gpios = <&stp 13 GPIO_ACTIVE_LOW>;
104 };
105 power_green: power2 {
106 label = "green:power";
107 gpios = <&stp 14 GPIO_ACTIVE_LOW>;
108 default-state = "keep";
109 };
110 power_red: power {
111 label = "red:power";
112 gpios = <&stp 15 GPIO_ACTIVE_LOW>;
113 };
114 };
115
116 usb_vbus: regulator-usb-vbus {
117 compatible = "regulator-fixed";
118
119 regulator-name = "USB_VBUS";
120
121 regulator-min-microvolt = <5000000>;
122 regulator-max-microvolt = <5000000>;
123
124 gpio = <&gpio 32 GPIO_ACTIVE_HIGH>;
125 enable-active-high;
126 };
127 };
128
129 &eth0 {
130 nvmem-cells = <&macaddr_boardconfig_16>;
131 nvmem-cell-names = "mac-address";
132 mac-address-increment = <1>;
133 };
134
135 &gphy0 {
136 lantiq,gphy-mode = <GPHY_MODE_GE>;
137 };
138
139 &gphy1 {
140 lantiq,gphy-mode = <GPHY_MODE_GE>;
141 };
142
143 &gpio {
144 pinctrl-names = "default";
145 pinctrl-0 = <&state_default>;
146
147 state_default: pinmux {
148 pci-rst {
149 lantiq,pins = "io21";
150 lantiq,open-drain = <0>;
151 lantiq,pull = <0>;
152 lantiq,output = <1>;
153 };
154 };
155 };
156
157 &gswip {
158 pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led0_pins>;
159 pinctrl-names = "default";
160 };
161
162 &gswip_mdio {
163 phy0: ethernet-phy@0 {
164 reg = <0x0>;
165 };
166 phy1: ethernet-phy@1 {
167 reg = <0x1>;
168 };
169 phy5: ethernet-phy@5 {
170 reg = <0x5>;
171 };
172 phy11: ethernet-phy@11 {
173 reg = <0x11>;
174 };
175 phy13: ethernet-phy@13 {
176 reg = <0x13>;
177 };
178 };
179
180 &gswip_ports {
181 port@0 {
182 reg = <0>;
183 label = "lan4";
184 phy-mode = "rgmii";
185 phy-handle = <&phy0>;
186 };
187 port@1 {
188 reg = <1>;
189 label = "lan3";
190 phy-mode = "rgmii";
191 phy-handle = <&phy1>;
192 };
193 port@2 {
194 reg = <2>;
195 label = "lan2";
196 phy-mode = "internal";
197 phy-handle = <&phy11>;
198 };
199 port@4 {
200 reg = <4>;
201 label = "lan1";
202 phy-mode = "internal";
203 phy-handle = <&phy13>;
204 };
205 port@5 {
206 reg = <5>;
207 label = "wan";
208 phy-mode = "rgmii";
209 phy-handle = <&phy5>;
210 };
211 };
212
213 &localbus {
214 flash@0 {
215 compatible = "lantiq,nor";
216 bank-width = <2>;
217 reg = <0 0x0 0x800000>, <1 0x800000 0x800000>;
218
219 partitions {
220 compatible = "fixed-partitions";
221 #address-cells = <1>;
222 #size-cells = <1>;
223
224 boardconfig: partition@40000 {
225 label = "board_config";
226 reg = <0x40000 0x10000>;
227 read-only;
228 };
229 };
230 };
231 };
232
233 &pci0 {
234 status = "okay";
235 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
236
237 wifi@1814,3091 {
238 compatible = "pci1814,3091";
239 reg = <0x7000 0 0 0 0>;
240 ralink,mtd-eeprom = <&boardconfig 0x410>;
241 ralink,eeprom-swap;
242 nvmem-cells = <&macaddr_boardconfig_16>;
243 nvmem-cell-names = "mac-address";
244 mac-address-increment = <1>;
245 };
246 };
247
248 &pcie0 {
249 status = "disabled";
250 };
251
252 &stp {
253 status = "okay";
254 lantiq,shadow = <0xffff>;
255 lantiq,groups = <0x3>;
256 /* lantiq,rising; */
257 };
258
259 &usb_phy0 {
260 status = "okay";
261 };
262
263 &usb_phy1 {
264 status = "okay";
265 };
266
267 &usb0 {
268 status = "okay";
269 vbus-supply = <&usb_vbus>;
270 };
271
272 &usb1 {
273 status = "okay";
274 vbus-supply = <&usb_vbus>;
275 };
276
277 &vmmc {
278 status = "okay";
279 gpios = <&gpio 30 GPIO_ACTIVE_HIGH //fxs relay
280 &gpio 31 GPIO_ACTIVE_HIGH //still unknown
281 &gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic?
282 };
283
284 &boardconfig {
285 compatible = "nvmem-cells";
286 #address-cells = <1>;
287 #size-cells = <1>;
288
289 macaddr_boardconfig_16: macaddr@16 {
290 reg = <0x16 0x6>;
291 };
292 };