18b9ae17787966bf64629286fc8a1f8deadf2996
[openwrt/staging/pepe2k.git] / target / linux / ath79 / dts / ar9344_netgear_wndr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar9344.dtsi"
7
8 / {
9 chosen {
10 bootargs = "console=ttyS0,115200n8";
11 };
12
13 aliases {
14 led-boot = &led_power_amber;
15 led-failsafe = &led_power_amber;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_amber;
18 label-mac-device = &eth0;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 wps {
25 label = "wps";
26 linux,code = <KEY_WPS_BUTTON>;
27 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
28 };
29
30 reset {
31 label = "reset";
32 linux,code = <KEY_RESTART>;
33 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
34 };
35
36 rfkill {
37 label = "rfkill";
38 linux,code = <KEY_RFKILL>;
39 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 pinctrl-names = "default";
47 pinctrl-0 = <&enable_gpio_11>;
48
49 led_power_green: power_green {
50 label = "netgear:green:power";
51 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
52 };
53
54 led_power_amber: power_amber {
55 label = "netgear:amber:power";
56 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
57 default-state = "keep";
58 };
59
60 wan_green {
61 label = "netgear:green:wan";
62 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
63 };
64
65 wan_amber {
66 label = "netgear:amber:wan";
67 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
68 };
69
70 wlan2g_green {
71 label = "netgear:green:wlan2g";
72 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
73 linux,default-trigger = "phy0tpt";
74 };
75
76 wlan5g_blue {
77 label = "netgear:blue:wlan5g";
78 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "phy1tpt";
80 };
81
82 wps_green {
83 label = "netgear:green:wps";
84 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
85 };
86
87 wps_amber {
88 label = "netgear:amber:wps";
89 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
90 };
91
92 usb_green {
93 label = "netgear:green:usb";
94 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
95 trigger-sources = <&hub_port>;
96 linux,default-trigger = "usbport";
97 };
98 };
99 };
100
101 &pinmux {
102 enable_gpio_11: pinmux_enable_gpio_11 {
103 pinctrl-single,bits = <0x8 0x0 0xff000000>;
104 };
105 };
106
107 &nand {
108 status = "okay";
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "u-boot";
117 reg = <0x0 0x40000>;
118 read-only;
119 };
120
121 partition@40000 {
122 label = "u-boot-env";
123 reg = <0x40000 0x40000>;
124 };
125
126 art: partition@80000 {
127 label = "caldata";
128 reg = <0x80000 0x40000>;
129 read-only;
130 };
131
132 partition@c0000 {
133 label = "pot";
134 reg = <0xc0000 0x80000>;
135 };
136
137 partition@140000 {
138 label = "language";
139 reg = <0x140000 0x200000>;
140 };
141
142 partition@340000 {
143 label = "config";
144 reg = <0x340000 0x80000>;
145 };
146
147 partition@3c0000 {
148 label = "traffic_meter";
149 reg = <0x3c0000 0x300000>;
150 };
151
152 kernel@6c0000 {
153 label = "kernel";
154 reg = <0x6c0000 0x200000>;
155 };
156
157 ubi@8c0000 {
158 label = "ubi";
159 reg = <0x8c0000 0x1700000>;
160 };
161
162 partition@6c0000 {
163 label = "firmware";
164 reg = <0x6c0000 0x1900000>;
165 compatible = "netgear,uimage";
166 };
167
168 partition@1fc0000 {
169 label = "caldata_backup";
170 reg = <0x1fc0000 0x40000>;
171 read-only;
172 };
173
174 partition@2000000 {
175 label = "reserved";
176 reg = <0x2000000 0x6000000>;
177 read-only;
178 };
179 };
180 };
181
182 &ref {
183 clock-frequency = <40000000>;
184 };
185
186 &builtin_switch {
187 resets = <&rst 8>, <&rst 12>;
188 reset-names = "switch", "switch-analog";
189 };
190
191 &mdio0 {
192 status = "okay";
193
194 phy-mask = <0>;
195
196 phy0: ethernet-phy@0 {
197 reg = <0>;
198 phy-mode = "rgmii";
199 qca,mib-poll-interval = <500>;
200
201 qca,ar8327-initvals = <
202 0x04 0x07600000
203 0x0c 0x01000000
204 0x10 0xc1000000
205 0x50 0xcc35cc35
206 0x54 0xcb37cb37
207 0x58 0x00000000
208 0x5c 0x00f3cf00
209 0x7c 0x0000007e
210 0x94 0x0000007e
211 >;
212 };
213 };
214
215 &eth0 {
216 status = "okay";
217
218 /* default for ar934x, except for 1000M */
219 pll-data = <0x06000000 0x00000101 0x00001616>;
220
221 mtd-mac-address = <&art 0x0>;
222
223 phy-mode = "rgmii";
224 phy-handle = <&phy0>;
225 };
226
227 &gpio {
228 status = "okay";
229
230 lna0 {
231 gpio-hog;
232 line-name = "netgear:ext:lna0";
233 gpios = <18 GPIO_ACTIVE_HIGH>;
234 output-high;
235 };
236
237 lna1 {
238 gpio-hog;
239 line-name = "netgear:ext:lna1";
240 gpios = <19 GPIO_ACTIVE_HIGH>;
241 output-high;
242 };
243 };
244
245 &wmac {
246 status = "okay";
247
248 mtd-mac-address = <&art 0x0>;
249 qca,no-eeprom;
250 };
251
252 &pcie {
253 status = "okay";
254
255 ath9k: wifi@0,0 {
256 compatible = "pci168c,0033";
257 reg = <0x0000 0 0 0 0>;
258 mtd-mac-address = <&art 0xc>;
259 qca,no-eeprom;
260 #gpio-cells = <2>;
261 gpio-controller;
262
263 usb_power {
264 gpio-hog;
265 line-name = "netgear:power:usb";
266 gpios = <0 GPIO_ACTIVE_HIGH>;
267 output-high;
268 };
269 };
270 };
271
272 &usb_phy {
273 status = "okay";
274 };
275
276 &usb {
277 status = "okay";
278 #address-cells = <1>;
279 #size-cells = <0>;
280
281 hub_port: port@1 {
282 reg = <1>;
283 #trigger-source-cells = <0>;
284 };
285 };
286
287 &uart {
288 status = "okay";
289 };