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