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