bb2f2d0827838e7202ea779c8ad1228bfd571b8d
[openwrt/openwrt.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 };
28
29 memory {
30 device_type = "memory";
31 };
32
33 board_lbc: lbc: localbus@ffe05000 {
34 reg = <0 0xffe05000 0 0x1000>;
35 ranges = <0x0 0x0 0x0 0xec000000 0x4000000>;
36
37 nor@0,0 {
38 #address-cells = <1>;
39 #size-cells = <1>;
40 compatible = "cfi-flash";
41 reg = <0x0 0x0 0x4000000>;
42 bank-width = <2>;
43 device-width = <1>;
44
45 partitions {
46 compatible = "fixed-partitions";
47 #address-cells = <1>;
48 #size-cells = <1>;
49
50 firmware@0 {
51 reg = <0x0 0x3f00000>;
52 label = "firmware";
53 /*
54 * This unknown/invalid compatible prevents
55 * openwrt's mtdsplit_fit to go off a tangent if it
56 * finds a magic value inside the uncompressed kernel
57 * at a blocksized aligned place.
58 */
59 compatible = "areohive,hiveap-330-image";
60 };
61
62 partition@0 {
63 reg = <0x0 0x40000>;
64 label = "dtb";
65 };
66
67 partition@40000 {
68 compatible = "openwrt,uimage", "denx,uimage";
69 reg = <0x40000 0x3ec0000>;
70 label = "kernel";
71 };
72
73 partition@3f00000 {
74 reg = <0x3f00000 0x20000>;
75 label = "hw-info";
76 read-only;
77
78 compatible = "nvmem-cells";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 macaddr_hwinfo_0: macaddr@0 {
83 reg = <0x0 0x6>;
84 };
85 };
86
87 partition@3f20000 {
88 reg = <0x3f20000 0x20000>;
89 label = "boot-info";
90 read-only;
91 };
92
93 partition@3f40000 {
94 reg = <0x3f40000 0x20000>;
95 label = "boot-info-backup";
96 read-only;
97 };
98
99 partition@3f60000 {
100 reg = <0x3f60000 0x20000>;
101 label = "u-boot-env";
102 };
103
104 partition@3f80000 {
105 reg = <0x3f80000 0x80000>;
106 label = "u-boot";
107 read-only;
108 };
109 };
110 };
111 };
112
113 board_soc: soc: soc@ffe00000 {
114 ranges = <0x0 0x0 0xffe00000 0x100000>;
115
116 i2c@3100 {
117 tpm@29 {
118 compatible = "atmel,at97sc3204t";
119 reg = <0x29>;
120 };
121
122 lp5521@32 {
123 compatible = "national,lp5521";
124 reg = <0x32>;
125 clock-mode = /bits/ 8 <2>;
126 #if 1
127 led_fault_red: led@0 {
128 reg = <0>;
129 chan-name = "fault:red";
130 led-cur = /bits/ 8 <0x2f>;
131 max-cur = /bits/ 8 <0x5f>;
132 color = <LED_COLOR_ID_RED>;
133 function = LED_FUNCTION_FAULT;
134 };
135 led_power_green: led@1 {
136 reg = <1>;
137 chan-name = "power:green";
138 led-cur = /bits/ 8 <0x2f>;
139 max-cur = /bits/ 8 <0x5f>;
140 color = <LED_COLOR_ID_GREEN>;
141 function = LED_FUNCTION_POWER;
142 };
143 led@2{
144 reg = <2>;
145 chan-name = "blue";
146 led-cur = /bits/ 8 <0x2f>;
147 max-cur = /bits/ 8 <0x5f>;
148 color = <LED_COLOR_ID_BLUE>;
149 };
150 #else
151 /*
152 * openwrt isn't ready to handle multi-intensity leds yet
153 * # echo 255 255 255 > /sys/class/leds/tricolor/multi_intensity
154 * # echo 255 > /sys/class/leds/tricolor/brightness
155 */
156
157 rgbled-0 {
158 function = LED_FUNCTION_POWER;
159 color = <LED_COLOR_ID_RGB>;
160 #address-cells = <1>;
161 #size-cells = <0>;
162
163 led@0 {
164 reg = <0>;
165 chan-name = "tricolor";
166 led-cur = /bits/ 8 <0x2f>;
167 max-cur = /bits/ 8 <0x5f>;
168 color = <LED_COLOR_ID_RED>;
169 };
170 led@1 {
171 reg = <1>;
172 chan-name = "tricolor";
173 led-cur = /bits/ 8 <0x2f>;
174 max-cur = /bits/ 8 <0x5f>;
175 color = <LED_COLOR_ID_GREEN>;
176 };
177 led@2{
178 reg = <2>;
179 chan-name = "tricolor";
180 led-cur = /bits/ 8 <0x2f>;
181 max-cur = /bits/ 8 <0x5f>;
182 color = <LED_COLOR_ID_BLUE>;
183 };
184 };
185 #endif
186 };
187
188 eeprom@51 {
189 /*
190 * 1Kbit I2C/SMBus EEPROM with SHA-1 Engine
191 * Aerohive calls it "dallas".
192 */
193 compatible = "adi,ds28cn01";
194 reg = <0x51>;
195 read-only;
196 };
197 };
198
199 mdio@24000 {
200 phy0: ethernet-phy@0 {
201 interrupts = <3 1 0 0>;
202 reg = <0x1>;
203 };
204
205 phy1: ethernet-phy@1 {
206 interrupts = <2 1 0 0>;
207 reg = <0x2>;
208 };
209 };
210
211 mdio@25000 {
212 status = "disabled";
213 };
214
215 mdio@26000 {
216 status = "disabled";
217 };
218
219 enet0: ethernet@b0000 {
220 status = "okay";
221 phy-handle = <&phy0>;
222 phy-connection-type = "rgmii-id";
223 nvmem-cells = <&macaddr_hwinfo_0>;
224 nvmem-cell-names = "mac-address";
225 };
226
227 enet1: ethernet@b1000 {
228 status = "disabled";
229 };
230
231 enet2: ethernet@b2000 {
232 status = "okay";
233 phy-handle = <&phy1>;
234 phy-connection-type = "rgmii-id";
235 nvmem-cells = <&macaddr_hwinfo_0>;
236 nvmem-cell-names = "mac-address";
237 mac-address-increment = <1>;
238 };
239
240 gpio0: gpio-controller@fc00 {
241 };
242
243 usb@22000 {
244 phy_type = "ulpi";
245 dr_mode = "host";
246 };
247
248 usb@23000 {
249 status = "disabled";
250 };
251 };
252
253 pci0: pcie@ffe09000 {
254 reg = <0x0 0xffe09000 0x0 0x1000>;
255 ranges = <0x2000000 0x0 0xa0000000 0x0 0xa0000000 0x0 0x20000000
256 0x1000000 0x0 0x00000000 0x0 0xffc30000 0x0 0x10000>;
257 pcie@0 {
258 ranges = <0x2000000 0x0 0xa0000000
259 0x2000000 0x0 0xa0000000
260 0x0 0x20000000
261
262 0x1000000 0x0 0x0
263 0x1000000 0x0 0x0
264 0x0 0x100000>;
265 };
266 };
267
268 pci1: pcie@ffe0a000 {
269 reg = <0x0 0xffe0a000 0x0 0x1000>;
270 ranges = <0x2000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000
271 0x1000000 0x0 0x00000000 0x0 0xffc20000 0x0 0x10000>;
272 pcie@0 {
273 ranges = <0x2000000 0x0 0xc0000000
274 0x2000000 0x0 0xc0000000
275 0x0 0x20000000
276
277 0x1000000 0x0 0x0
278 0x1000000 0x0 0x0
279 0x0 0x100000>;
280 };
281 };
282
283 buttons {
284 compatible = "gpio-keys";
285
286 reset {
287 label = "Reset button";
288 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
289 linux,code = <KEY_RESTART>;
290 };
291 };
292 };
293 /include/ "fsl/p1020si-post.dtsi"