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