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