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