bc467f6b2f61450258325fbc284c6a449e29ce9f
[openwrt/openwrt.git] / target / linux / mpc85xx / files / arch / powerpc / boot / dts / ws-ap3825i.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later or MIT
2
3 /include/ "fsl/p1020si-pre.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Extreme Networks WS-AP3825i";
10 compatible = "extreme-networks,ws-ap3825i";
11
12 aliases {
13 ethernet0 = &enet0;
14 ethernet1 = &enet2;
15 led-boot = &led_power_green;
16 led-failsafe = &led_power_red;
17 led-running = &led_power_green;
18 led-upgrade = &led_power_red;
19 };
20
21 chosen {
22 bootargs-override = "console=ttyS0,115200";
23 };
24
25 memory {
26 device_type = "memory";
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 wifi1 {
33 gpios = <&spi_gpio 3 GPIO_ACTIVE_HIGH>;
34 label = "green:radio1";
35 linux,default-trigger = "phy0tpt";
36 };
37
38 wifi2 {
39 gpios = <&spi_gpio 2 GPIO_ACTIVE_HIGH>;
40 label = "green:radio2";
41 linux,default-trigger = "phy1tpt";
42 };
43
44 led_power_green: power_green {
45 gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>;
46 label = "green:power";
47 };
48
49 led_power_red: power_red {
50 gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>;
51 label = "red:power";
52 };
53
54 lan1_red {
55 gpios = <&spi_gpio 6 GPIO_ACTIVE_HIGH>;
56 label = "red:lan1";
57 };
58
59 lan1_green {
60 gpios = <&spi_gpio 4 GPIO_ACTIVE_HIGH>;
61 label = "green:lan1";
62 };
63
64 lan2_red {
65 gpios = <&spi_gpio 7 GPIO_ACTIVE_HIGH>;
66 label = "red:lan2";
67 };
68
69 lan2_green {
70 gpios = <&spi_gpio 5 GPIO_ACTIVE_HIGH>;
71 label = "green:lan2";
72 };
73 };
74
75 keys {
76 compatible = "gpio-keys";
77
78 reset {
79 label = "Reset button";
80 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83 };
84
85 lbc: localbus@ffe05000 {
86 reg = <0 0xffe05000 0 0x1000>;
87 ranges = <0x0 0x0 0x0 0xec000000 0x4000000>;
88
89 nor@0 {
90 #address-cells = <1>;
91 #size-cells = <1>;
92 compatible = "cfi-flash";
93 reg = <0x0 0x0 0x4000000>;
94 bank-width = <2>;
95 device-width = <1>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 compatible = "denx,fit";
104 reg = <0x0 0x3d60000>;
105 label = "firmware";
106 };
107
108 partition@3d60000 {
109 reg = <0x3d60000 0x20000>;
110 label = "calib";
111 read-only;
112 };
113
114 partition@3d80000{
115 reg = <0x3d80000 0x80000>;
116 label = "u-boot";
117 read-only;
118 };
119
120 partition@3e00000{
121 reg = <0x3e00000 0x100000>;
122 label = "nvram";
123 read-only;
124 };
125
126 partition@3f00000 {
127 reg = <0x3f00000 0x20000>;
128 label = "cfg2";
129 };
130
131 partition@3f20000 {
132 reg = <0x3f20000 0x20000>;
133 label = "cfg1";
134 };
135 };
136 };
137 };
138
139 soc: soc@ffe00000 {
140 ranges = <0x0 0x0 0xffe00000 0x100000>;
141
142 gpio0: gpio-controller@fc00 {
143 };
144
145 mdio@24000 {
146 phy0: ethernet-phy@0 {
147 interrupts = <3 1 0 0>;
148 reg = <0x5>;
149 reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
150 reset-assert-us = <10000>;
151 reset-deassert-us = <10000>;
152 };
153
154 phy2: ethernet-phy@2 {
155 interrupts = <1 1 0 0>;
156 reg = <0x6>;
157 reset-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
158 reset-assert-us = <10000>;
159 reset-deassert-us = <10000>;
160 };
161 };
162
163 mdio@25000 {
164 status = "disabled";
165 };
166
167 mdio@26000 {
168 status = "disabled";
169 };
170
171 enet0: ethernet@b0000 {
172 status = "okay";
173 phy-handle = <&phy0>;
174 phy-connection-type = "rgmii-id";
175 };
176
177 enet1: ethernet@b1000 {
178 status = "disabled";
179 };
180
181 enet2: ethernet@b2000 {
182 status = "okay";
183 phy-handle = <&phy2>;
184 phy-connection-type = "rgmii-id";
185 };
186
187 usb@22000 {
188 phy_type = "ulpi";
189 dr_mode = "host";
190 };
191
192 usb@23000 {
193 status = "disabled";
194 };
195 };
196
197 pci0: pcie@ffe09000 {
198 ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
199 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
200 reg = <0 0xffe09000 0 0x1000>;
201 pcie@0 {
202 ranges = <0x2000000 0x0 0xa0000000
203 0x2000000 0x0 0xa0000000
204 0x0 0x20000000
205
206 0x1000000 0x0 0x0
207 0x1000000 0x0 0x0
208 0x0 0x100000>;
209 };
210 };
211
212 pci1: pcie@ffe0a000 {
213 reg = <0 0xffe0a000 0 0x1000>;
214 ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
215 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
216 pcie@0 {
217 ranges = <0x2000000 0x0 0x80000000
218 0x2000000 0x0 0x80000000
219 0x0 0x20000000
220
221 0x1000000 0x0 0x0
222 0x1000000 0x0 0x0
223 0x0 0x100000>;
224 };
225 };
226 };
227
228 &soc {
229 led_spi {
230 /*
231 * This is currently non-functioning because the spi-gpio
232 * driver refuses to register when presented with this node.
233 */
234 compatible = "spi-gpio";
235 #address-cells = <1>;
236 #size-cells = <0>;
237
238 sck-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
239 mosi-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
240 num-chipselects = <0>;
241
242 spi_gpio: led_gpio@0 {
243 compatible = "fairchild,74hc595";
244 reg = <0>;
245 gpio-controller;
246 #gpio-cells = <2>;
247 registers-number = <1>;
248 spi-max-frequency = <100000>;
249 };
250 };
251 };
252
253 /include/ "fsl/p1020si-post.dtsi"
254
255 / {
256 cpus {
257 PowerPC,P1010@0 {
258 bus-frequency = <399999996>;
259 timebase-frequency = <50000000>;
260 clock-frequency = <799999992>;
261 d-cache-block-size = <0x20>;
262 d-cache-size = <0x8000>;
263 d-cache-sets = <0x80>;
264 i-cache-block-size = <0x20>;
265 i-cache-size = <0x8000>;
266 i-cache-sets = <0x80>;
267 };
268
269 PowerPC,P1010@1 {
270 bus-frequency = <399999996>;
271 timebase-frequency = <50000000>;
272 clock-frequency = <799999992>;
273 d-cache-block-size = <0x20>;
274 d-cache-size = <0x8000>;
275 d-cache-sets = <0x80>;
276 i-cache-block-size = <0x20>;
277 i-cache-size = <0x8000>;
278 i-cache-sets = <0x80>;
279 };
280 };
281
282 memory {
283 reg = <0x0 0x0 0x0 0x10000000>;
284 };
285
286 soc@ffe00000 {
287 bus-frequency = <399999996>;
288
289 serial@4600 {
290 clock-frequency = <399999996>;
291 };
292
293 serial@4500 {
294 clock-frequency = <399999996>;
295 };
296
297 pic@40000 {
298 clock-frequency = <399999996>;
299 };
300 };
301 };
302
303 /*
304 * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses
305 * aliases to determine PCI domain numbers, drop aliases so as not to
306 * change the sysfs path of our wireless netdevs.
307 */
308
309 / {
310 aliases {
311 /delete-property/ pci0;
312 /delete-property/ pci1;
313 };
314 };