lantiq: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / danube_arcadyan_arv452cqw.dts
1 #include "danube.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 compatible = "arcadyan,arv452cqw", "lantiq,xway", "lantiq,danube";
7 model = "Arcor 801";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11 };
12
13 aliases {
14 led-boot = &power_blue;
15 led-failsafe = &power_red;
16 led-running = &power_blue;
17 led-upgrade = &power_blue;
18
19 led-dsl = &dsl_blue;
20 led-usb = &led_usb;
21 led-wifi = &wifi;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x2000000>;
27 };
28
29 ath5k_eep {
30 compatible = "ath5k,eeprom";
31 ath,eep-flash = <&boardconfig 0x400>;
32 ath,mac-offset = <0x0>;
33 ath,eep-swap;
34 };
35
36 keys {
37 compatible = "gpio-keys-polled";
38 poll-interval = <100>;
39
40 rfkill {
41 label = "rfkill";
42 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RFKILL>;
44 };
45 wps {
46 label = "wps";
47 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50 reset {
51 label = "reset";
52 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55 };
56
57 leds {
58 compatible = "gpio-leds";
59 power_blue: power0 {
60 label = "blue:power";
61 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
62 default-state = "keep";
63 };
64 dsl_blue: dsl {
65 label = "blue:dsl";
66 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
67 };
68 isdn {
69 label = "blue:isdn";
70 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
71 };
72 power_red: power1 {
73 label = "red:power";
74 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
75 };
76 wps {
77 label = "blue:wps";
78 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
79 };
80 wps1 {
81 label = "yellow:wps";
82 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
83 };
84 fxs1 {
85 label = "blue:telefon1";
86 gpios = <&gpiomm 0 GPIO_ACTIVE_LOW>;
87 };
88 fxs2 {
89 label = "blue:telefon2";
90 gpios = <&gpiomm 1 GPIO_ACTIVE_LOW>;
91 };
92 wps2 {
93 label = "red:wps";
94 gpios = <&gpiomm 2 GPIO_ACTIVE_LOW>;
95 };
96 fxo {
97 label = "blue:line";
98 gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
99 };
100 voice {
101 label = "blue:sprache";
102 gpios = <&gpiomm 4 1>;
103 };
104 led_usb: usb {
105 label = "blue:usb";
106 gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>;
107 };
108 wifi: wifi {
109 label = "blue:wlan";
110 gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
111 };
112 /*
113 internet blue and internet red are missing
114 dsl2 and dsl3 are not referenced in manual
115 */
116 dsl2 {
117 label = "yellow:dsl";
118 gpios = <&gpiomm 8 GPIO_ACTIVE_LOW>;
119 };
120 dsl3 {
121 label = "red:dsl";
122 gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>;
123 };
124 };
125
126 usb_vbus: regulator-usb-vbus {
127 compatible = "regulator-fixed";
128
129 regulator-name = "USB_VBUS";
130
131 regulator-min-microvolt = <5000000>;
132 regulator-max-microvolt = <5000000>;
133
134 gpio = <&gpio 28 GPIO_ACTIVE_HIGH>;
135 enable-active-high;
136 };
137 };
138
139 &gpio {
140 pinctrl-names = "default";
141 pinctrl-0 = <&state_default>;
142
143 state_default: pinmux {
144 ebu {
145 lantiq,groups = "ebu cs1";
146 lantiq,function = "ebu";
147 };
148 pci_rst {
149 lantiq,pins = "io21";
150 lantiq,pull = <0>;
151 lantiq,output = <1>;
152 };
153 leds {
154 lantiq,pins = "io3", "io5", "io6", "io7", "io9";
155 lantiq,output = <1>;
156 };
157 };
158 };
159
160 /*
161 #define ARV452CPW_SWITCH_RESET 110
162 */
163 &gsw {
164 phy-mode = "rmii";
165 nvmem-cells = <&macaddr_boardconfig_16>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &localbus {
170 flash@0 {
171 compatible = "lantiq,nor";
172 bank-width = <2>;
173 reg = <0 0x0 0x400000>;
174
175 partitions {
176 compatible = "fixed-partitions";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 partition@0 {
181 label = "uboot";
182 reg = <0x00000 0x10000>;
183 read-only;
184 };
185
186 partition@10000 {
187 label = "u-boot-env";
188 reg = <0x10000 0x10000>;
189 read-only;
190 };
191
192 partition@20000 {
193 label = "firmware";
194 reg = <0x20000 0x3d0000>;
195 };
196
197 boardconfig: partition@3f0000 {
198 label = "boardconfig";
199 reg = <0x3f0000 0x10000>;
200 read-only;
201 };
202 };
203 };
204
205 gpiomm: gpio@1 {
206 compatible = "lantiq,gpio-mm";
207 reg = <1 0x0 0x10 >;
208 #address-cells = <1>;
209 #size-cells = <1>;
210 #gpio-cells = <2>;
211 gpio-controller;
212 lantiq,shadow = <0x77f>;
213 };
214 };
215
216 &pci0 {
217 status = "okay";
218
219 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
220 pinctrl-names = "default";
221
222 lantiq,external-clock;
223 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
224 };
225
226 &usb_phy {
227 status = "okay";
228 };
229
230 &usb {
231 status = "okay";
232 vbus-supply = <&usb_vbus>;
233 };
234
235 &vmmc {
236 status = "okay";
237 gpios = <&gpio 31 GPIO_ACTIVE_HIGH
238 &gpiomm 7 GPIO_ACTIVE_HIGH>;
239 };
240
241 &boardconfig {
242 compatible = "nvmem-cells";
243 #address-cells = <1>;
244 #size-cells = <1>;
245
246 macaddr_boardconfig_16: macaddr@16 {
247 reg = <0x16 0x6>;
248 };
249 };