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