ath79: Add wifi to WNDR3700, WNDR3700v2 and WNDR3800
[openwrt/staging/wigyori.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-status = &power_green;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200";
16 };
17
18 extosc: ref {
19 compatible = "fixed-clock";
20 #clock-cells = <0>;
21 clock-output-names = "ref";
22 clock-frequency = <40000000>;
23 };
24
25 reset-leds {
26 compatible = "reset-leds";
27
28 usb_led {
29 label = "netgear:green:usb";
30 resets = <&rst 12>;
31 trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
32 linux,default-trigger = "usbport";
33 };
34 };
35
36 gpio-leds {
37 compatible = "gpio-leds";
38
39 wps {
40 label = "netgear:orange:wps";
41 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
42 default-state = "off";
43 };
44
45 power_green: power_green {
46 label = "netgear:green:power";
47 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
48 default-state = "off";
49 };
50
51 power_orange {
52 label = "netgear:orange:power";
53 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
54 default-state = "off";
55 };
56
57 wps_green {
58 label = "netgear:green:wps";
59 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
60 default-state = "off";
61 };
62
63 wan_green {
64 label = "netgear:green:wan";
65 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
66 default-state = "off";
67 };
68 };
69
70 ath9k-leds {
71 compatible = "gpio-leds";
72 wlan2g {
73 label = "netgear:green:wlan2g";
74 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
75 default-state = "off";
76 linux,default-trigger = "phy0tpt";
77 };
78 wlan5g {
79 label = "netgear:blue:wlan5g";
80 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
81 default-state = "off";
82 linux,default-trigger = "phy1tpt";
83 };
84 };
85
86 gpio-keys-polled {
87 compatible = "gpio-keys-polled";
88 poll-interval = <100>;
89
90 wps {
91 label = "wps";
92 linux,code = <KEY_WPS_BUTTON>;
93 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
94 };
95
96 reset {
97 label = "reset";
98 linux,code = <KEY_RESTART>;
99 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
100 };
101
102 rfkill {
103 label = "rfkill";
104 linux,code = <KEY_RFKILL>;
105 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
106 };
107 };
108
109 rtl8366s {
110 compatible = "realtek,rtl8366s";
111 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
112 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
113
114 mdio-bus {
115 #address-cells = <1>;
116 #size-cells = <0>;
117 status = "okay";
118
119 phy-mask = <0x10>;
120
121 phy4: ethernet-phy@4 {
122 reg = <4>;
123 phy-mode = "rgmii";
124 };
125 };
126 };
127 };
128
129 &usb_phy {
130 status = "okay";
131 };
132
133 &usb1 {
134 #address-cells = <1>;
135 #size-cells = <0>;
136 status = "okay";
137
138 usb_ochi_port: port@1 {
139 reg = <1>;
140 #trigger-source-cells = <0>;
141 };
142 };
143
144 &usb2 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 status = "okay";
148
149 usb_echi_port: port@1 {
150 reg = <1>;
151 #trigger-source-cells = <0>;
152 };
153 };
154
155 &pcie0 {
156 status = "okay";
157
158 ath9k0: wifi@0,11 {
159 compatible = "pci168c,0029";
160 reg = <0x8800 0 0 0 0x10000>;
161 mtd-mac-address = <&art 0x0>;
162 qca,no-eeprom;
163 #gpio-cells = <2>;
164 gpio-controller;
165 };
166
167 ath9k1: wifi@0,12 {
168 compatible = "pci168c,0029";
169 reg = <0x9000 0 0 0 0x10000>;
170 mtd-mac-address = <&art 0xc>;
171 qca,no-eeprom;
172 #gpio-cells = <2>;
173 gpio-controller;
174 };
175 };
176
177 &uart {
178 status = "okay";
179 };
180
181 &spi {
182 status = "okay";
183 num-cs = <1>;
184
185 flash@0 {
186 compatible = "jedec,spi-nor";
187 reg = <0>;
188 spi-max-frequency = <25000000>;
189
190 partitions: partitions {
191 compatible = "fixed-partitions";
192 #address-cells = <1>;
193 #size-cells = <1>;
194 };
195 };
196 };
197
198 &eth0 {
199 status = "okay";
200
201 pll-data = <0x11110000 0x00001099 0x00991099>;
202
203 mtd-mac-address = <&art 0x00>;
204
205 fixed-link {
206 speed = <1000>;
207 full-duplex;
208 };
209 };
210
211 &eth1 {
212 status = "okay";
213
214 pll-data = <0x11110000 0x00001099 0x00991099>;
215
216 mtd-mac-address = <&art 0x06>;
217
218 phy-handle = <&phy4>;
219 };