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