tools/patchelf: update to 0.18.0
[openwrt/staging/dedeckeh.git] / target / linux / mpc85xx / files / arch / powerpc / boot / dts / hiveap-330.dts
1 /*
2 * Aerohive HiveAP-330 Device Tree Source
3 *
4 * Copyright (C) 2017 Chris Blake <chrisrblake93@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12 #include <dt-bindings/leds/common.h>
13 #include <dt-bindings/input/input.h>
14 #include <dt-bindings/gpio/gpio.h>
15
16 /include/ "fsl/p1020si-pre.dtsi"
17 / {
18 model = "Aerohive HiveAP-330";
19 compatible = "aerohive,hiveap-330";
20
21 aliases {
22 led-boot = &led_power_green;
23 led-failsafe = &led_fault_red;
24 led-running = &led_power_green;
25 led-upgrade = &led_fault_red;
26 label-mac-device = &enet0;
27 spi0 = &spi0;
28 };
29
30 memory {
31 device_type = "memory";
32 };
33
34 board_lbc: lbc: localbus@ffe05000 {
35 reg = <0 0xffe05000 0 0x1000>;
36 ranges = <0x0 0x0 0x0 0xec000000 0x4000000>;
37
38 nor@0,0 {
39 #address-cells = <1>;
40 #size-cells = <1>;
41 compatible = "cfi-flash";
42 reg = <0x0 0x0 0x4000000>;
43 bank-width = <2>;
44 device-width = <1>;
45
46 partitions {
47 compatible = "fixed-partitions";
48 #address-cells = <1>;
49 #size-cells = <1>;
50
51 firmware@0 {
52 reg = <0x0 0x3f00000>;
53 label = "firmware";
54 /*
55 * This unknown/invalid compatible prevents
56 * openwrt's mtdsplit_fit to go off a tangent if it
57 * finds a magic value inside the uncompressed kernel
58 * at a blocksized aligned place.
59 */
60 compatible = "areohive,hiveap-330-image";
61 };
62
63 partition@0 {
64 reg = <0x0 0x40000>;
65 label = "dtb";
66 };
67
68 partition@40000 {
69 compatible = "openwrt,uimage", "denx,uimage";
70 reg = <0x40000 0x3ec0000>;
71 label = "kernel";
72 };
73
74 partition@3f00000 {
75 reg = <0x3f00000 0x20000>;
76 label = "hw-info";
77 read-only;
78
79 compatible = "nvmem-cells";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 macaddr_hwinfo_0: macaddr@0 {
84 reg = <0x0 0x6>;
85 };
86 };
87
88 partition@3f20000 {
89 reg = <0x3f20000 0x20000>;
90 label = "boot-info";
91 read-only;
92 };
93
94 partition@3f40000 {
95 reg = <0x3f40000 0x20000>;
96 label = "boot-info-backup";
97 read-only;
98 };
99
100 partition@3f60000 {
101 reg = <0x3f60000 0x20000>;
102 label = "u-boot-env";
103 };
104
105 partition@3f80000 {
106 reg = <0x3f80000 0x80000>;
107 label = "u-boot";
108 read-only;
109 };
110 };
111 };
112 };
113
114 board_soc: soc: soc@ffe00000 {
115 ranges = <0x0 0x0 0xffe00000 0x100000>;
116
117 spi0: spi@7000 {
118 temperature-sensor@1 {
119 compatible = "ti,tmp125";
120 reg = <1>;
121 spi-max-frequency = <5000000>;
122 };
123 };
124
125 i2c@3100 {
126 tpm@29 {
127 compatible = "atmel,at97sc3204t";
128 reg = <0x29>;
129 };
130
131 lp5521@32 {
132 compatible = "national,lp5521";
133 reg = <0x32>;
134 clock-mode = /bits/ 8 <2>;
135 #if 1
136 led_fault_red: led@0 {
137 reg = <0>;
138 chan-name = "fault:red";
139 led-cur = /bits/ 8 <0x2f>;
140 max-cur = /bits/ 8 <0x5f>;
141 color = <LED_COLOR_ID_RED>;
142 function = LED_FUNCTION_FAULT;
143 };
144 led_power_green: led@1 {
145 reg = <1>;
146 chan-name = "power:green";
147 led-cur = /bits/ 8 <0x2f>;
148 max-cur = /bits/ 8 <0x5f>;
149 color = <LED_COLOR_ID_GREEN>;
150 function = LED_FUNCTION_POWER;
151 };
152 led@2{
153 reg = <2>;
154 chan-name = "blue";
155 led-cur = /bits/ 8 <0x2f>;
156 max-cur = /bits/ 8 <0x5f>;
157 color = <LED_COLOR_ID_BLUE>;
158 };
159 #else
160 /*
161 * openwrt isn't ready to handle multi-intensity leds yet
162 * # echo 255 255 255 > /sys/class/leds/tricolor/multi_intensity
163 * # echo 255 > /sys/class/leds/tricolor/brightness
164 */
165
166 rgbled-0 {
167 function = LED_FUNCTION_POWER;
168 color = <LED_COLOR_ID_RGB>;
169 #address-cells = <1>;
170 #size-cells = <0>;
171
172 led@0 {
173 reg = <0>;
174 chan-name = "tricolor";
175 led-cur = /bits/ 8 <0x2f>;
176 max-cur = /bits/ 8 <0x5f>;
177 color = <LED_COLOR_ID_RED>;
178 };
179 led@1 {
180 reg = <1>;
181 chan-name = "tricolor";
182 led-cur = /bits/ 8 <0x2f>;
183 max-cur = /bits/ 8 <0x5f>;
184 color = <LED_COLOR_ID_GREEN>;
185 };
186 led@2{
187 reg = <2>;
188 chan-name = "tricolor";
189 led-cur = /bits/ 8 <0x2f>;
190 max-cur = /bits/ 8 <0x5f>;
191 color = <LED_COLOR_ID_BLUE>;
192 };
193 };
194 #endif
195 };
196
197 eeprom@51 {
198 /*
199 * 1Kbit I2C/SMBus EEPROM with SHA-1 Engine
200 * Aerohive calls it "dallas".
201 */
202 compatible = "adi,ds28cn01";
203 reg = <0x51>;
204 read-only;
205 };
206 };
207
208 mdio@24000 {
209 phy0: ethernet-phy@0 {
210 /* interrupts = <3 1 0 0>; */
211 reg = <0x1>;
212 };
213
214 phy1: ethernet-phy@1 {
215 /* interrupts = <2 1 0 0>; */
216 reg = <0x2>;
217 };
218 };
219
220 mdio@25000 {
221 status = "disabled";
222 };
223
224 mdio@26000 {
225 status = "disabled";
226 };
227
228 enet0: ethernet@b0000 {
229 status = "okay";
230 phy-handle = <&phy0>;
231 phy-connection-type = "rgmii-id";
232 nvmem-cells = <&macaddr_hwinfo_0>;
233 nvmem-cell-names = "mac-address";
234 };
235
236 enet1: ethernet@b1000 {
237 status = "disabled";
238 };
239
240 enet2: ethernet@b2000 {
241 status = "okay";
242 phy-handle = <&phy1>;
243 phy-connection-type = "rgmii-id";
244 nvmem-cells = <&macaddr_hwinfo_0>;
245 nvmem-cell-names = "mac-address";
246 mac-address-increment = <1>;
247 };
248
249 gpio0: gpio-controller@fc00 {
250 };
251
252 usb@22000 {
253 phy_type = "ulpi";
254 dr_mode = "host";
255 };
256
257 usb@23000 {
258 status = "disabled";
259 };
260 };
261
262 pci0: pcie@ffe09000 {
263 reg = <0x0 0xffe09000 0x0 0x1000>;
264 ranges = <0x2000000 0x0 0xa0000000 0x0 0xa0000000 0x0 0x20000000
265 0x1000000 0x0 0x00000000 0x0 0xffc30000 0x0 0x10000>;
266 pcie@0 {
267 ranges = <0x2000000 0x0 0xa0000000
268 0x2000000 0x0 0xa0000000
269 0x0 0x20000000
270
271 0x1000000 0x0 0x0
272 0x1000000 0x0 0x0
273 0x0 0x100000>;
274 };
275 };
276
277 pci1: pcie@ffe0a000 {
278 reg = <0x0 0xffe0a000 0x0 0x1000>;
279 ranges = <0x2000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000
280 0x1000000 0x0 0x00000000 0x0 0xffc20000 0x0 0x10000>;
281 pcie@0 {
282 ranges = <0x2000000 0x0 0xc0000000
283 0x2000000 0x0 0xc0000000
284 0x0 0x20000000
285
286 0x1000000 0x0 0x0
287 0x1000000 0x0 0x0
288 0x0 0x100000>;
289 };
290 };
291
292 buttons {
293 compatible = "gpio-keys";
294
295 reset {
296 label = "Reset button";
297 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
298 linux,code = <KEY_RESTART>;
299 };
300 };
301 };
302 /include/ "fsl/p1020si-post.dtsi"
303
304 /*
305 * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses
306 * aliases to determine PCI domain numbers, drop aliases so as not to
307 * change the sysfs path of our wireless netdevs.
308 */
309
310 / {
311 aliases {
312 /delete-property/ pci0;
313 /delete-property/ pci1;
314 };
315 };