ath79: wpj563: enable 2nd USB controller
[openwrt/openwrt.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 gpio2: gpio-extender {
21 compatible = "nxp,74hc153-gpio";
22 gpio-controller;
23 #gpio-cells = <2>;
24
25 // GPIOs used by this node
26 gpio-s0 = <&gpio 9 GPIO_ACTIVE_HIGH>;
27 gpio-s1 = <&gpio 11 GPIO_ACTIVE_HIGH>;
28 gpio-1y = <&gpio 12 GPIO_ACTIVE_HIGH>;
29 gpio-2y = <&gpio 14 GPIO_ACTIVE_HIGH>;
30 };
31
32 keys {
33 compatible = "gpio-keys-polled";
34 poll-interval = <20>;
35
36 aoss {
37 label = "aoss";
38 linux,code = <KEY_WPS_BUTTON>;
39 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
40 debounce-interval = <60>;
41 };
42
43 reset {
44 label = "reset";
45 linux,code = <KEY_RESTART>;
46 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
47 debounce-interval = <60>;
48 };
49
50 router_on {
51 label = "router_on";
52 linux,code = <BTN_5>;
53 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
54 debounce-interval = <60>;
55 };
56
57 movie_off {
58 label = "movie_off";
59 linux,code = <BTN_3>;
60 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
61 debounce-interval = <60>;
62 };
63
64 usb {
65 label = "usb";
66 linux,code = <BTN_2>;
67 gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
68 debounce-interval = <60>;
69 };
70
71 router_auto {
72 label = "router_auto";
73 linux,code = <BTN_6>;
74 gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
75 debounce-interval = <60>;
76 };
77
78 movie_on {
79 label = "movie_on";
80 linux,code = <BTN_4>;
81 gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
82 debounce-interval = <60>;
83 };
84 };
85
86 flash@1e000000 {
87 compatible = "cfi-flash";
88 reg = <0x1e000000 0x2000000>;
89 bank-width = <2>;
90 device-width = <2>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "u-boot";
99 reg = <0x0000000 0x0040000>;
100 read-only;
101 };
102
103 partition@40000 {
104 label = "u-boot-env";
105 reg = <0x0040000 0x0020000>;
106 read-only;
107 };
108
109 partition@60000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x0060000 0x1f60000>;
113 };
114
115 partition@1fc0000 {
116 label = "user_property";
117 reg = <0x1fc0000 0x0020000>;
118 read-only;
119 };
120
121 art: partition@1fe0000 {
122 label = "art";
123 reg = <0x1fe0000 0x020000>;
124 read-only;
125 };
126 };
127 };
128
129 leds {
130 compatible = "gpio-leds";
131
132 usb {
133 label = "blue:usb";
134 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
135 trigger-sources = <&hub_port>;
136 linux,default-trigger = "usbport";
137 };
138
139 led_diag: diag {
140 label = "red:diag";
141 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
142 };
143
144 wireless {
145 label = "green:wireless";
146 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
147 linux,default-trigger = "phy0tpt";
148 };
149
150 led_security: security {
151 label = "amber:security";
152 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
153 };
154
155 router {
156 label = "green:router";
157 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
158 };
159 };
160
161 switch: switch {
162 status = "disabled";
163
164 gpio-sda = <&gpio 19 GPIO_ACTIVE_HIGH>;
165 gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>;
166 mii-bus = <&mdio0>;
167
168 mdio-bus {
169 status = "okay";
170
171 #address-cells = <1>;
172 #size-cells = <0>;
173 phy-mask = <0x10>;
174
175 phy4: ethernet-phy@4 {
176 reg = <4>;
177 phy-mode = "rgmii";
178 };
179 };
180 };
181 };
182
183 &mdio0 {
184 status = "okay";
185 };
186
187 &eth0 {
188 status = "disabled";
189
190 phy-mode = "rgmii";
191 mtd-mac-address = <&art 0x1120c>;
192
193 fixed-link {
194 speed = <1000>;
195 full-duplex;
196 };
197 };
198
199 &mdio1 {
200 status = "okay";
201 };
202
203 &eth1 {
204 status = "disabled";
205
206 compatible = "qca,ar9130-eth", "syscon";
207 reg = <0x1a000000 0x200
208 0x18070004 0x4>;
209
210 pll-reg = <0x4 0x18 22>;
211 pll-handle = <&pll>;
212
213 phy-mode = "rgmii";
214 phy-handle = <&phy4>;
215 resets = <&rst 13>;
216 reset-names = "mac";
217 qca,mac-idx = <1>;
218 mtd-mac-address = <&art 0x1120c>;
219 };
220
221 &wmac {
222 status = "okay";
223
224 mtd-cal-data = <&art 0x11000>;
225 };
226
227 &uart {
228 status = "okay";
229 };
230
231 &pll {
232 clocks = <&clock40mhz>;
233 };
234
235 &usb {
236 status = "okay";
237
238 #address-cells = <1>;
239 #size-cells = <0>;
240
241 hub_port: port@1 {
242 reg = <1>;
243 #trigger-source-cells = <0>;
244 };
245 };
246
247 &usb_phy {
248 status = "okay";
249 };