9b3b1f08fce82de72bad457b2984fbbb12fa6b07
[openwrt/staging/hauke.git] / target / linux / mvebu / files / arch / arm / boot / dts / armada-385-fortinet-fg-x0e.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include "armada-385.dtsi"
9
10 / {
11 aliases {
12 led-boot = &led_status_green;
13 led-failsafe = &led_status_red;
14 led-running = &led_status_green;
15 led-upgrade = &led_status_green;
16 label-mac-device = &eth0;
17 };
18
19 chosen {
20 stdout-path = "serial0:9600n8";
21 };
22
23 soc {
24 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
25 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
26 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
27 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
28 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
29 };
30
31 gpio-keys {
32 compatible = "gpio-keys";
33 pinctrl-names = "default";
34 pinctrl-0 = <&pmx_gpio_keys_pins>;
35
36 reset {
37 label = "reset";
38 linux,code = <KEY_RESTART>;
39 gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 gpio_leds: gpio-leds {
44 compatible = "gpio-leds";
45 pinctrl-names = "default";
46 pinctrl-0 = <&pmx_gpio_leds_pins>;
47
48 led-0 {
49 label = "red:alarm";
50 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
51 color = <LED_COLOR_ID_RED>;
52 function = LED_FUNCTION_ALARM;
53 };
54
55 led-1 {
56 label = "red:ha";
57 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
58 color = <LED_COLOR_ID_RED>;
59 };
60
61 led_status_green: led-2 {
62 label = "green:sta";
63 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
64 color = <LED_COLOR_ID_GREEN>;
65 function = LED_FUNCTION_STATUS;
66 };
67
68 led-3 {
69 label = "green:ha";
70 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
71 color = <LED_COLOR_ID_GREEN>;
72 };
73
74 led-4 {
75 label = "amber:alarm";
76 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
77 color = <LED_COLOR_ID_AMBER>;
78 function = LED_FUNCTION_ALARM;
79 };
80
81 led_status_red: led-5 {
82 label = "red:sta";
83 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
84 color = <LED_COLOR_ID_RED>;
85 function = LED_FUNCTION_STATUS;
86 };
87
88 led-6 {
89 label = "green:speed_lan4";
90 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
91 color = <LED_COLOR_ID_GREEN>;
92 linux,default-trigger = "mv88e6xxx-1:01:1Gbps";
93 };
94
95 led-7 {
96 label = "amber:speed_lan4";
97 gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
98 color = <LED_COLOR_ID_AMBER>;
99 linux,default-trigger = "mv88e6xxx-1:01:100Mbps";
100 };
101
102 led-8 {
103 label = "amber:speed_lan3";
104 gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
105 color = <LED_COLOR_ID_AMBER>;
106 linux,default-trigger = "mv88e6xxx-1:02:100Mbps";
107 };
108
109 led-9 {
110 label = "green:speed_lan3";
111 gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
112 color = <LED_COLOR_ID_GREEN>;
113 linux,default-trigger = "mv88e6xxx-1:02:1Gbps";
114 };
115
116 led-10 {
117 label = "green:speed_lan1";
118 gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
119 color = <LED_COLOR_ID_GREEN>;
120 linux,default-trigger = "mv88e6xxx-1:04:1Gbps";
121 };
122
123 led-11 {
124 label = "amber:speed_lan1";
125 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
126 color = <LED_COLOR_ID_AMBER>;
127 linux,default-trigger = "mv88e6xxx-1:04:100Mbps";
128 };
129
130 led-12 {
131 label = "green:speed_lan2";
132 gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
133 color = <LED_COLOR_ID_GREEN>;
134 linux,default-trigger = "mv88e6xxx-1:03:1Gbps";
135 };
136
137 led-13 {
138 label = "amber:speed_lan2";
139 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
140 color = <LED_COLOR_ID_AMBER>;
141 linux,default-trigger = "mv88e6xxx-1:03:100Mbps";
142 };
143 };
144
145 reg_usb_vbus: regulator-usb-vbus {
146 compatible = "fixed-regulator";
147 regulator-name = "usb-vbus";
148 regulator-min-microvolt = <5000000>;
149 regulator-max-microvolt = <5000000>;
150 gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
151 regulator-always-on;
152 };
153 };
154
155 &i2c0 {
156 pinctrl-names = "default";
157 pinctrl-0 = <&i2c0_pins>;
158 status = "okay";
159
160 gpio2: gpio@24 {
161 compatible = "nxp,pca9555";
162 reg = <0x24>;
163 gpio-controller;
164 #gpio-cells = <0x2>;
165 };
166
167 hwmon@28 {
168 compatible = "nuvoton,nct7802";
169 reg = <0x28>;
170 };
171 };
172
173 &uart0 {
174 pinctrl-names = "default";
175 pinctrl-0 = <&uart0_pins>;
176 status = "okay";
177 };
178
179 &pinctrl {
180 pmx_gpio_leds_pins: gpio-leds-pins {
181 marvell,pins = "mpp30", "mpp32", "mpp33", "mpp35",
182 "mpp45", "mpp47";
183 marvell,function = "gpio";
184 };
185
186 pmx_usb_pins: usb-pins {
187 marvell,pins = "mpp53";
188 marvell,function = "gpio";
189 };
190
191 pmx_gpio_keys_pins: gpio-keys-pins {
192 marvell,pins = "mpp54";
193 marvell,function = "gpio";
194 };
195 };
196
197 &bm {
198 status = "okay";
199 };
200
201 &bm_bppi {
202 status = "okay";
203 };
204
205 &eth0 {
206 pinctrl-names = "default";
207 pinctrl-0 = <&ge0_rgmii_pins>;
208 status = "okay";
209
210 phy-connection-type = "rgmii-id";
211 buffer-manager = <&bm>;
212 bm,pool-long = <0>;
213 bm,pool-short = <1>;
214 nvmem-cells = <&macaddr_bdinfo_d880>;
215 nvmem-cell-names = "mac-address";
216
217 fixed-link {
218 speed = <1000>;
219 full-duplex;
220 };
221 };
222
223 &usb3_0 {
224 pinctrl-names = "default";
225 pinctrl-0 = <&pmx_usb_pins>;
226 status = "okay";
227
228 vbus-supply = <&reg_usb_vbus>;
229 };
230
231 &spi1 {
232 pinctrl-names = "default";
233 pinctrl-0 = <&spi1_pins>;
234 status = "okay";
235
236 flash@0 {
237 compatible = "jedec,spi-nor";
238 reg = <0>;
239 spi-max-frequency = <50000000>;
240
241 partitions {
242 compatible = "fixed-partitions";
243 #address-cells = <1>;
244 #size-cells = <1>;
245
246 partition@0 {
247 reg = <0x0 0x1c0000>;
248 label = "u-boot";
249 read-only;
250 };
251
252 partition@1c0000 {
253 reg = <0x1c0000 0x10000>;
254 label = "firmware-info";
255
256 /*
257 * 0x10 - 0x2f : image name (image1)
258 * 0x30 - 0x4f : image name (image2)
259 * 0x170 (1byte): active image (0x0/0x1)
260 * 0x184 - 0x185: kernel block count (image1)
261 * 0x18c - 0x18d: rootfs block count (image1)
262 * 0x194 - 0x195: kernel block count (image2)
263 * 0x19c - 0x19d: rootfs block count (image2)
264 * 0x1be (1byte): bit7 -> active flag (image1)?
265 * 0x1ce (1byte): bit7 -> active flag (image2)?
266 *
267 * Note: block size --> 0x200 (512 bytes)
268 */
269 };
270
271 partition@1d0000 {
272 reg = <0x1d0000 0x10000>;
273 label = "dtb";
274 read-only;
275 };
276
277 partition@1e0000 {
278 reg = <0x1e0000 0x10000>;
279 label = "u-boot-env";
280 read-only;
281 };
282
283 partition@1f0000 {
284 reg = <0x1f0000 0x10000>;
285 label = "board-info";
286 read-only;
287
288 compatible = "nvmem-cells";
289 #address-cells = <1>;
290 #size-cells = <1>;
291
292 macaddr_bdinfo_d880: macaddr@d880 {
293 reg = <0xd880 0x6>;
294 };
295 };
296
297 partition@200000 {
298 reg = <0x200000 0x600000>;
299 label = "kernel";
300 };
301
302 partition@800000 {
303 reg = <0x800000 0x1800000>;
304 label = "rootfs";
305 };
306
307 partition@2000000 {
308 reg = <0x2000000 0x600000>;
309 label = "kn2";
310 read-only;
311 };
312
313 partition@2600000 {
314 reg = <0x2600000 0x1800000>;
315 label = "rfs2";
316 read-only;
317 };
318
319 partition@3e00000 {
320 reg = <0x3e00000 0x1200000>;
321 label = "part1";
322 read-only;
323 };
324
325 partition@5000000 {
326 reg = <0x5000000 0x1200000>;
327 label = "part2";
328 read-only;
329 };
330
331 partition@6200000 {
332 reg = <0x6200000 0x1e00000>;
333 label = "config";
334 read-only;
335 };
336 };
337 };
338 };