26147a2c80807b13da75416dfc0ede45fb44316f
[openwrt/staging/jow.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 reg = <0x520c 0x6>;
163 };
164 };
165 };
166
167 partition@60000 {
168 compatible = "denx,uimage";
169 label = "firmware";
170 reg = <0x0060000 0x1f90000>;
171 };
172
173 partition@1ff0000 {
174 label = "user_property";
175 reg = <0x1ff0000 0x0010000>;
176 read-only;
177 };
178 };
179 };
180 };
181
182 &usb_phy {
183 status = "okay";
184 };
185
186 &usb1 {
187 status = "okay";
188 };
189
190 &usb2 {
191 status = "okay";
192 };
193
194 &pcie0 {
195 status = "okay";
196
197 ath9k0: wifi@0,11 {
198 compatible = "pci168c,0029";
199 reg = <0x8800 0 0 0 0>;
200 qca,no-eeprom;
201 #gpio-cells = <2>;
202 gpio-controller;
203 };
204
205 ath9k1: wifi@0,12 {
206 compatible = "pci168c,0029";
207 reg = <0x9000 0 0 0 0>;
208 qca,no-eeprom;
209 #gpio-cells = <2>;
210 gpio-controller;
211 };
212 };
213
214 &spi {
215 status = "okay";
216
217
218 flash0: flash@0 {
219 compatible = "jedec,spi-nor";
220 reg = <0>;
221 spi-max-frequency = <50000000>;
222 m25p,fast-read;
223 };
224
225 flash1: flash@1 {
226 compatible = "jedec,spi-nor";
227 reg = <1>;
228 spi-max-frequency = <50000000>;
229 m25p,fast-read;
230 };
231 };
232
233 &mdio0 {
234 status = "okay";
235
236 phy4: ethernet-phy@4 {
237 reg = <4>;
238 phy-mode = "rgmii";
239 };
240 };
241
242 &eth0 {
243 status = "okay";
244
245 nvmem-cells = <&macaddr_art_120c>;
246 nvmem-cell-names = "mac-address";
247
248 fixed-link {
249 speed = <1000>;
250 full-duplex;
251 };
252 };
253
254 &eth1 {
255 status = "okay";
256
257 nvmem-cells = <&macaddr_art_520c>;
258 nvmem-cell-names = "mac-address";
259 mac-address-increment = <1>;
260
261 phy-handle = <&phy4>;
262 };