35e083bc6178d75cc0dc74f4a548efb3bbbde645
[openwrt/staging/dedeckeh.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 "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
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 = "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 = "amber:band2g";
36 gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>;
37 };
38
39 usb {
40 label = "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 = "green:band2g";
48 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy0tpt";
50 };
51
52 band5g_g {
53 label = "green:band5g";
54 gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>;
55 linux,default-trigger = "phy1tpt";
56 };
57
58 router {
59 label = "green:router";
60 gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>;
61 };
62
63 movie_engine {
64 label = "blue:movie_engine";
65 gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>;
66 };
67
68 band5g_a {
69 label = "amber:band5g";
70 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
71 };
72 };
73
74 keys {
75 compatible = "gpio-keys";
76
77 reset {
78 label = "reset";
79 linux,code = <KEY_RESTART>;
80 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
81 debounce-interval = <60>;
82 };
83
84 usb {
85 label = "usb";
86 linux,code = <BTN_2>;
87 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
88 debounce-interval = <60>;
89 };
90
91 aoss {
92 label = "aoss";
93 linux,code = <KEY_WPS_BUTTON>;
94 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
95 debounce-interval = <60>;
96 };
97
98 router_auto {
99 label = "router_auto";
100 linux,code = <BTN_6>;
101 linux,input-type = <EV_SW>;
102 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
103 debounce-interval = <60>;
104 };
105
106 router_off {
107 label = "router_off";
108 linux,code = <BTN_5>;
109 linux,input-type = <EV_SW>;
110 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
111 debounce-interval = <60>;
112 };
113
114 movie_engine {
115 label = "movie_engine";
116 linux,code = <BTN_7>;
117 linux,input-type = <EV_SW>;
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_ohci_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_ehci_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 &pll {
222 clocks = <&extosc>;
223 };
224
225 &spi {
226 status = "okay";
227
228
229 flash0: flash@0 {
230 compatible = "jedec,spi-nor";
231 reg = <0>;
232 spi-max-frequency = <50000000>;
233 m25p,fast-read;
234 };
235
236 flash1: flash@1 {
237 compatible = "jedec,spi-nor";
238 reg = <1>;
239 spi-max-frequency = <50000000>;
240 m25p,fast-read;
241 };
242 };
243
244 &mdio0 {
245 status = "okay";
246
247 phy4: ethernet-phy@4 {
248 reg = <4>;
249 phy-mode = "rgmii";
250 };
251 };
252
253 &eth0 {
254 status = "okay";
255
256 nvmem-cells = <&macaddr_art_120c>;
257 nvmem-cell-names = "mac-address";
258
259 fixed-link {
260 speed = <1000>;
261 full-duplex;
262 };
263 };
264
265 &eth1 {
266 status = "okay";
267
268 nvmem-cells = <&macaddr_art_520c>;
269 nvmem-cell-names = "mac-address";
270 mac-address-increment = <1>;
271
272 phy-handle = <&phy4>;
273 };
274
275 &art {
276 compatible = "nvmem-cells";
277 #address-cells = <1>;
278 #size-cells = <1>;
279
280 macaddr_art_120c: macaddr@120c {
281 reg = <0x120c 0x6>;
282 };
283
284 macaddr_art_520c: macaddr@520c {
285 reg = <0x520c 0x6>;
286 };
287 };