ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7161_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 "ar7100.dtsi"
7
8 / {
9         aliases {
10                 led-boot = &led_power_orange;
11                 led-failsafe = &led_power_orange;
12                 led-running = &led_power_green;
13                 led-upgrade = &led_power_orange;
14                 label-mac-device = &eth0;
15         };
16
17         extosc: ref {
18                 compatible = "fixed-clock";
19                 #clock-cells = <0>;
20                 clock-output-names = "ref";
21                 clock-frequency = <40000000>;
22         };
23
24         reset-leds {
25                 compatible = "reset-leds";
26
27                 usb_led {
28                         label = "netgear:green:usb";
29                         resets = <&rst 12>;
30                         trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
31                         linux,default-trigger = "usbport";
32                 };
33         };
34
35         leds {
36                 compatible = "gpio-leds";
37
38                 wps {
39                         label = "netgear:orange:wps";
40                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
41                 };
42
43                 led_power_green: power_green {
44                         label = "netgear:green:power";
45                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
46                 };
47
48                 led_power_orange: power_orange {
49                         label = "netgear:orange:power";
50                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
51                         default-state = "on";
52                 };
53
54                 wps_green {
55                         label = "netgear:green:wps";
56                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57                 };
58
59                 wan_green {
60                         label = "netgear:green:wan";
61                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
62                 };
63         };
64
65         ath9k-leds {
66                 compatible = "gpio-leds";
67
68                 wlan2g {
69                         label = "netgear:green:wlan2g";
70                         gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
71                         linux,default-trigger = "phy0tpt";
72                 };
73                 wlan5g {
74                         label = "netgear:blue:wlan5g";
75                         gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
76                         linux,default-trigger = "phy1tpt";
77                 };
78         };
79
80         keys {
81                 compatible = "gpio-keys";
82
83                 wps {
84                         label = "wps";
85                         linux,code = <KEY_WPS_BUTTON>;
86                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
87                 };
88
89                 reset {
90                         label = "reset";
91                         linux,code = <KEY_RESTART>;
92                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
93                 };
94
95                 rfkill {
96                         label = "rfkill";
97                         linux,code = <KEY_RFKILL>;
98                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
99                 };
100         };
101
102         rtl8366s {
103                 compatible = "realtek,rtl8366s";
104
105                 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
106                 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
107
108                 mdio-bus {
109                         #address-cells = <1>;
110                         #size-cells = <0>;
111                         status = "okay";
112
113                         phy-mask = <0x10>;
114
115                         phy4: ethernet-phy@4 {
116                                 reg = <4>;
117                                 phy-mode = "rgmii";
118                         };
119                 };
120         };
121 };
122
123 &usb_phy {
124         status = "okay";
125 };
126
127 &usb1 {
128         #address-cells = <1>;
129         #size-cells = <0>;
130         status = "okay";
131
132         usb_ohci_port: port@1 {
133                 reg = <1>;
134                 #trigger-source-cells = <0>;
135         };
136 };
137
138 &usb2 {
139         #address-cells = <1>;
140         #size-cells = <0>;
141         status = "okay";
142
143         usb_ehci_port: port@1 {
144                 reg = <1>;
145                 #trigger-source-cells = <0>;
146         };
147 };
148
149 &pcie0 {
150         status = "okay";
151
152         ath9k0: wifi@0,11 {
153                 compatible = "pci168c,0029";
154                 reg = <0x8800 0 0 0 0>;
155                 mtd-mac-address = <&art 0x0>;
156                 qca,no-eeprom;
157                 #gpio-cells = <2>;
158                 gpio-controller;
159
160                 /* all WNDR3700 variants have four antennae dedicated
161                  * to the 2.4GHz radio. Two antennae are available for
162                  * each chain. The following configuration is the
163                  * default setting which taken from the vendor's wifi
164                  * code for that radio.
165                  *
166                  * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
167                  *      [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
168                  */
169                 antenna-demux {
170                         gpio-hog;
171                         line-name = "fixed antenna group 1";
172                         gpios = <6 GPIO_ACTIVE_LOW>,
173                                 <7 GPIO_ACTIVE_HIGH>,
174                                 <8 GPIO_ACTIVE_LOW>,
175                                 <9 GPIO_ACTIVE_HIGH>;
176                         output-high;
177                 };
178         };
179
180         ath9k1: wifi@0,12 {
181                 compatible = "pci168c,0029";
182                 reg = <0x9000 0 0 0 0>;
183                 mtd-mac-address = <&art 0xc>;
184                 qca,no-eeprom;
185                 #gpio-cells = <2>;
186                 gpio-controller;
187         };
188 };
189
190 &uart {
191         status = "okay";
192 };
193
194 &spi {
195         status = "okay";
196
197         num-cs = <1>;
198
199         flash@0 {
200                 compatible = "jedec,spi-nor";
201                 reg = <0>;
202                 spi-max-frequency = <25000000>;
203
204                 partitions: partitions {
205                         compatible = "fixed-partitions";
206                         #address-cells = <1>;
207                         #size-cells = <1>;
208                 };
209         };
210 };
211
212 &eth0 {
213         status = "okay";
214
215         pll-data = <0x11110000 0x00001099 0x00991099>;
216
217         mtd-mac-address = <&art 0x00>;
218
219         fixed-link {
220                 speed = <1000>;
221                 full-duplex;
222         };
223 };
224
225 &eth1 {
226         status = "okay";
227
228         pll-data = <0x11110000 0x00001099 0x00991099>;
229
230         mtd-mac-address = <&art 0x06>;
231
232         phy-handle = <&phy4>;
233 };