b12101a5d12aefca25f78d52787d6b455c4407c6
[openwrt/openwrt.git] / target / linux / lantiq / files / 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 keys {
47 compatible = "gpio-keys-polled";
48 poll-interval = <100>;
49
50 rfkill {
51 label = "rfkill";
52 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RFKILL>;
54 };
55 wps {
56 label = "wps";
57 gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60 reset {
61 label = "reset";
62 gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_RESTART>;
64 };
65 };
66
67 leds {
68 compatible = "gpio-leds";
69 internet: internet {
70 label = "dgn3500:green:internet";
71 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
72 };
73 internet2 {
74 label = "dgn3500:red:internet";
75 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
76 };
77 dsl: dsl {
78 label = "dgn3500:green:dsl";
79 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
80 };
81 led_usb: usb {
82 label = "dgn3500:green:usb";
83 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
84 };
85 power_green: power {
86 label = "dgn3500:green:power";
87 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
88 default-state = "keep";
89 };
90 power_red: power2 {
91 label = "dgn3500:red:power";
92 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
93 };
94 wifi_green: wifi {
95 label = "dgn3500:green:wireless";
96 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
97 };
98 wifi2 {
99 label = "dgn3500:amber:wireless";
100 gpios = <&gpio 51 GPIO_ACTIVE_LOW>;
101 };
102 wps {
103 label = "dgn3500:green:wps";
104 gpios = <&gpio 52 GPIO_ACTIVE_LOW>;
105 };
106 };
107 };
108
109 &gpio {
110 pinctrl-names = "default";
111 pinctrl-0 = <&state_default>;
112
113 state_default: pinmux {
114 exin {
115 lantiq,groups = "exin1";
116 lantiq,function = "exin";
117 };
118 pci {
119 lantiq,groups = "gnt1", "req1";
120 lantiq,function = "pci";
121 };
122 pci-in {
123 lantiq,groups = "req1";
124 lantiq,output = <0>;
125 lantiq,open-drain = <1>;
126 lantiq,pull = <2>;
127 };
128 pci-out {
129 lantiq,groups = "gnt1";
130 lantiq,output = <1>;
131 lantiq,pull = <0>;
132 };
133 };
134 };
135
136 &gsw {
137 phy-mode = "mii";
138 };
139
140 &pci0 {
141 status = "okay";
142 gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
143
144 wifi@168c,0029 {
145 compatible = "pci168c,0029";
146 reg = <0x7000 0 0 0 0>;
147 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
148 };
149 };
150
151 &spi {
152 status = "okay";
153
154 flash@4 {
155 compatible = "jedec,spi-nor";
156 reg = <4>;
157 spi-max-frequency = <20000000>;
158
159 partitions {
160 compatible = "fixed-partitions";
161 #address-cells = <1>;
162 #size-cells = <1>;
163
164 partition@0 {
165 reg = <0x0 0x10000>;
166 label = "uboot";
167 read-only;
168 };
169
170 partition@10000 {
171 reg = <0x10000 0x10000>;
172 label = "uboot-env";
173 read-only;
174 };
175
176 ath9k_cal: partition@20000 {
177 reg = <0x20000 0x10000>;
178 label = "calibration";
179 read-only;
180 };
181
182 partition@50000 {
183 reg = <0x50000 0xfa0000>;
184 label = "firmware";
185 };
186 };
187 };
188 };
189
190 &usb_phy0 {
191 status = "okay";
192 };
193
194 &usb0 {
195 status = "okay";
196 };