ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_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 "qca956x.dtsi"
7
8 / {
9         aliases {
10                 led-boot = &led_power_amber;
11                 led-failsafe = &led_power_amber;
12                 led-running = &led_power_green;
13                 led-upgrade = &led_power_amber;
14                 label-mac-device = &eth0;
15         };
16
17         keys {
18                 compatible = "gpio-keys";
19
20                 wps {
21                         label = "wps";
22                         linux,code = <KEY_WPS_BUTTON>;
23                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
24                 };
25
26                 reset {
27                         label = "reset";
28                         linux,code = <KEY_RESTART>;
29                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
30                 };
31         };
32
33         ath9k-keys {
34                 compatible = "gpio-keys-polled";
35                 poll-interval = <20>;
36
37                 rfkill {
38                         label = "rfkill";
39                         linux,code = <KEY_RFKILL>;
40                         gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
41                         debounce-interval = <60>;
42                 };
43         };
44
45         leds: leds {
46                 compatible = "gpio-leds";
47
48                 pinctrl-names = "default";
49                 pinctrl-0 = <&jtag_disable_pins>;
50
51                 led_power_green: power_green {
52                         label = "netgear:green:power";
53                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
54                 };
55
56                 led_power_amber: power_amber {
57                         label = "netgear:amber:power";
58                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
59                         default-state = "keep";
60                 };
61
62                 wan_green {
63                         label = "netgear:green:wan";
64                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
65                 };
66
67                 wan_amber {
68                         label = "netgear:amber:wan";
69                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
70                 };
71
72                 wlan2g_green {
73                         label = "netgear:green:wlan2g";
74                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
75                         linux,default-trigger = "phy0tpt";
76                 };
77
78                 wps_green {
79                         label = "netgear:green:wps";
80                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
81                 };
82         };
83
84         ath9k-leds {
85                 compatible = "gpio-leds";
86
87                 wlan5g_blue {
88                         label = "netgear:blue:wlan5g";
89                         gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
90                         linux,default-trigger = "phy1tpt";
91                 };
92         };
93 };
94
95 &spi {
96         status = "okay";
97
98         num-cs = <2>;
99
100         flash@0 {
101                 compatible = "jedec,spi-nor";
102                 reg = <0>;
103                 spi-max-frequency = <25000000>;
104
105                 partitions {
106                         compatible = "fixed-partitions";
107                         #address-cells = <1>;
108                         #size-cells = <1>;
109
110                         partition@0 {
111                                 label = "u-boot";
112                                 reg = <0x0 0x40000>;
113                                 read-only;
114                         };
115
116                         partition@40000 {
117                                 label = "u-boot-env";
118                                 reg = <0x40000 0x10000>;
119                         };
120
121                         partition@50000 {
122                                 label = "caldata_backup";
123                                 reg = <0x50000 0x10000>;
124                                 read-only;
125                         };
126
127                         partition@60000 {
128                                 label = "config";
129                                 reg = <0x60000 0x10000>;
130                         };
131
132                         partition@70000 {
133                                 label = "traffic_meter";
134                                 reg = <0x70000 0x10000>;
135                         };
136
137                         partition@80000 {
138                                 label = "pot";
139                                 reg = <0x80000 0x10000>;
140                         };
141
142                         partition@90000 {
143                                 label = "reserved";
144                                 reg = <0x90000 0x160000>;
145                         };
146
147                         caldata: partition@1f0000 {
148                                 label = "caldata";
149                                 reg = <0x1f0000 0x10000>;
150                                 read-only;
151                         };
152                 };
153         };
154
155         flash@1 {
156                 compatible = "spi-nand";
157                 reg = <1>;
158                 spi-max-frequency = <25000000>;
159
160                 partitions {
161                         compatible = "fixed-partitions";
162                         #address-cells = <1>;
163                         #size-cells = <1>;
164
165                         partition@0 {
166                                 label = "kernel";
167                                 reg = <0x0 0x400000>;
168                         };
169
170                         partition@400000 {
171                                 label = "ubi";
172                                 reg = <0x400000 0x7c00000>;
173                         };
174                 };
175         };
176 };
177
178 &mdio0 {
179         status = "okay";
180
181         phy-mask = <0>;
182
183         phy0: ethernet-phy@0 {
184                 reg = <0>;
185                 phy-mode = "sgmii";
186                 qca,mib-poll-interval = <500>;
187
188                 qca,ar8327-initvals = <
189                         0x04 0x00000080 /* PORT0 PAD MODE CTRL */
190                         0x10 0x81000080 /* POWER_ON_STRIP */
191                         0x50 0xcc35cc35 /* LED_CTRL0 */
192                         0x54 0xcb37cb37 /* LED_CTRL1 */
193                         0x58 0x00000000 /* LED_CTRL2 */
194                         0x5c 0x00f3cf00 /* LED_CTRL3 */
195                         0x7c 0x0000007e /* PORT0_STATUS */
196                         0x94 0x00000200 /* PORT6_STATUS */
197                         >;
198         };
199 };
200
201 &eth0 {
202         status = "okay";
203
204         pll-data = <0x03000101 0x00000101 0x00001919>;
205
206         mtd-mac-address = <&caldata 0x0>;
207
208         phy-mode = "sgmii";
209         phy-handle = <&phy0>;
210 };
211
212 &wmac {
213         status = "okay";
214
215         mtd-mac-address = <&caldata 0x0>;
216         qca,no-eeprom;
217 };
218
219 &pcie {
220         status = "okay";
221
222         ath9k: wifi@0,0 {
223                 /* chip is AR9580, override bogus PCI ID 168c:abcd */
224                 compatible = "pci168c,0033";
225                 reg = <0x0000 0 0 0 0>;
226                 mtd-mac-address = <&caldata 0xc>;
227                 qca,no-eeprom;
228                 qca,gpio-mask=<0xf6ff>; /* unmask pin 9 for RFKILL button */
229                 #gpio-cells = <2>;
230                 gpio-controller;
231         };
232 };
233
234 &usb_phy0 {
235         status = "okay";
236 };
237
238 &usb0 {
239         #address-cells = <1>;
240         #size-cells = <0>;
241         status = "okay";
242
243         hub_port0: port@1 {
244                 reg = <1>;
245                 #trigger-source-cells = <0>;
246         };
247 };
248
249 &uart {
250         status = "okay";
251 };