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