lantiq: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / danube_arcadyan_arv7518pw.dts
1 #include "danube.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 compatible = "arcadyan,arv7518pw", "lantiq,xway", "lantiq,danube";
7 model = "Astoria Networks ARV7518PW";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
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 = &online_green;
21 led-usb = &led_usb;
22 led-wifi = &wifi;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x4000000>;
28 };
29
30 keys {
31 compatible = "gpio-keys-polled";
32 poll-interval = <100>;
33
34 rfkill {
35 label = "rfkill";
36 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RFKILL>;
38 };
39 reset {
40 label = "reset";
41 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48 power_green: power {
49 label = "green:power";
50 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
51 default-state = "keep";
52 };
53 dsl: dsl {
54 label = "green:dsl";
55 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
56 };
57 online_green: online {
58 label = "green:internet";
59 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
60 };
61 wifi: wifi {
62 label = "green:wlan";
63 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
64 };
65 power_red: power2 {
66 label = "red:power";
67 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
68 };
69 online2 {
70 label = "red:internet";
71 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
72 };
73 led_usb: usb {
74 label = "green:usb";
75 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
76 };
77 voice {
78 label = "green:voip";
79 gpios = <&gpiomm 0 GPIO_ACTIVE_LOW>;
80 };
81 fxs1 {
82 label = "green:phone1";
83 gpios = <&gpiomm 1 GPIO_ACTIVE_LOW>;
84 };
85 fxs2 {
86 label = "green:phone2";
87 gpios = <&gpiomm 2 GPIO_ACTIVE_LOW>;
88 };
89 unlabeled {
90 label = "amber:unlabeled";
91 gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
92 };
93 wps {
94 label = "amber:wps";
95 gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>;
96 };
97 wps2 {
98 label = "green:wps";
99 gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>;
100 };
101 wps3 {
102 label = "red:wps";
103 gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
104 };
105 };
106
107 usb_vbus: regulator-usb-vbus {
108 compatible = "regulator-fixed";
109
110 regulator-name = "USB_VBUS";
111
112 regulator-min-microvolt = <5000000>;
113 regulator-max-microvolt = <5000000>;
114
115 gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
116 enable-active-high;
117 };
118 };
119
120 &gpio {
121 pinctrl-names = "default";
122 pinctrl-0 = <&state_default>;
123
124 state_default: pinmux {
125 ebu {
126 lantiq,groups = "ebu cs1";
127 lantiq,function = "ebu";
128 };
129 pci_rst {
130 lantiq,pins = "io21";
131 lantiq,pull = <2>;
132 lantiq,output = <1>;
133 };
134 leds {
135 lantiq,pins = "io2", "io4", "io5", "io6", "io7", "io8", "io19";
136 lantiq,output = <1>;
137 };
138 keys {
139 lantiq,pins = "io28", "io30";
140 lantiq,output = <0>;
141 lantiq,pull = <2>;
142 lantiq,open-drain = <1>;
143 };
144 };
145 };
146
147 /*
148 #define SWITCH_RESET 13
149 */
150 &gsw {
151 phy-mode = "mii";
152 nvmem-cells = <&macaddr_boardconfig_16>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &localbus {
157 flash@0 {
158 compatible = "lantiq,nor";
159 bank-width = <2>;
160 reg = <0 0x0 0x2000000>;
161
162 partitions {
163 compatible = "fixed-partitions";
164 #address-cells = <1>;
165 #size-cells = <1>;
166
167 partition@0 {
168 label = "uboot";
169 reg = <0x00000 0x10000>;
170 read-only;
171 };
172
173 partition@10000 {
174 label = "u-boot-env";
175 reg = <0x10000 0x10000>;
176 };
177
178 partition@20000 {
179 label = "firmware";
180 reg = <0x20000 0x7d0000>;
181 };
182
183 boardconfig: partition@7f0000 {
184 label = "boardconfig";
185 reg = <0x7f0000 0x10000>;
186 read-only;
187 };
188 };
189 };
190
191 gpiomm: gpio@1 {
192 compatible = "lantiq,gpio-mm";
193 reg = <1 0x0 0x10 >;
194 #address-cells = <1>;
195 #size-cells = <1>;
196 #gpio-cells = <2>;
197 gpio-controller;
198 lantiq,shadow = <0x0>;
199 };
200 };
201
202 &pci0 {
203 status = "okay";
204
205 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
206 pinctrl-names = "default";
207
208 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
209 lantiq,external-clock;
210 req-mask = <0xf>;
211
212 wifi@168c,0029 {
213 compatible = "pci168c,0029";
214 reg = <0x7000 0 0 0 0>;
215 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
216 nvmem-cells = <&macaddr_boardconfig_16>;
217 nvmem-cell-names = "mac-address";
218 mac-address-increment = <1>;
219 };
220 };
221
222 &usb_phy {
223 status = "okay";
224 };
225
226 &usb {
227 status = "okay";
228 vbus-supply = <&usb_vbus>;
229 };
230
231 &vmmc {
232 status = "okay";
233 };
234
235 &boardconfig {
236 compatible = "nvmem-cells";
237 #address-cells = <1>;
238 #size-cells = <1>;
239
240 macaddr_boardconfig_16: macaddr@16 {
241 reg = <0x16 0x6>;
242 };
243 };