kernel: Add missing config option
[openwrt/openwrt.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: 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 wlan2g_green {
61 label = "netgear:green:wlan2g";
62 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "phy0tpt";
64 };
65
66 wlan5g_blue {
67 label = "netgear:blue:wlan5g";
68 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
69 linux,default-trigger = "phy1tpt";
70 };
71
72 wps_green {
73 label = "netgear:green:wps";
74 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
75 };
76
77 wps_amber {
78 label = "netgear:amber:wps";
79 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
80 };
81 };
82
83 ubi-concat {
84 compatible = "mtd-concat";
85 devices = <&ubipart0 &ubipart1>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 ubi@ac0000 {
93 label = "ubi";
94 reg = <0x0 0x7500000>;
95 };
96 };
97 };
98 };
99
100 &pinmux {
101 enable_gpio_11: pinmux_enable_gpio_11 {
102 pinctrl-single,bits = <0x8 0x0 0xff000000>;
103 };
104 };
105
106 &nand {
107 status = "okay";
108
109 partitions {
110 compatible = "fixed-partitions";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 partition@0 {
115 label = "u-boot";
116 reg = <0x0 0x40000>;
117 read-only;
118 };
119
120 partition@40000 {
121 label = "u-boot-env";
122 reg = <0x40000 0x40000>;
123 };
124
125 caldata: partition@80000 {
126 label = "caldata";
127 reg = <0x80000 0x40000>;
128 read-only;
129 };
130
131 partition@c0000 {
132 label = "pot";
133 reg = <0xc0000 0x80000>;
134 };
135
136 partition@140000 {
137 label = "language";
138 reg = <0x140000 0x200000>;
139 };
140
141 partition@340000 {
142 label = "config";
143 reg = <0x340000 0x80000>;
144 };
145
146 partition@3c0000 {
147 label = "traffic_meter";
148 reg = <0x3c0000 0x300000>;
149 };
150
151 kernel@6c0000 {
152 label = "kernel";
153 reg = <0x6c0000 0x400000>;
154 };
155
156 ubipart0: partition@ac0000 {
157 label = "ubipart0";
158 reg = <0xac0000 0x1500000>;
159 };
160
161 partition@6c0000 {
162 label = "firmware";
163 reg = <0x6c0000 0x1900000>;
164 compatible = "netgear,uimage";
165 };
166
167 partition@1fc0000 {
168 label = "caldata_backup";
169 reg = <0x1fc0000 0x40000>;
170 read-only;
171 };
172
173 ubipart1: partition@2000000 {
174 label = "ubipart1";
175 reg = <0x2000000 0x6000000>;
176 };
177 };
178 };
179
180 &ref {
181 clock-frequency = <40000000>;
182 };
183
184 &builtin_switch {
185 resets = <&rst 8>, <&rst 12>;
186 reset-names = "switch", "switch-analog";
187 };
188
189 &mdio0 {
190 status = "okay";
191
192 phy-mask = <0>;
193
194 phy0: ethernet-phy@0 {
195 reg = <0>;
196 phy-mode = "rgmii";
197 qca,mib-poll-interval = <500>;
198
199 qca,ar8327-initvals = <
200 0x04 0x07600000
201 0x0c 0x01000000
202 0x10 0xc1000000
203 0x50 0xcc35cc35
204 0x54 0xcb37cb37
205 0x58 0x00000000
206 0x5c 0x00f3cf00
207 0x7c 0x0000007e
208 0x94 0x0000007e
209 >;
210 };
211 };
212
213 &eth0 {
214 status = "okay";
215
216 /* default for ar934x, except for 1000M */
217 pll-data = <0x06000000 0x00000101 0x00001616>;
218
219 mtd-mac-address = <&caldata 0x0>;
220
221 phy-mode = "rgmii";
222 phy-handle = <&phy0>;
223 };
224
225 &gpio {
226 lna0 {
227 gpio-hog;
228 line-name = "netgear:ext:lna0";
229 gpios = <18 GPIO_ACTIVE_HIGH>;
230 output-high;
231 };
232
233 lna1 {
234 gpio-hog;
235 line-name = "netgear:ext:lna1";
236 gpios = <19 GPIO_ACTIVE_HIGH>;
237 output-high;
238 };
239 };
240
241 &wmac {
242 status = "okay";
243
244 mtd-mac-address = <&caldata 0x0>;
245 qca,no-eeprom;
246 };
247
248 &pcie {
249 status = "okay";
250
251 ath9k: wifi@0,0 {
252 compatible = "pci168c,0033";
253 reg = <0x0000 0 0 0 0>;
254 mtd-mac-address = <&caldata 0xc>;
255 qca,no-eeprom;
256 #gpio-cells = <2>;
257 gpio-controller;
258 };
259 };
260
261 &uart {
262 status = "okay";
263 };