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