lantiq: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_arcadyan_vgv7510kw22.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,vgv7510kw22", "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 = &dsl;
20 led-internet = &internet_green;
21 led-wifi = &wifi;
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
33 reset {
34 label = "reset";
35 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38
39 wps {
40 label = "wps";
41 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_WPS_BUTTON>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 dsl: dsl {
50 label = "green:dsl";
51 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
52 };
53
54 internet_red {
55 label = "red:internet";
56 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
57 };
58
59 info_red {
60 label = "red:info";
61 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
62 };
63
64 power_green: power {
65 label = "green:power";
66 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
67 default-state = "keep";
68 };
69
70 info_green {
71 label = "green:info";
72 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
73 };
74
75 internet_green: internet_green {
76 label = "green:internet";
77 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
78 };
79
80 wifi: wifi {
81 label = "green:wlan";
82 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
83 };
84
85 power_red: power2 {
86 label = "red:power";
87 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
88 };
89
90 phone {
91 label = "green:telefon";
92 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
93 };
94 };
95
96 usb_vbus: regulator-usb-vbus {
97 compatible = "regulator-fixed";
98
99 regulator-name = "USB_VBUS";
100
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
103
104 gpio = <&gpio 47 GPIO_ACTIVE_HIGH>;
105 enable-active-high;
106 };
107 };
108
109 &eth0 {
110 nvmem-cells = <&macaddr_boardconfig_16>;
111 nvmem-cell-names = "mac-address";
112 };
113
114 &gphy0 {
115 lantiq,gphy-mode = <GPHY_MODE_FE>;
116 };
117
118 &gphy1 {
119 lantiq,gphy-mode = <GPHY_MODE_FE>;
120 };
121
122 &gpio {
123 pinctrl-names = "default";
124 pinctrl-0 = <&state_default>, <&gphy0_led1_pins>;
125
126 state_default: pinmux {
127 pci-rst {
128 lantiq,pins = "io21";
129 lantiq,open-drain = <0>;
130 lantiq,pull = <0>;
131 lantiq,output = <1>;
132 };
133 };
134 };
135
136 &gswip {
137 pinctrl-0 = <&mdio_pins>,
138 <&gphy0_led0_pins>,
139 <&gphy1_led0_pins>, <&gphy1_led1_pins>;
140 pinctrl-names = "default";
141 };
142
143 &gswip_mdio {
144 phy1: ethernet-phy@1 {
145 reg = <0x1>;
146 };
147 phy11: ethernet-phy@11 {
148 reg = <0x11>;
149 };
150 phy12: ethernet-phy@12 {
151 reg = <0x12>;
152 };
153 phy13: ethernet-phy@13 {
154 reg = <0x13>;
155 };
156 phy14: ethernet-phy@14 {
157 reg = <0x14>;
158 };
159 };
160
161 &gswip_ports {
162 port@0 {
163 reg = <0>;
164 label = "wan";
165 phy-mode = "mii";
166 phy-handle = <&phy1>;
167 };
168 port@2 {
169 reg = <2>;
170 label = "lan2";
171 phy-mode = "internal";
172 phy-handle = <&phy11>;
173 };
174 port@3 {
175 reg = <3>;
176 label = "lan1";
177 phy-mode = "internal";
178 phy-handle = <&phy12>;
179 };
180 port@4 {
181 reg = <4>;
182 label = "lan4";
183 phy-mode = "internal";
184 phy-handle = <&phy13>;
185 };
186 port@5 {
187 reg = <5>;
188 label = "lan3";
189 phy-mode = "internal";
190 phy-handle = <&phy14>;
191 };
192 };
193
194 &localbus {
195 flash@0 {
196 compatible = "lantiq,nor";
197 bank-width = <2>;
198 reg = <0 0x0 0x1000000>;
199
200 partitions {
201 compatible = "fixed-partitions";
202 #address-cells = <1>;
203 #size-cells = <1>;
204
205 boardconfig: partition@fe0000 {
206 label = "board_config";
207 reg = <0xfe0000 0x20000>;
208 read-only;
209 };
210 };
211 };
212 };
213
214 &pci0 {
215 status = "okay";
216 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
217
218 wifi@1814,3592 {
219 compatible = "pci1814,3592";
220 reg = <0x7000 0 0 0 0>;
221 ralink,mtd-eeprom = <&boardconfig 0x410>;
222 ralink,mtd-eeprom-swap;
223 nvmem-cells = <&macaddr_boardconfig_16>;
224 nvmem-cell-names = "mac-address";
225 mac-address-increment = <1>;
226 };
227 };
228
229 &pcie0 {
230 status = "disabled";
231 };
232
233 &usb_phy0 {
234 status = "okay";
235 };
236
237 &usb0 {
238 status = "okay";
239 vbus-supply = <&usb_vbus>;
240 };
241
242 &vmmc {
243 status = "okay";
244 gpios = <&gpio 30 GPIO_ACTIVE_HIGH //fxs relay
245 &gpio 31 GPIO_ACTIVE_HIGH //still unknown
246 &gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic?
247 };
248
249 &boardconfig {
250 compatible = "nvmem-cells";
251 #address-cells = <1>;
252 #size-cells = <1>;
253
254 macaddr_boardconfig_16: macaddr@16 {
255 reg = <0x16 0x6>;
256 };
257 };