b1c4d87bcb9a4aaf94e4f54e0b744032945119bc
[openwrt/staging/dedeckeh.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 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_ochi_port>, <&usb_echi_port>;
35 linux,default-trigger = "usbport";
36 };
37 };
38
39 gpio-leds {
40 compatible = "gpio-leds";
41
42 wps {
43 label = "netgear:orange:wps";
44 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
45 };
46
47 power_green: power_green {
48 label = "netgear:green:power";
49 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
50 };
51
52 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 wlan2g {
72 label = "netgear:green:wlan2g";
73 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "phy0tpt";
75 };
76 wlan5g {
77 label = "netgear:blue:wlan5g";
78 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "phy1tpt";
80 };
81 };
82
83 keys {
84 compatible = "gpio-keys-polled";
85 poll-interval = <100>;
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 gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
109 gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
110
111 mdio-bus {
112 #address-cells = <1>;
113 #size-cells = <0>;
114 status = "okay";
115
116 phy-mask = <0x10>;
117
118 phy4: ethernet-phy@4 {
119 reg = <4>;
120 phy-mode = "rgmii";
121 };
122 };
123 };
124 };
125
126 &usb_phy {
127 status = "okay";
128 };
129
130 &usb1 {
131 #address-cells = <1>;
132 #size-cells = <0>;
133 status = "okay";
134
135 usb_ochi_port: port@1 {
136 reg = <1>;
137 #trigger-source-cells = <0>;
138 };
139 };
140
141 &usb2 {
142 #address-cells = <1>;
143 #size-cells = <0>;
144 status = "okay";
145
146 usb_echi_port: port@1 {
147 reg = <1>;
148 #trigger-source-cells = <0>;
149 };
150 };
151
152 &pcie0 {
153 status = "okay";
154
155 ath9k0: wifi@0,11 {
156 compatible = "pci168c,0029";
157 reg = <0x8800 0 0 0 0x10000>;
158 mtd-mac-address = <&art 0x0>;
159 qca,no-eeprom;
160 #gpio-cells = <2>;
161 gpio-controller;
162 };
163
164 ath9k1: wifi@0,12 {
165 compatible = "pci168c,0029";
166 reg = <0x9000 0 0 0 0x10000>;
167 mtd-mac-address = <&art 0xc>;
168 qca,no-eeprom;
169 #gpio-cells = <2>;
170 gpio-controller;
171 };
172 };
173
174 &uart {
175 status = "okay";
176 };
177
178 &spi {
179 status = "okay";
180 num-cs = <1>;
181
182 flash@0 {
183 compatible = "jedec,spi-nor";
184 reg = <0>;
185 spi-max-frequency = <25000000>;
186
187 partitions: partitions {
188 compatible = "fixed-partitions";
189 #address-cells = <1>;
190 #size-cells = <1>;
191 };
192 };
193 };
194
195 &eth0 {
196 status = "okay";
197
198 pll-data = <0x11110000 0x00001099 0x00991099>;
199
200 mtd-mac-address = <&art 0x00>;
201
202 fixed-link {
203 speed = <1000>;
204 full-duplex;
205 };
206 };
207
208 &eth1 {
209 status = "okay";
210
211 pll-data = <0x11110000 0x00001099 0x00991099>;
212
213 mtd-mac-address = <&art 0x06>;
214
215 phy-handle = <&phy4>;
216 };