b3691ba1da919c4161c0cd2a7804c27693c854ff
[oweals/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / ARV7519PW.dts
1 /dts-v1/;
2
3 #include "danube.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "arcadyan,arv7519pw", "lantiq,xway", "lantiq,danube";
9         model = "Astoria Networks ARV7519PW";
10
11         chosen {
12                 bootargs = "console=ttyLTQ0,115200";
13         };
14
15         aliases {
16                 led-boot = &power;
17                 led-failsafe = &power2;
18                 led-running = &power;
19                 led-upgrade = &power;
20
21                 led-dsl = &dsl;
22                 led-internet = &online;
23                 led-wifi = &wifi;
24         };
25
26         memory@0 {
27                 device_type = "memory";
28                 reg = <0x0 0x4000000>;
29         };
30
31         gpio-keys-polled {
32                 compatible = "gpio-keys-polled";
33                 poll-interval = <100>;
34
35                 rfkill {
36                         label = "rfkill";
37                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38                         linux,code = <KEY_RFKILL>;
39                 };
40                 reset {
41                         label = "reset";
42                         gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
43                         linux,code = <KEY_RESTART>;
44                 };
45         };
46
47         gpio-leds {
48                 compatible = "gpio-leds";
49                 power: power {
50                         label = "power";
51                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
52                         default-state = "keep";
53                 };
54                 power2: power2 {
55                         label = "power2";
56                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
57                 };
58                 online: online {
59                         label = "online";
60                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
61                 };
62                 online2 {
63                         label = "online2";
64                         gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
65                 };
66                 wifi: wifi {
67                         label = "wifi";
68                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
69                 };
70                 wifi2 {
71                         label = "wifi2";
72                         gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
73                 };
74                 wifi3 {
75                         label = "wifi3";
76                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
77                 };
78                 voice {
79                         label = "voice";
80                         gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
81                 };
82                 wps {
83                         label = "wps";
84                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
85                 };
86                 wps2 {
87                         label = "wps2";
88                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
89                 };
90                 wps3 {
91                         label = "wps3";
92                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
93                 };
94                 dsl: dsl {
95                         label = "dsl";
96                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
97                 };
98                 lan {
99                         label = "lan";
100                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
101                 };
102                 tv {
103                         label = "tv";
104                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
105                 };
106                 upgrade {
107                         label = "upgrade";
108                         gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
109                 };
110         };
111
112         /* is there another way to "reserve" the GPIO? */
113         gpio_export {
114                 compatible = "gpio-export";
115                 #size-cells = <0>;
116
117                 switch {
118                         gpio-export,name = "switch";
119                         gpio-export,output = <1>;
120                         gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
121                 };
122         };
123 };
124
125 &gpio {
126         pinctrl-names = "default";
127         pinctrl-0 = <&state_default>;
128
129         state_default: pinmux {
130                 ebu {
131                         lantiq,groups = "ebu cs1";
132                         lantiq,function = "ebu";
133                 };
134                 pci_in {
135                         lantiq,groups = "req1";
136                         lantiq,function = "pci";
137                         lantiq,open-drain = <1>;
138                         lantiq,pull = <2>;
139                         lantiq,output = <0>;
140                 };
141                 pci_out {
142                         lantiq,groups = "gnt1";
143                         lantiq,function = "pci";
144                         lantiq,pull = <0>;
145                         lantiq,output = <1>;
146                 };
147                 pci_rst {
148                         lantiq,pins = "io21";
149                         lantiq,pull = <2>;
150                         lantiq,output = <1>;
151                 };
152                 switch_rst {
153                         lantiq,pins = "io19";
154                         lantiq,pull = <2>;
155                         lantiq,output = <1>;
156                 };
157         };
158 };
159
160 &gsw {
161         phy-mode = "mii";
162         mtd-mac-address = <&boardconfig 0x16>;
163 };
164
165 &localbus {
166         nor@0 {
167                 compatible = "lantiq,nor";
168                 bank-width = <2>;
169                 reg = <0 0x0 0x2000000>;
170
171                 partitions {
172                         compatible = "fixed-partitions";
173                         #address-cells = <1>;
174                         #size-cells = <1>;
175
176                         partition@0 {
177                                 label = "uboot";
178                                 reg = <0x00000 0x40000>;
179                                 read-only;
180                         };
181
182                         partition@40000 {
183                                 label = "uboot_env";
184                                 reg = <0x40000 0x20000>;
185                         };
186
187                         partition@60000 {
188                                 label = "firmware";
189                                 reg = <0x60000 0xf80000>;
190                         };
191
192                         boardconfig: partition@fe0000 {
193                                 label = "board_config";
194                                 reg = <0xfe0000 0x20000>;
195                                 read-only;
196                         };
197                 };
198         };
199 };
200
201 &pci0 {
202         status = "okay";
203         lantiq,external-clock;
204         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
205         req-mask = <0xf>;
206
207         wifi@0,0 {
208                 compatible = "pci0,0";
209                 reg = <0x7000 0 0 0 0>;
210                 ralink,mtd-eeprom = <&boardconfig 0x410>;
211                 ralink,mtd-eeprom-swap;
212         };
213 };
214
215 &usb_phy {
216         status = "okay";
217 };
218
219 /* warning: passive port only works with active devices */
220 &usb {
221         status = "okay";
222 };
223
224 &vmmc {
225         status = "okay";
226 };