ath79: add support for Netgear WNR1000 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_buffalo_wzr-hp-ag300h.dts
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 compatible = "buffalo,wzr-hp-ag300h", "qca,ar7161";
11 model = "Buffalo WZR-HP-AG300H/WZR-600DHP";
12
13 aliases {
14 led-boot = &diag;
15 led-failsafe = &diag;
16 led-upgrade = &diag;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 extosc: ref {
24 compatible = "fixed-clock";
25 #clock-cells = <0>;
26 clock-output-names = "ref";
27 clock-frequency = <40000000>;
28 };
29
30 gpio-leds {
31 compatible = "gpio-leds";
32
33 diag: diag {
34 label = "buffalo:red:diag";
35 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 ath9k-leds {
40 // those leds are indeed attached to the wifi chips
41
42 compatible = "gpio-leds";
43 band2g_a {
44 label = "buffalo:amber:band2g";
45 gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>;
46 };
47
48 usb {
49 label = "buffalo:green:usb";
50 gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
51 trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
52 linux,default-trigger = "usbport";
53 };
54
55 band2g_g {
56 label = "buffalo:green:band2g";
57 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60
61 band5g_g {
62 label = "buffalo:green:band5g";
63 gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy1tpt";
65 };
66
67 router {
68 label = "buffalo:green:router";
69 gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>;
70 };
71
72 movie_engine {
73 label = "buffalo:blue:movie_engine";
74 gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>;
75 };
76
77 band5g_a {
78 label = "buffalo:amber:band5g";
79 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
80 };
81 };
82
83 keys {
84 compatible = "gpio-keys";
85
86 reset {
87 linux,code = <KEY_RESTART>;
88 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
89 debounce-interval = <60>;
90 };
91
92 usb {
93 linux,code = <BTN_2>;
94 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
95 debounce-interval = <60>;
96 };
97
98 aoss {
99 linux,code = <KEY_WPS_BUTTON>;
100 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
101 debounce-interval = <60>;
102 };
103
104 router_auto {
105 linux,code = <BTN_6>;
106 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
107 debounce-interval = <60>;
108 };
109
110 router_off {
111 linux,code = <BTN_5>;
112 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
113 debounce-interval = <60>;
114 };
115
116 movie_engine {
117 linux,code = <BTN_7>;
118 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
119 debounce-interval = <60>;
120 };
121 };
122
123 gpio-export {
124 compatible = "gpio-export";
125
126 gpio_usb_power {
127 gpio-export,name = "buffalo:power:usb";
128 gpio-export,output = <1>;
129 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
130 };
131 };
132
133 flash {
134 compatible = "mtd-concat";
135
136 devices = <&flash0 &flash1>;
137
138 partitions {
139 compatible = "fixed-partitions";
140 #address-cells = <1>;
141 #size-cells = <1>;
142 partition@0 {
143 label = "u-boot";
144 reg = <0x0000000 0x0040000>;
145 read-only;
146 };
147
148 partition@40000 {
149 label = "u-boot-env";
150 reg = <0x0040000 0x0010000>;
151 read-only;
152 };
153
154 art: partition@50000 {
155 label = "art";
156 reg = <0x0050000 0x0010000>;
157 read-only;
158 };
159
160 partition@60000 {
161 compatible = "denx,uimage";
162 label = "firmware";
163 reg = <0x0060000 0x1f90000>;
164 };
165
166 partition@1ff0000 {
167 label = "user_property";
168 reg = <0x1ff0000 0x0010000>;
169 read-only;
170 };
171 };
172 };
173 };
174
175 &usb_phy {
176 status = "okay";
177 };
178
179 &usb1 {
180 #address-cells = <1>;
181 #size-cells = <0>;
182 status = "okay";
183
184 usb_ochi_port: port@1 {
185 reg = <1>;
186 #trigger-source-cells = <0>;
187 };
188 };
189
190 &usb2 {
191 #address-cells = <1>;
192 #size-cells = <0>;
193 status = "okay";
194
195 usb_echi_port: port@1 {
196 reg = <1>;
197 #trigger-source-cells = <0>;
198 };
199 };
200
201 &pcie0 {
202 status = "okay";
203
204 ath9k0: wifi@0,11 {
205 compatible = "pci168c,0029";
206 reg = <0x8800 0 0 0 0>;
207 qca,no-eeprom;
208 #gpio-cells = <2>;
209 gpio-controller;
210 };
211
212 ath9k1: wifi@0,12 {
213 compatible = "pci168c,0029";
214 reg = <0x9000 0 0 0 0>;
215 qca,no-eeprom;
216 #gpio-cells = <2>;
217 gpio-controller;
218 };
219 };
220
221 &uart {
222 status = "okay";
223 };
224
225 &pll {
226 clocks = <&extosc>;
227 };
228
229 &spi {
230 status = "okay";
231 num-cs = <2>;
232 cs-gpios = <0>, <0>;
233
234 flash0: flash@0 {
235 compatible = "jedec,spi-nor";
236 reg = <0>;
237 spi-max-frequency = <104000000>;
238 m25p,fast-read;
239 };
240
241 flash1: flash@1 {
242 compatible = "jedec,spi-nor";
243 reg = <1>;
244 spi-max-frequency = <104000000>;
245 m25p,fast-read;
246 };
247 };
248
249 &mdio0 {
250 status = "okay";
251
252 phy4: ethernet-phy@4 {
253 reg = <4>;
254 phy-mode = "rgmii";
255 };
256 };
257
258 &eth0 {
259 status = "okay";
260
261 mtd-mac-address = <&art 0x120c>;
262
263 fixed-link {
264 speed = <1000>;
265 full-duplex;
266 };
267 };
268
269 &eth1 {
270 status = "okay";
271
272 mtd-mac-address = <&art 0x520c>;
273 mtd-mac-address-increment = <1>;
274
275 phy-handle = <&phy4>;
276 };