lantiq: add support for upgrade led
[oweals/openwrt.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / ARV7510PW22.dts
1 /dts-v1/;
2
3 #include "danube.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "arcadyan,arv7510pw22", "lantiq,xway", "lantiq,danube";
9         model = "Astoria Networks ARV7510PW22";
10
11         chosen {
12                 bootargs = "console=ttyLTQ0,115200";
13         };
14
15         aliases {
16                 led-boot = &power;
17                 led-failsafe = &power;
18                 led-running = &power;
19                 led-upgrade = &power;
20
21                 led-dsl = &internet;
22                 led-usb = &umts;
23                 led-wifi = &wlan;
24         };
25
26         memory@0 {
27                 reg = <0x0 0x4000000>;
28         };
29
30         gpio-keys-polled {
31                 compatible = "gpio-keys-polled";
32                 #address-cells = <1>;
33                 #size-cells = <0>;
34                 poll-interval = <100>;
35
36                 rfkill {
37                         label = "rfkill";
38                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39                         linux,code = <KEY_RFKILL>;
40                 };
41                 restart {
42                         label = "restart";
43                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_POWER>;
45                 };
46                 reset {
47                         label = "reset";
48                         gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
49                         linux,code = <KEY_RESTART>;
50                 };
51         };
52
53         gpio-leds {
54                 compatible = "gpio-leds";
55                 power: power {
56                         label = "power";
57                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
58                         default-state = "keep";
59                 };
60                 internet: internet {
61                         label = "internet";
62                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
63                 };
64                 wlan: wlan {
65                         label = "wlan";
66                         gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
67                 };
68                 umts: 3g {
69                         label = "3g";
70                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
71                 };
72                 message {
73                         label = "message";
74                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
75                 };
76         };
77 };
78
79 &gpio {
80         pinctrl-names = "default";
81         pinctrl-0 = <&state_default>;
82
83         state_default: pinmux {
84                 exin {
85                         lantiq,groups = "exin1";
86                         lantiq,function = "exin";
87                         lantiq,pull = <2>;
88                         lantiq,output = <0>;
89                 };
90                 pci_in {
91                         lantiq,groups = "req1", "req2";
92                         lantiq,function = "pci";
93                         lantiq,open-drain = <1>;
94                         lantiq,pull = <2>;
95                         lantiq,output = <0>;
96                 };
97                 pci_out {
98                         lantiq,groups = "gnt1";
99                         lantiq,function = "pci";
100                         lantiq,output = <1>;
101                 };
102                 pci_rst {
103                         lantiq,pins = "io21";
104                         lantiq,pull = <2>;
105                         lantiq,output = <1>;
106                 };
107                 pins_out {
108                         lantiq,pins = "io2", "io4", "io8", "io9", "io10", "io15", "io20";
109                         lantiq,output = <1>;
110                 };
111                 pins_in {
112                         lantiq,pins = "io11", "io12", "io28";
113                         lantiq,open-drain = <1>;
114                         lantiq,pull = <2>;
115                         lantiq,output = <0>;
116                 };
117         };
118
119         usb_vbus: regulator-usb-vbus {
120                 compatible = "regulator-fixed";
121
122                 regulator-name = "USB_VBUS";
123
124                 regulator-min-microvolt = <5000000>;
125                 regulator-max-microvolt = <5000000>;
126
127                 gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
128                 enable-active-high;
129         };
130 };
131
132 &gsw {
133         /* Switch reset 19 */
134         phy-mode = "mii";
135         mtd-mac-address = <&boardconfig 0x16>;
136 };
137
138 &localbus {
139         nor@0 {
140                 compatible = "lantiq,nor";
141                 bank-width = <2>;
142                 reg = <0 0x0 0x1000000>;
143                 #address-cells = <1>;
144                 #size-cells = <1>;
145
146                 partitions {
147                         compatible = "fixed-partitions";
148                         #address-cells = <1>;
149                         #size-cells = <1>;
150
151                         partition@0 {
152                                 label = "uboot";
153                                 reg = <0x00000 0x40000>;
154                                 read-only;
155                         };
156
157                         partition@40000 {
158                                 label = "uboot_env";
159                                 reg = <0x40000 0x20000>;
160                                 read-only;
161                         };
162
163                         partition@60000 {
164                                 label = "firmware";
165                                 reg = <0x60000 0xf80000>;
166                         };
167
168                         boardconfig: partition@fe0000 {
169                                 label = "board_config";
170                                 reg = <0xfe0000 0x20000>;
171                                 read-only;
172                         };
173                 };
174         };
175 };
176
177 &pci0 {
178         status = "okay";
179         lantiq,external-clock;
180         interrupt-map = <
181                 0x7000 0 0 1 &icu0 30
182                 0x7800 0 0 1 &icu0 135
183                 0x7800 0 0 2 &icu0 135
184                 0x7800 0 0 3 &icu0 135
185         >;
186         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
187         req-mask = <0x3>;
188
189         wifi@1814,3592 {
190                 compatible = "pci1814,3592";
191                 reg = <0x7000 0 0 0 0>;
192                 ralink,mtd-eeprom = <&boardconfig 0x410>;
193                 ralink,mtd-eeprom-swap;
194         };
195 };
196
197 &usb_phy {
198         status = "okay";
199 };
200
201 &usb {
202         status = "okay";
203         vbus-supply = <&usb_vbus>;
204 };
205
206 &vmmc {
207         status = "okay";
208         gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
209 };