lantiq: add support for upgrade led
[openwrt/staging/mkresin.git] / target / linux / lantiq / files-4.14 / arch / mips / boot / dts / DGN3500.dtsi
1 #include "ar9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 chosen {
7 bootargs = "root= console=ttyLTQ0,115200";
8 };
9
10 aliases {
11 led-boot = &power_green;
12 led-failsafe = &power_red;
13 led-running = &power_green;
14 led-upgrade = &power_green;
15
16 led-dsl = &dsl;
17 led-internet = &internet;
18 led-usb = &led_usb;
19 led-wifi = &wifi_green;
20 };
21
22 memory@0 {
23 reg = <0x0 0x4000000>;
24 };
25
26 rtl8366rb {
27 compatible = "realtek,rtl8366rb";
28 gpio-sda = <&gpio 35 GPIO_ACTIVE_HIGH>;
29 gpio-sck = <&gpio 37 GPIO_ACTIVE_HIGH>;
30
31 realtek,initvals = <
32 0x0000 0x0830
33 0x0400 0x8130
34 0x000A 0x83ED
35 0x0F51 0x0017
36 0x02F5 0x0048
37 0x02FA 0xFFDF
38 0x02FB 0xFFE0
39 0x0450 0x0000
40 0x0401 0x0000
41 0x0431 0x0960
42 >;
43 };
44
45 gpio-keys-polled {
46 compatible = "gpio-keys-polled";
47 #address-cells = <1>;
48 #size-cells = <0>;
49 poll-interval = <100>;
50
51 rfkill {
52 label = "rfkill";
53 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RFKILL>;
55 };
56 wps {
57 label = "wps";
58 gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61 reset {
62 label = "reset";
63 gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_RESTART>;
65 };
66 };
67
68 gpio-leds {
69 compatible = "gpio-leds";
70 internet: internet {
71 label = "dgn3500:green:internet";
72 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
73 };
74 internet2 {
75 label = "dgn3500:red:internet";
76 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
77 };
78 dsl: dsl {
79 label = "dgn3500:green:dsl";
80 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
81 };
82 led_usb: usb {
83 label = "dgn3500:green:usb";
84 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
85 };
86 power_green: power {
87 label = "dgn3500:green:power";
88 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
89 default-state = "keep";
90 };
91 power_red: power2 {
92 label = "dgn3500:red:power";
93 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
94 };
95 wifi_green: wifi {
96 label = "dgn3500:green:wireless";
97 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
98 };
99 wifi2 {
100 label = "dgn3500:amber:wireless";
101 gpios = <&gpio 51 GPIO_ACTIVE_LOW>;
102 };
103 wps {
104 label = "dgn3500:green:wps";
105 gpios = <&gpio 52 GPIO_ACTIVE_LOW>;
106 };
107 };
108 };
109
110 &gpio {
111 pinctrl-names = "default";
112 pinctrl-0 = <&state_default>;
113
114 state_default: pinmux {
115 exin {
116 lantiq,groups = "exin1";
117 lantiq,function = "exin";
118 };
119 pci {
120 lantiq,groups = "gnt1", "req1";
121 lantiq,function = "pci";
122 };
123 pci-in {
124 lantiq,groups = "req1";
125 lantiq,output = <0>;
126 lantiq,open-drain = <1>;
127 lantiq,pull = <2>;
128 };
129 pci-out {
130 lantiq,groups = "gnt1";
131 lantiq,output = <1>;
132 lantiq,pull = <0>;
133 };
134 };
135 pins_spi_default: pins_spi_default {
136 spi_in {
137 lantiq,groups = "spi_di";
138 lantiq,function = "spi";
139 };
140 spi_out {
141 lantiq,groups = "spi_do", "spi_clk",
142 "spi_cs4";
143 lantiq,function = "spi";
144 lantiq,output = <1>;
145 };
146 };
147 };
148
149 &gsw {
150 phy-mode = "mii";
151 };
152
153 &pci0 {
154 status = "okay";
155 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
156
157 wifi@168c,0029 {
158 compatible = "pci168c,0029";
159 reg = <0x7000 0 0 0 0>;
160 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
161 };
162 };
163
164 &spi {
165 status = "okay";
166
167 pinctrl-names = "default";
168 pinctrl-0 = <&pins_spi_default>;
169
170 m25p80@4 {
171 #address-cells = <1>;
172 #size-cells = <1>;
173 compatible = "jedec,spi-nor";
174 reg = <4 0>;
175 spi-max-frequency = <20000000>;
176
177 partitions {
178 compatible = "fixed-partitions";
179 #address-cells = <1>;
180 #size-cells = <1>;
181
182 partition@0 {
183 reg = <0x0 0x10000>;
184 label = "uboot";
185 read-only;
186 };
187
188 partition@10000 {
189 reg = <0x10000 0x10000>;
190 label = "uboot-env";
191 read-only;
192 };
193
194 ath9k_cal: partition@20000 {
195 reg = <0x20000 0x10000>;
196 label = "calibration";
197 read-only;
198 };
199
200 partition@50000 {
201 reg = <0x50000 0xfa0000>;
202 label = "firmware";
203 };
204 };
205 };
206 };
207
208 &usb_phy0 {
209 status = "okay";
210 };
211
212 &usb0 {
213 status = "okay";
214 };