xref: /linux/scripts/dtc/include-prefixes/arm/marvell/armada-370-rd.dts (revision 06d07429858317ded2db7986113a9e0129cd599b)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2724ba675SRob Herring/*
3724ba675SRob Herring * Device Tree file for Marvell Armada 370 Reference Design board
4724ba675SRob Herring * (RD-88F6710-A1)
5724ba675SRob Herring *
6724ba675SRob Herring *  Copied from arch/arm/boot/dts/armada-370-db.dts
7724ba675SRob Herring *
8724ba675SRob Herring *  Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
9724ba675SRob Herring *
10724ba675SRob Herring * Note: this Device Tree assumes that the bootloader has remapped the
11724ba675SRob Herring * internal registers to 0xf1000000 (instead of the default
12724ba675SRob Herring * 0xd0000000). The 0xf1000000 is the default used by the recent,
13724ba675SRob Herring * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
14724ba675SRob Herring * boards were delivered with an older version of the bootloader that
15724ba675SRob Herring * left internal registers mapped at 0xd0000000. If you are in this
16724ba675SRob Herring * situation, you should either update your bootloader (preferred
17724ba675SRob Herring * solution) or the below Device Tree should be adjusted.
18724ba675SRob Herring */
19724ba675SRob Herring
20724ba675SRob Herring/dts-v1/;
21724ba675SRob Herring#include <dt-bindings/input/input.h>
22724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
23724ba675SRob Herring#include <dt-bindings/leds/common.h>
24724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
25724ba675SRob Herring#include "armada-370.dtsi"
26724ba675SRob Herring
27724ba675SRob Herring/ {
28724ba675SRob Herring	model = "Marvell Armada 370 Reference Design";
29724ba675SRob Herring	compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp";
30724ba675SRob Herring
31724ba675SRob Herring	chosen {
32724ba675SRob Herring		stdout-path = "serial0:115200n8";
33724ba675SRob Herring	};
34724ba675SRob Herring
35724ba675SRob Herring	memory@0 {
36724ba675SRob Herring		device_type = "memory";
37724ba675SRob Herring		reg = <0x00000000 0x20000000>; /* 512 MB */
38724ba675SRob Herring	};
39724ba675SRob Herring
40724ba675SRob Herring	soc {
41724ba675SRob Herring		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
42724ba675SRob Herring			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
43724ba675SRob Herring			  MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
44724ba675SRob Herring
45724ba675SRob Herring		internal-regs {
46724ba675SRob Herring			serial@12000 {
47724ba675SRob Herring				status = "okay";
48724ba675SRob Herring			};
49724ba675SRob Herring			sata@a0000 {
50724ba675SRob Herring				nr-ports = <2>;
51724ba675SRob Herring				status = "okay";
52724ba675SRob Herring			};
53724ba675SRob Herring
54724ba675SRob Herring			ethernet@70000 {
55724ba675SRob Herring				status = "okay";
56724ba675SRob Herring				phy = <&phy0>;
57724ba675SRob Herring				phy-mode = "sgmii";
58724ba675SRob Herring			};
59724ba675SRob Herring			ethernet@74000 {
60724ba675SRob Herring				pinctrl-0 = <&ge1_rgmii_pins>;
61724ba675SRob Herring				pinctrl-names = "default";
62724ba675SRob Herring				status = "okay";
63724ba675SRob Herring				phy-mode = "rgmii-id";
64724ba675SRob Herring				fixed-link {
65724ba675SRob Herring					speed = <1000>;
66724ba675SRob Herring					full-duplex;
67724ba675SRob Herring				};
68724ba675SRob Herring			};
69724ba675SRob Herring
70724ba675SRob Herring			mvsdio@d4000 {
71724ba675SRob Herring				pinctrl-0 = <&sdio_pins1>;
72724ba675SRob Herring				pinctrl-names = "default";
73724ba675SRob Herring				status = "okay";
74724ba675SRob Herring				/* No CD or WP GPIOs */
75724ba675SRob Herring				broken-cd;
76724ba675SRob Herring			};
77724ba675SRob Herring
78724ba675SRob Herring			usb@50000 {
79724ba675SRob Herring				status = "okay";
80724ba675SRob Herring			};
81724ba675SRob Herring
82724ba675SRob Herring			usb@51000 {
83724ba675SRob Herring				status = "okay";
84724ba675SRob Herring			};
85724ba675SRob Herring
86724ba675SRob Herring			gpio-keys {
87724ba675SRob Herring				compatible = "gpio-keys";
88724ba675SRob Herring				button {
89724ba675SRob Herring					label = "Software Button";
90724ba675SRob Herring					linux,code = <KEY_POWER>;
91724ba675SRob Herring					gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
92724ba675SRob Herring				};
93724ba675SRob Herring			};
94724ba675SRob Herring
95724ba675SRob Herring			gpio-fan {
96724ba675SRob Herring				compatible = "gpio-fan";
97724ba675SRob Herring				gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
98*62f34e3eSDavid Heidelberg				gpio-fan,speed-map = <0 0>, <3000 1>;
99724ba675SRob Herring				pinctrl-0 = <&fan_pins>;
100724ba675SRob Herring				pinctrl-names = "default";
101724ba675SRob Herring			};
102724ba675SRob Herring
103724ba675SRob Herring			gpio_leds {
104724ba675SRob Herring				compatible = "gpio-leds";
105724ba675SRob Herring				pinctrl-names = "default";
106724ba675SRob Herring				pinctrl-0 = <&led_pins>;
107724ba675SRob Herring
108724ba675SRob Herring				sw_led {
109724ba675SRob Herring					label = "370rd:green:sw";
110724ba675SRob Herring					gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
111724ba675SRob Herring					default-state = "keep";
112724ba675SRob Herring				};
113724ba675SRob Herring			};
114724ba675SRob Herring		};
115724ba675SRob Herring	};
116724ba675SRob Herring};
117724ba675SRob Herring
118724ba675SRob Herring&pciec {
119724ba675SRob Herring	status = "okay";
120724ba675SRob Herring
121724ba675SRob Herring	/* Internal mini-PCIe connector */
122724ba675SRob Herring	pcie@1,0 {
123724ba675SRob Herring		/* Port 0, Lane 0 */
124724ba675SRob Herring		status = "okay";
125724ba675SRob Herring	};
126724ba675SRob Herring
127724ba675SRob Herring	/* Internal mini-PCIe connector */
128724ba675SRob Herring	pcie@2,0 {
129724ba675SRob Herring		/* Port 1, Lane 0 */
130724ba675SRob Herring		status = "okay";
131724ba675SRob Herring	};
132724ba675SRob Herring};
133724ba675SRob Herring
134724ba675SRob Herring&mdio {
135724ba675SRob Herring	pinctrl-0 = <&mdio_pins>;
136724ba675SRob Herring	pinctrl-names = "default";
137724ba675SRob Herring	phy0: ethernet-phy@0 {
138724ba675SRob Herring		reg = <0>;
139724ba675SRob Herring		leds {
140724ba675SRob Herring			#address-cells = <1>;
141724ba675SRob Herring			#size-cells = <0>;
142724ba675SRob Herring
143724ba675SRob Herring			led@0 {
144724ba675SRob Herring				reg = <0>;
145724ba675SRob Herring				color = <LED_COLOR_ID_WHITE>;
146724ba675SRob Herring				function = LED_FUNCTION_WAN;
147724ba675SRob Herring				default-state = "keep";
148724ba675SRob Herring			};
149724ba675SRob Herring		};
150724ba675SRob Herring	};
151724ba675SRob Herring
1526e75ac5aSLinus Walleij	switch: ethernet-switch@10 {
153724ba675SRob Herring		compatible = "marvell,mv88e6085";
154724ba675SRob Herring		reg = <0x10>;
155724ba675SRob Herring		interrupt-controller;
156724ba675SRob Herring		#interrupt-cells = <2>;
157724ba675SRob Herring
1586e75ac5aSLinus Walleij		ethernet-ports {
159724ba675SRob Herring			#address-cells = <1>;
160724ba675SRob Herring			#size-cells = <0>;
161724ba675SRob Herring
1626e75ac5aSLinus Walleij			ethernet-port@0 {
163724ba675SRob Herring				reg = <0>;
164724ba675SRob Herring				label = "lan0";
165724ba675SRob Herring			};
166724ba675SRob Herring
1676e75ac5aSLinus Walleij			ethernet-port@1 {
168724ba675SRob Herring				reg = <1>;
169724ba675SRob Herring				label = "lan1";
170724ba675SRob Herring			};
171724ba675SRob Herring
1726e75ac5aSLinus Walleij			ethernet-port@2 {
173724ba675SRob Herring				reg = <2>;
174724ba675SRob Herring				label = "lan2";
175724ba675SRob Herring			};
176724ba675SRob Herring
1776e75ac5aSLinus Walleij			ethernet-port@3 {
178724ba675SRob Herring				reg = <3>;
179724ba675SRob Herring				label = "lan3";
180724ba675SRob Herring			};
181724ba675SRob Herring
1826e75ac5aSLinus Walleij			ethernet-port@5 {
183724ba675SRob Herring				reg = <5>;
184724ba675SRob Herring				ethernet = <&eth1>;
185724ba675SRob Herring				phy-mode = "rgmii-id";
186724ba675SRob Herring				fixed-link {
187724ba675SRob Herring					speed = <1000>;
188724ba675SRob Herring					full-duplex;
189724ba675SRob Herring				};
190724ba675SRob Herring			};
191724ba675SRob Herring		};
192724ba675SRob Herring
193724ba675SRob Herring		mdio {
194724ba675SRob Herring			#address-cells = <1>;
195724ba675SRob Herring			#size-cells = <0>;
196724ba675SRob Herring
1976e75ac5aSLinus Walleij			switchphy0: ethernet-phy@0 {
198724ba675SRob Herring				reg = <0>;
199724ba675SRob Herring				interrupt-parent = <&switch>;
200724ba675SRob Herring				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
201724ba675SRob Herring			};
202724ba675SRob Herring
2036e75ac5aSLinus Walleij			switchphy1: ethernet-phy@1 {
204724ba675SRob Herring				reg = <1>;
205724ba675SRob Herring				interrupt-parent = <&switch>;
206724ba675SRob Herring				interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
207724ba675SRob Herring			};
208724ba675SRob Herring
2096e75ac5aSLinus Walleij			switchphy2: ethernet-phy@2 {
210724ba675SRob Herring				reg = <2>;
211724ba675SRob Herring				interrupt-parent = <&switch>;
212724ba675SRob Herring				interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
213724ba675SRob Herring			};
214724ba675SRob Herring
2156e75ac5aSLinus Walleij			switchphy3: ethernet-phy@3 {
216724ba675SRob Herring				reg = <3>;
217724ba675SRob Herring				interrupt-parent = <&switch>;
218724ba675SRob Herring				interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
219724ba675SRob Herring			};
220724ba675SRob Herring		};
221724ba675SRob Herring	};
222724ba675SRob Herring};
223724ba675SRob Herring
224724ba675SRob Herring
225724ba675SRob Herring&pinctrl {
226724ba675SRob Herring	fan_pins: fan-pins {
227724ba675SRob Herring		marvell,pins = "mpp8";
228724ba675SRob Herring		marvell,function = "gpio";
229724ba675SRob Herring	};
230724ba675SRob Herring
231724ba675SRob Herring	led_pins: led-pins {
232724ba675SRob Herring		marvell,pins = "mpp32";
233724ba675SRob Herring		marvell,function = "gpio";
234724ba675SRob Herring	};
235724ba675SRob Herring};
236724ba675SRob Herring
237724ba675SRob Herring&nand_controller {
238724ba675SRob Herring	status = "okay";
239724ba675SRob Herring
240724ba675SRob Herring	nand@0 {
241724ba675SRob Herring		reg = <0>;
242724ba675SRob Herring		label = "pxa3xx_nand-0";
243724ba675SRob Herring		nand-rb = <0>;
244724ba675SRob Herring		marvell,nand-keep-config;
245724ba675SRob Herring		nand-on-flash-bbt;
246724ba675SRob Herring
247724ba675SRob Herring		partitions {
248724ba675SRob Herring			compatible = "fixed-partitions";
249724ba675SRob Herring			#address-cells = <1>;
250724ba675SRob Herring			#size-cells = <1>;
251724ba675SRob Herring
252724ba675SRob Herring			partition@0 {
253724ba675SRob Herring				label = "U-Boot";
254724ba675SRob Herring				reg = <0 0x800000>;
255724ba675SRob Herring			};
256724ba675SRob Herring			partition@800000 {
257724ba675SRob Herring				label = "Linux";
258724ba675SRob Herring				reg = <0x800000 0x800000>;
259724ba675SRob Herring			};
260724ba675SRob Herring			partition@1000000 {
261724ba675SRob Herring				label = "Filesystem";
262724ba675SRob Herring				reg = <0x1000000 0x3f000000>;
263724ba675SRob Herring			};
264724ba675SRob Herring		};
265724ba675SRob Herring	};
266724ba675SRob Herring};
267