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