lantiq: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / danube_arcadyan_arv4525pw.dts
1 #include "danube.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 compatible = "arcadyan,arv4525pw", "lantiq,xway", "lantiq,danube";
7 model = "Speedport W501V Typ A";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11 };
12
13 aliases {
14 /* we dont have a power led, lets use the online led */
15 led-boot = &online;
16 led-failsafe = &online;
17
18 led-dsl = &dsl;
19 led-internet = &online;
20 led-wifi = &wifi;
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x2000000>;
26 };
27
28 ath5k_eep {
29 compatible = "ath5k,eeprom";
30 ath,eep-flash = <&boardconfig 0x400>;
31 ath,mac-offset = <0x0>;
32 ath,eep-swap;
33 };
34
35 keys {
36 compatible = "gpio-keys-polled";
37 poll-interval = <100>;
38
39 wps {
40 label = "wps";
41 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_WPS_BUTTON>;
43 };
44 reset {
45 label = "reset";
46 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49 };
50
51 leds {
52 compatible = "gpio-leds";
53 fxo {
54 label = "green:festnetz";
55 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
56 };
57 fxs {
58 label = "green:internet";
59 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
60 };
61 dsl: dsl {
62 label = "green:t-dsl";
63 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
64 };
65 wifi: wifi {
66 label = "green:wlan";
67 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
68 };
69 online: online {
70 label = "green:online";
71 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
72 };
73 };
74 };
75
76 &gpio {
77 pinctrl-names = "default";
78 pinctrl-0 = <&state_default>;
79
80 state_default: pinmux {
81 pci_rst {
82 lantiq,pins = "io21";
83 lantiq,pull = <2>;
84 lantiq,output = <1>;
85 };
86 relay {
87 lantiq,pins = "io31";
88 lantiq,output = <1>;
89 };
90 };
91 };
92
93 /* #define ARV4525PW_PHYRESET 13 */
94 &gsw {
95 phy-mode = "mii";
96 nvmem-cells = <&macaddr_boardconfig_16>;
97 nvmem-cell-names = "mac-address";
98 };
99
100 &localbus {
101 flash@0 {
102 compatible = "lantiq,nor";
103 bank-width = <2>;
104 reg = <0 0x0 0x2000000>;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "uboot";
113 reg = <0x00000 0x10000>;
114 read-only;
115 };
116
117 partition@10000 {
118 label = "u-boot-env";
119 reg = <0x10000 0x10000>;
120 read-only;
121 };
122
123 partition@20000 {
124 label = "firmware";
125 reg = <0x20000 0x3d0000>;
126 };
127
128 boardconfig: partition@3f0000 {
129 label = "boardconfig";
130 reg = <0x3f0000 0x10000>;
131 read-only;
132 };
133 };
134 };
135 };
136
137 &pci0 {
138 status = "okay";
139
140 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
141 pinctrl-names = "default";
142
143 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
144 };
145
146 /* #define ARV4525PW_RELAY 31 */
147 &vmmc {
148 status = "okay";
149 gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
150 };
151
152 &boardconfig {
153 compatible = "nvmem-cells";
154 #address-cells = <1>;
155 #size-cells = <1>;
156
157 macaddr_boardconfig_16: macaddr@16 {
158 reg = <0x16 0x6>;
159 };
160 };