mpc85xx: Fix HiveAP-330 nvmem mac loader
[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/ "fsl/p1020si-pre.dtsi"
13 / {
14 model = "Aerohive HiveAP-330";
15 compatible = "aerohive,hiveap-330";
16
17 aliases {
18 led-boot = &tricolor_green;
19 led-failsafe = &tricolor_red;
20 led-running = &tricolor_green;
21 led-upgrade = &tricolor_red;
22 label-mac-device = &enet0;
23 };
24
25 chosen {
26 bootargs-override = "console=ttyS0,9600";
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 partition@0 {
51 reg = <0x0 0x40000>;
52 label = "dtb";
53 };
54
55 partition@40000 {
56 reg = <0x40000 0x40000>;
57 label = "initrd";
58 };
59
60 partition@80000 {
61 reg = <0x80000 0x27c0000>;
62 label = "rootfs";
63 };
64
65 partition@2840000 {
66 reg = <0x2840000 0x800000>;
67 label = "kernel";
68 };
69
70 partition@3040000 {
71 reg = <0x3040000 0xec0000>;
72 label = "stock-jffs2";
73 read-only;
74 };
75
76 hwinfo: partition@3f00000 {
77 reg = <0x3f00000 0x20000>;
78 label = "hw-info";
79 read-only;
80 };
81
82 partition@3f20000 {
83 reg = <0x3f20000 0x20000>;
84 label = "boot-info";
85 read-only;
86 };
87
88 partition@3f40000 {
89 reg = <0x3f40000 0x20000>;
90 label = "boot-info-backup";
91 read-only;
92 };
93
94 partition@3f60000 {
95 reg = <0x3f60000 0x20000>;
96 label = "u-boot-env";
97 };
98
99 partition@3f80000 {
100 reg = <0x3f80000 0x80000>;
101 label = "u-boot";
102 read-only;
103 };
104
105 firmware@0 {
106 reg = <0x0 0x3040000>;
107 label = "firmware";
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 tricolor_red: chan0 {
127 chan-name = "hiveap-330:red:tricolor0";
128 led-cur = /bits/ 8 <0x2f>;
129 max-cur = /bits/ 8 <0x5f>;
130 };
131 tricolor_green:chan1 {
132 chan-name = "hiveap-330:green:tricolor0";
133 led-cur = /bits/ 8 <0x2f>;
134 max-cur = /bits/ 8 <0x5f>;
135 };
136 chan2 {
137 chan-name = "hiveap-330:blue:tricolor0";
138 led-cur = /bits/ 8 <0x2f>;
139 max-cur = /bits/ 8 <0x5f>;
140 };
141 };
142
143 /* Most likely SoC boot config */
144 eeprom@51 {
145 compatible = "eeprom";
146 reg = <0x51>;
147 };
148 };
149
150 mdio@24000 {
151 phy0: ethernet-phy@0 {
152 interrupts = <3 1 0 0>;
153 reg = <0x1>;
154 };
155
156 phy1: ethernet-phy@1 {
157 interrupts = <2 1 0 0>;
158 reg = <0x2>;
159 };
160 };
161
162 mdio@25000 {
163 status = "disabled";
164 };
165
166 mdio@26000 {
167 status = "disabled";
168 };
169
170 enet0: ethernet@b0000 {
171 status = "okay";
172 phy-handle = <&phy0>;
173 phy-connection-type = "rgmii-id";
174 nvmem-cells = <&macaddr_hwinfo_0>;
175 nvmem-cell-names = "mac-address";
176 };
177
178 enet1: ethernet@b1000 {
179 status = "disabled";
180 };
181
182 enet2: ethernet@b2000 {
183 status = "okay";
184 phy-handle = <&phy1>;
185 phy-connection-type = "rgmii-id";
186 nvmem-cells = <&macaddr_hwinfo_0>;
187 nvmem-cell-names = "mac-address";
188 mac-address-increment = <1>;
189 };
190
191 gpio0: gpio-controller@fc00 {
192 };
193
194 usb@22000 {
195 phy_type = "ulpi";
196 dr_mode = "host";
197 };
198
199 usb@23000 {
200 status = "disabled";
201 };
202 };
203
204 pci0: pcie@ffe09000 {
205 reg = <0x0 0xffe09000 0x0 0x1000>;
206 ranges = <0x2000000 0x0 0xa0000000 0x0 0xa0000000 0x0 0x20000000
207 0x1000000 0x0 0x00000000 0x0 0xffc30000 0x0 0x10000>;
208 pcie@0 {
209 ranges = <0x2000000 0x0 0xa0000000
210 0x2000000 0x0 0xa0000000
211 0x0 0x20000000
212
213 0x1000000 0x0 0x0
214 0x1000000 0x0 0x0
215 0x0 0x100000>;
216 };
217 };
218
219 pci1: pcie@ffe0a000 {
220 reg = <0x0 0xffe0a000 0x0 0x1000>;
221 ranges = <0x2000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000
222 0x1000000 0x0 0x00000000 0x0 0xffc20000 0x0 0x10000>;
223 pcie@0 {
224 ranges = <0x2000000 0x0 0xc0000000
225 0x2000000 0x0 0xc0000000
226 0x0 0x20000000
227
228 0x1000000 0x0 0x0
229 0x1000000 0x0 0x0
230 0x0 0x100000>;
231 };
232 };
233
234 buttons {
235 compatible = "gpio-keys";
236
237 reset {
238 label = "Reset button";
239 gpios = <&gpio0 8 1>; /* active low */
240 linux,code = <0x198>; /* KEY_RESTART */
241 };
242 };
243 };
244 /include/ "fsl/p1020si-post.dtsi"
245
246 &hwinfo {
247 compatible = "nvmem-cells";
248 #address-cells = <1>;
249 #size-cells = <1>;
250
251 macaddr_hwinfo_0: macaddr@0 {
252 reg = <0x0 0x6>;
253 };
254 };