7b0c09f68e030c2acb9845df27dc1a2b1e060092
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar9132_buffalo_wzr-hp-g300nh.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9132.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 / {
8 aliases {
9 led-boot = &led_diag;
10 led-failsafe = &led_security;
11 led-upgrade = &led_diag;
12 };
13
14 clock40mhz: ref {
15 compatible = "fixed-clock";
16 #clock-cells = <0>;
17 clock-frequency = <40000000>;
18 };
19
20 /* There is a GPIO driven NXP 74HC153 dual 4-way multiplexer on board
21 * used for buttons that are on top of the the device.
22 */
23 mux: mux-controller {
24 compatible = "gpio-mux";
25 #mux-control-cells = <0>;
26
27 mux-gpios = <&gpio 9 GPIO_ACTIVE_HIGH>, /* s0 */
28 <&gpio 11 GPIO_ACTIVE_HIGH>; /* s1 */
29 };
30
31 gpio2: key-mux1 {
32 compatible = "gpio-cascade";
33 mux-controls = <&mux>;
34
35 gpio-controller;
36 #gpio-cells = <2>;
37
38 // GPIOs used by this node, the mux pin
39 upstream-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; /* 1y */
40 };
41
42 gpio3: key-mux2 {
43 compatible = "gpio-cascade";
44 mux-controls = <&mux>;
45
46 gpio-controller;
47 #gpio-cells = <2>;
48
49 // GPIOs used by this node, the mux pin
50 upstream-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; /* 2y */
51 };
52
53 keys {
54 compatible = "gpio-keys-polled";
55 poll-interval = <20>;
56
57 aoss {
58 label = "aoss";
59 linux,code = <KEY_WPS_BUTTON>;
60 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
61 debounce-interval = <60>;
62 };
63
64 reset {
65 label = "reset";
66 linux,code = <KEY_RESTART>;
67 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70
71 router_on {
72 label = "router_on";
73 linux,code = <BTN_5>;
74 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
75 debounce-interval = <60>;
76 };
77
78 movie_off {
79 label = "movie_off";
80 linux,code = <BTN_3>;
81 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
82 debounce-interval = <60>;
83 };
84
85 usb {
86 label = "usb";
87 linux,code = <BTN_2>;
88 gpios = <&gpio3 1 GPIO_ACTIVE_LOW>;
89 debounce-interval = <60>;
90 };
91
92 router_auto {
93 label = "router_auto";
94 linux,code = <BTN_6>;
95 gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>;
96 debounce-interval = <60>;
97 };
98
99 movie_on {
100 label = "movie_on";
101 linux,code = <BTN_4>;
102 gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
103 debounce-interval = <60>;
104 };
105 };
106
107 flash@1e000000 {
108 compatible = "cfi-flash";
109 reg = <0x1e000000 0x2000000>;
110 bank-width = <2>;
111 device-width = <2>;
112
113 partitions {
114 compatible = "fixed-partitions";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 partition@0 {
119 label = "u-boot";
120 reg = <0x0000000 0x0040000>;
121 read-only;
122 };
123
124 partition@40000 {
125 label = "u-boot-env";
126 reg = <0x0040000 0x0020000>;
127 read-only;
128 };
129
130 partition@60000 {
131 compatible = "denx,uimage";
132 label = "firmware";
133 reg = <0x0060000 0x1f60000>;
134 };
135
136 partition@1fc0000 {
137 label = "user_property";
138 reg = <0x1fc0000 0x0020000>;
139 read-only;
140 };
141
142 art: partition@1fe0000 {
143 label = "art";
144 reg = <0x1fe0000 0x020000>;
145 read-only;
146 };
147 };
148 };
149
150 leds {
151 compatible = "gpio-leds";
152
153 usb {
154 label = "blue:usb";
155 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
156 trigger-sources = <&hub_port>;
157 linux,default-trigger = "usbport";
158 };
159
160 led_diag: diag {
161 label = "red:diag";
162 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
163 };
164
165 wireless {
166 label = "green:wireless";
167 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
168 linux,default-trigger = "phy0tpt";
169 };
170
171 led_security: security {
172 label = "amber:security";
173 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
174 };
175
176 router {
177 label = "green:router";
178 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
179 };
180 };
181
182 switch: switch {
183 status = "disabled";
184
185 gpio-sda = <&gpio 19 GPIO_ACTIVE_HIGH>;
186 gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>;
187 mii-bus = <&mdio0>;
188
189 mdio-bus {
190 status = "okay";
191
192 #address-cells = <1>;
193 #size-cells = <0>;
194 phy-mask = <0x10>;
195
196 phy4: ethernet-phy@4 {
197 reg = <4>;
198 phy-mode = "rgmii";
199 };
200 };
201 };
202 };
203
204 &mdio0 {
205 status = "okay";
206 };
207
208 &eth0 {
209 status = "disabled";
210
211 phy-mode = "rgmii";
212 nvmem-cells = <&macaddr_art_1120c>;
213 nvmem-cell-names = "mac-address";
214
215 fixed-link {
216 speed = <1000>;
217 full-duplex;
218 };
219 };
220
221 &mdio1 {
222 status = "okay";
223 };
224
225 &eth1 {
226 status = "disabled";
227
228 compatible = "qca,ar9130-eth", "syscon";
229 reg = <0x1a000000 0x200
230 0x18070004 0x4>;
231
232 pll-reg = <0x4 0x18 22>;
233 pll-handle = <&pll>;
234
235 phy-mode = "rgmii";
236 phy-handle = <&phy4>;
237 resets = <&rst 13>;
238 reset-names = "mac";
239 qca,mac-idx = <1>;
240 nvmem-cells = <&macaddr_art_1120c>;
241 nvmem-cell-names = "mac-address";
242 };
243
244 &wmac {
245 status = "okay";
246
247 mtd-cal-data = <&art 0x11000>;
248 };
249
250 &uart {
251 status = "okay";
252 };
253
254 &pll {
255 clocks = <&clock40mhz>;
256 };
257
258 &usb {
259 status = "okay";
260
261 #address-cells = <1>;
262 #size-cells = <0>;
263
264 hub_port: port@1 {
265 reg = <1>;
266 #trigger-source-cells = <0>;
267 };
268 };
269
270 &usb_phy {
271 status = "okay";
272 };
273
274 &art {
275 compatible = "nvmem-cells";
276 #address-cells = <1>;
277 #size-cells = <1>;
278
279 macaddr_art_1120c: macaddr@1120c {
280 reg = <0x1120c 0x6>;
281 };
282 };