xref: /openbmc/u-boot/arch/arm/dts/armada-385-turris-omnia.dts (revision c2502e7b82b68945ef89569e7555add30189e976)
1*c2502e7bSMarek Behún/*
2*c2502e7bSMarek Behún * Device Tree file for the Turris Omnia
3*c2502e7bSMarek Behún *
4*c2502e7bSMarek Behún * Copyright (C) 2016 Uwe Kleine-König <uwe@kleine-koenig.org>
5*c2502e7bSMarek Behún * Copyright (C) 2016 Tomas Hlavacek <tmshlvkc@gmail.com>
6*c2502e7bSMarek Behún *
7*c2502e7bSMarek Behún * This file is dual-licensed: you can use it either under the terms
8*c2502e7bSMarek Behún * of the GPL or the X11 license, at your option. Note that this dual
9*c2502e7bSMarek Behún * licensing only applies to this file, and not this project as a
10*c2502e7bSMarek Behún * whole.
11*c2502e7bSMarek Behún *
12*c2502e7bSMarek Behún *  a) This file is licensed under the terms of the GNU General Public
13*c2502e7bSMarek Behún *     License version 2.  This program is licensed "as is" without
14*c2502e7bSMarek Behún *     any warranty of any kind, whether express or implied.
15*c2502e7bSMarek Behún *
16*c2502e7bSMarek Behún * Or, alternatively,
17*c2502e7bSMarek Behún *
18*c2502e7bSMarek Behún *  b) Permission is hereby granted, free of charge, to any person
19*c2502e7bSMarek Behún *     obtaining a copy of this software and associated documentation
20*c2502e7bSMarek Behún *     files (the "Software"), to deal in the Software without
21*c2502e7bSMarek Behún *     restriction, including without limitation the rights to use,
22*c2502e7bSMarek Behún *     copy, modify, merge, publish, distribute, sublicense, and/or
23*c2502e7bSMarek Behún *     sell copies of the Software, and to permit persons to whom the
24*c2502e7bSMarek Behún *     Software is furnished to do so, subject to the following
25*c2502e7bSMarek Behún *     conditions:
26*c2502e7bSMarek Behún *
27*c2502e7bSMarek Behún *     The above copyright notice and this permission notice shall be
28*c2502e7bSMarek Behún *     included in all copies or substantial portions of the Software.
29*c2502e7bSMarek Behún *
30*c2502e7bSMarek Behún *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31*c2502e7bSMarek Behún *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
32*c2502e7bSMarek Behún *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33*c2502e7bSMarek Behún *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
34*c2502e7bSMarek Behún *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
35*c2502e7bSMarek Behún *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
36*c2502e7bSMarek Behún *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
37*c2502e7bSMarek Behún *     OTHER DEALINGS IN THE SOFTWARE.
38*c2502e7bSMarek Behún */
39*c2502e7bSMarek Behún
40*c2502e7bSMarek Behún/*
41*c2502e7bSMarek Behún * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf
42*c2502e7bSMarek Behún */
43*c2502e7bSMarek Behún
44*c2502e7bSMarek Behún/dts-v1/;
45*c2502e7bSMarek Behún
46*c2502e7bSMarek Behún#include <dt-bindings/gpio/gpio.h>
47*c2502e7bSMarek Behún#include <dt-bindings/input/input.h>
48*c2502e7bSMarek Behún#include "armada-385.dtsi"
49*c2502e7bSMarek Behún
50*c2502e7bSMarek Behún/ {
51*c2502e7bSMarek Behún	model = "Turris Omnia";
52*c2502e7bSMarek Behún	compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380";
53*c2502e7bSMarek Behún
54*c2502e7bSMarek Behún	chosen {
55*c2502e7bSMarek Behún		stdout-path = &uart0;
56*c2502e7bSMarek Behún	};
57*c2502e7bSMarek Behún
58*c2502e7bSMarek Behún	memory {
59*c2502e7bSMarek Behún		device_type = "memory";
60*c2502e7bSMarek Behún		reg = <0x00000000 0x40000000>; /* 1024 MB */
61*c2502e7bSMarek Behún	};
62*c2502e7bSMarek Behún
63*c2502e7bSMarek Behún	soc {
64*c2502e7bSMarek Behún		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
65*c2502e7bSMarek Behún			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
66*c2502e7bSMarek Behún			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
67*c2502e7bSMarek Behún			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
68*c2502e7bSMarek Behún
69*c2502e7bSMarek Behún		internal-regs {
70*c2502e7bSMarek Behún
71*c2502e7bSMarek Behún			/* USB part of the PCIe2/USB 2.0 port */
72*c2502e7bSMarek Behún			usb@58000 {
73*c2502e7bSMarek Behún				status = "okay";
74*c2502e7bSMarek Behún			};
75*c2502e7bSMarek Behún
76*c2502e7bSMarek Behún			sata@a8000 {
77*c2502e7bSMarek Behún				status = "okay";
78*c2502e7bSMarek Behún			};
79*c2502e7bSMarek Behún
80*c2502e7bSMarek Behún			sdhci@d8000 {
81*c2502e7bSMarek Behún				pinctrl-names = "default";
82*c2502e7bSMarek Behún				pinctrl-0 = <&sdhci_pins>;
83*c2502e7bSMarek Behún				status = "okay";
84*c2502e7bSMarek Behún
85*c2502e7bSMarek Behún				bus-width = <8>;
86*c2502e7bSMarek Behún				no-1-8-v;
87*c2502e7bSMarek Behún				non-removable;
88*c2502e7bSMarek Behún			};
89*c2502e7bSMarek Behún
90*c2502e7bSMarek Behún			usb3@f0000 {
91*c2502e7bSMarek Behún				status = "okay";
92*c2502e7bSMarek Behún			};
93*c2502e7bSMarek Behún
94*c2502e7bSMarek Behún			usb3@f8000 {
95*c2502e7bSMarek Behún				status = "okay";
96*c2502e7bSMarek Behún			};
97*c2502e7bSMarek Behún		};
98*c2502e7bSMarek Behún
99*c2502e7bSMarek Behún		pcie-controller {
100*c2502e7bSMarek Behún			status = "okay";
101*c2502e7bSMarek Behún
102*c2502e7bSMarek Behún			pcie@1,0 {
103*c2502e7bSMarek Behún				/* Port 0, Lane 0 */
104*c2502e7bSMarek Behún				status = "okay";
105*c2502e7bSMarek Behún			};
106*c2502e7bSMarek Behún
107*c2502e7bSMarek Behún			pcie@2,0 {
108*c2502e7bSMarek Behún				/* Port 1, Lane 0 */
109*c2502e7bSMarek Behún				status = "okay";
110*c2502e7bSMarek Behún			};
111*c2502e7bSMarek Behún
112*c2502e7bSMarek Behún			pcie@3,0 {
113*c2502e7bSMarek Behún				/* Port 2, Lane 0 */
114*c2502e7bSMarek Behún				status = "okay";
115*c2502e7bSMarek Behún			};
116*c2502e7bSMarek Behún		};
117*c2502e7bSMarek Behún	};
118*c2502e7bSMarek Behún};
119*c2502e7bSMarek Behún
120*c2502e7bSMarek Behún/* Connected to 88E6176 switch, port 6 */
121*c2502e7bSMarek Behún&eth0 {
122*c2502e7bSMarek Behún	pinctrl-names = "default";
123*c2502e7bSMarek Behún	pinctrl-0 = <&ge0_rgmii_pins>;
124*c2502e7bSMarek Behún	status = "okay";
125*c2502e7bSMarek Behún	phy-mode = "rgmii";
126*c2502e7bSMarek Behún
127*c2502e7bSMarek Behún	fixed-link {
128*c2502e7bSMarek Behún		speed = <1000>;
129*c2502e7bSMarek Behún		full-duplex;
130*c2502e7bSMarek Behún	};
131*c2502e7bSMarek Behún};
132*c2502e7bSMarek Behún
133*c2502e7bSMarek Behún/* Connected to 88E6176 switch, port 5 */
134*c2502e7bSMarek Behún&eth1 {
135*c2502e7bSMarek Behún	pinctrl-names = "default";
136*c2502e7bSMarek Behún	pinctrl-0 = <&ge1_rgmii_pins>;
137*c2502e7bSMarek Behún	status = "okay";
138*c2502e7bSMarek Behún	phy-mode = "rgmii";
139*c2502e7bSMarek Behún
140*c2502e7bSMarek Behún	fixed-link {
141*c2502e7bSMarek Behún		speed = <1000>;
142*c2502e7bSMarek Behún		full-duplex;
143*c2502e7bSMarek Behún	};
144*c2502e7bSMarek Behún};
145*c2502e7bSMarek Behún
146*c2502e7bSMarek Behún/* WAN port */
147*c2502e7bSMarek Behún&eth2 {
148*c2502e7bSMarek Behún	status = "okay";
149*c2502e7bSMarek Behún	phy-mode = "sgmii";
150*c2502e7bSMarek Behún	phy = <&phy1>;
151*c2502e7bSMarek Behún};
152*c2502e7bSMarek Behún
153*c2502e7bSMarek Behún&i2c0 {
154*c2502e7bSMarek Behún	pinctrl-names = "default";
155*c2502e7bSMarek Behún	pinctrl-0 = <&i2c0_pins>;
156*c2502e7bSMarek Behún	status = "okay";
157*c2502e7bSMarek Behún
158*c2502e7bSMarek Behún	i2cmux@70 {
159*c2502e7bSMarek Behún		compatible = "nxp,pca9547";
160*c2502e7bSMarek Behún		#address-cells = <1>;
161*c2502e7bSMarek Behún		#size-cells = <0>;
162*c2502e7bSMarek Behún		reg = <0x70>;
163*c2502e7bSMarek Behún		status = "okay";
164*c2502e7bSMarek Behún
165*c2502e7bSMarek Behún		i2c@0 {
166*c2502e7bSMarek Behún			#address-cells = <1>;
167*c2502e7bSMarek Behún			#size-cells = <0>;
168*c2502e7bSMarek Behún			reg = <0>;
169*c2502e7bSMarek Behún
170*c2502e7bSMarek Behún			/* STM32F0 command interface at address 0x2a */
171*c2502e7bSMarek Behún			/* leds device (in STM32F0) at address 0x2b */
172*c2502e7bSMarek Behún
173*c2502e7bSMarek Behún			eeprom@54 {
174*c2502e7bSMarek Behún				compatible = "at,24c64";
175*c2502e7bSMarek Behún				reg = <0x54>;
176*c2502e7bSMarek Behún
177*c2502e7bSMarek Behún				/* The EEPROM contains data for bootloader.
178*c2502e7bSMarek Behún				 * Contents:
179*c2502e7bSMarek Behún				 * 	struct omnia_eeprom {
180*c2502e7bSMarek Behún				 * 		u32 magic; (=0x0341a034 in LE)
181*c2502e7bSMarek Behún				 *		u32 ramsize; (in GiB)
182*c2502e7bSMarek Behún				 * 		char regdomain[4];
183*c2502e7bSMarek Behún				 * 		u32 crc32;
184*c2502e7bSMarek Behún				 * 	};
185*c2502e7bSMarek Behún				 */
186*c2502e7bSMarek Behún			};
187*c2502e7bSMarek Behún		};
188*c2502e7bSMarek Behún
189*c2502e7bSMarek Behún		i2c@1 {
190*c2502e7bSMarek Behún			#address-cells = <1>;
191*c2502e7bSMarek Behún			#size-cells = <0>;
192*c2502e7bSMarek Behún			reg = <1>;
193*c2502e7bSMarek Behún
194*c2502e7bSMarek Behún			/* routed to PCIe0/mSATA connector (CN7A) */
195*c2502e7bSMarek Behún		};
196*c2502e7bSMarek Behún
197*c2502e7bSMarek Behún		i2c@2 {
198*c2502e7bSMarek Behún			#address-cells = <1>;
199*c2502e7bSMarek Behún			#size-cells = <0>;
200*c2502e7bSMarek Behún			reg = <2>;
201*c2502e7bSMarek Behún
202*c2502e7bSMarek Behún			/* routed to PCIe1/USB2 connector (CN61A) */
203*c2502e7bSMarek Behún		};
204*c2502e7bSMarek Behún
205*c2502e7bSMarek Behún		i2c@3 {
206*c2502e7bSMarek Behún			#address-cells = <1>;
207*c2502e7bSMarek Behún			#size-cells = <0>;
208*c2502e7bSMarek Behún			reg = <3>;
209*c2502e7bSMarek Behún
210*c2502e7bSMarek Behún			/* routed to PCIe2 connector (CN62A) */
211*c2502e7bSMarek Behún		};
212*c2502e7bSMarek Behún
213*c2502e7bSMarek Behún		i2c@4 {
214*c2502e7bSMarek Behún			#address-cells = <1>;
215*c2502e7bSMarek Behún			#size-cells = <0>;
216*c2502e7bSMarek Behún			reg = <4>;
217*c2502e7bSMarek Behún
218*c2502e7bSMarek Behún			/* routed to SFP+ */
219*c2502e7bSMarek Behún		};
220*c2502e7bSMarek Behún
221*c2502e7bSMarek Behún		i2c@5 {
222*c2502e7bSMarek Behún			#address-cells = <1>;
223*c2502e7bSMarek Behún			#size-cells = <0>;
224*c2502e7bSMarek Behún			reg = <5>;
225*c2502e7bSMarek Behún
226*c2502e7bSMarek Behún			/* ATSHA204A at address 0x64 */
227*c2502e7bSMarek Behún		};
228*c2502e7bSMarek Behún
229*c2502e7bSMarek Behún		i2c@6 {
230*c2502e7bSMarek Behún			#address-cells = <1>;
231*c2502e7bSMarek Behún			#size-cells = <0>;
232*c2502e7bSMarek Behún			reg = <6>;
233*c2502e7bSMarek Behún
234*c2502e7bSMarek Behún			/* exposed on pin header */
235*c2502e7bSMarek Behún		};
236*c2502e7bSMarek Behún
237*c2502e7bSMarek Behún		i2c@7 {
238*c2502e7bSMarek Behún			#address-cells = <1>;
239*c2502e7bSMarek Behún			#size-cells = <0>;
240*c2502e7bSMarek Behún			reg = <7>;
241*c2502e7bSMarek Behún
242*c2502e7bSMarek Behún			pcawan: gpio@71 {
243*c2502e7bSMarek Behún				/*
244*c2502e7bSMarek Behún				 * GPIO expander for SFP+ signals and
245*c2502e7bSMarek Behún				 * and phy irq
246*c2502e7bSMarek Behún				 */
247*c2502e7bSMarek Behún				compatible = "nxp,pca9538";
248*c2502e7bSMarek Behún				reg = <0x71>;
249*c2502e7bSMarek Behún
250*c2502e7bSMarek Behún				pinctrl-names = "default";
251*c2502e7bSMarek Behún				pinctrl-0 = <&pcawan_pins>;
252*c2502e7bSMarek Behún
253*c2502e7bSMarek Behún				interrupt-parent = <&gpio1>;
254*c2502e7bSMarek Behún				interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
255*c2502e7bSMarek Behún
256*c2502e7bSMarek Behún				gpio-controller;
257*c2502e7bSMarek Behún				#gpio-cells = <2>;
258*c2502e7bSMarek Behún			};
259*c2502e7bSMarek Behún		};
260*c2502e7bSMarek Behún	};
261*c2502e7bSMarek Behún};
262*c2502e7bSMarek Behún
263*c2502e7bSMarek Behún&mdio {
264*c2502e7bSMarek Behún	pinctrl-names = "default";
265*c2502e7bSMarek Behún	pinctrl-0 = <&mdio_pins>;
266*c2502e7bSMarek Behún	status = "okay";
267*c2502e7bSMarek Behún
268*c2502e7bSMarek Behún	phy1: phy@1 {
269*c2502e7bSMarek Behún		status = "okay";
270*c2502e7bSMarek Behún		compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22";
271*c2502e7bSMarek Behún		reg = <1>;
272*c2502e7bSMarek Behún
273*c2502e7bSMarek Behún		/* irq is connected to &pcawan pin 7 */
274*c2502e7bSMarek Behún	};
275*c2502e7bSMarek Behún
276*c2502e7bSMarek Behún	/* Switch MV88E6176 at address 0x10 */
277*c2502e7bSMarek Behún	switch@10 {
278*c2502e7bSMarek Behún		compatible = "marvell,mv88e6085";
279*c2502e7bSMarek Behún		#address-cells = <1>;
280*c2502e7bSMarek Behún		#size-cells = <0>;
281*c2502e7bSMarek Behún		dsa,member = <0 0>;
282*c2502e7bSMarek Behún
283*c2502e7bSMarek Behún		reg = <0x10>;
284*c2502e7bSMarek Behún
285*c2502e7bSMarek Behún		ports {
286*c2502e7bSMarek Behún			#address-cells = <1>;
287*c2502e7bSMarek Behún			#size-cells = <0>;
288*c2502e7bSMarek Behún
289*c2502e7bSMarek Behún			ports@0 {
290*c2502e7bSMarek Behún				reg = <0>;
291*c2502e7bSMarek Behún				label = "lan0";
292*c2502e7bSMarek Behún			};
293*c2502e7bSMarek Behún
294*c2502e7bSMarek Behún			ports@1 {
295*c2502e7bSMarek Behún				reg = <1>;
296*c2502e7bSMarek Behún				label = "lan1";
297*c2502e7bSMarek Behún			};
298*c2502e7bSMarek Behún
299*c2502e7bSMarek Behún			ports@2 {
300*c2502e7bSMarek Behún				reg = <2>;
301*c2502e7bSMarek Behún				label = "lan2";
302*c2502e7bSMarek Behún			};
303*c2502e7bSMarek Behún
304*c2502e7bSMarek Behún			ports@3 {
305*c2502e7bSMarek Behún				reg = <3>;
306*c2502e7bSMarek Behún				label = "lan3";
307*c2502e7bSMarek Behún			};
308*c2502e7bSMarek Behún
309*c2502e7bSMarek Behún			ports@4 {
310*c2502e7bSMarek Behún				reg = <4>;
311*c2502e7bSMarek Behún				label = "lan4";
312*c2502e7bSMarek Behún			};
313*c2502e7bSMarek Behún
314*c2502e7bSMarek Behún			ports@5 {
315*c2502e7bSMarek Behún				reg = <5>;
316*c2502e7bSMarek Behún				label = "cpu";
317*c2502e7bSMarek Behún				ethernet = <&eth1>;
318*c2502e7bSMarek Behún				phy-mode = "rgmii-id";
319*c2502e7bSMarek Behún
320*c2502e7bSMarek Behún				fixed-link {
321*c2502e7bSMarek Behún					speed = <1000>;
322*c2502e7bSMarek Behún					full-duplex;
323*c2502e7bSMarek Behún				};
324*c2502e7bSMarek Behún			};
325*c2502e7bSMarek Behún
326*c2502e7bSMarek Behún			/* port 6 is connected to eth0 */
327*c2502e7bSMarek Behún		};
328*c2502e7bSMarek Behún	};
329*c2502e7bSMarek Behún};
330*c2502e7bSMarek Behún
331*c2502e7bSMarek Behún&pinctrl {
332*c2502e7bSMarek Behún	pcawan_pins: pcawan-pins {
333*c2502e7bSMarek Behún		marvell,pins = "mpp46";
334*c2502e7bSMarek Behún		marvell,function = "gpio";
335*c2502e7bSMarek Behún	};
336*c2502e7bSMarek Behún
337*c2502e7bSMarek Behún	spi0cs0_pins: spi0cs0-pins {
338*c2502e7bSMarek Behún		marvell,pins = "mpp25";
339*c2502e7bSMarek Behún		marvell,function = "spi0";
340*c2502e7bSMarek Behún	};
341*c2502e7bSMarek Behún
342*c2502e7bSMarek Behún	spi0cs1_pins: spi0cs1-pins {
343*c2502e7bSMarek Behún		marvell,pins = "mpp26";
344*c2502e7bSMarek Behún		marvell,function = "spi0";
345*c2502e7bSMarek Behún	};
346*c2502e7bSMarek Behún};
347*c2502e7bSMarek Behún
348*c2502e7bSMarek Behún&spi0 {
349*c2502e7bSMarek Behún	pinctrl-names = "default";
350*c2502e7bSMarek Behún	pinctrl-0 = <&spi0_pins &spi0cs0_pins>;
351*c2502e7bSMarek Behún	status = "okay";
352*c2502e7bSMarek Behún
353*c2502e7bSMarek Behún	spi-nor@0 {
354*c2502e7bSMarek Behún		compatible = "spansion,s25fl164k", "jedec,spi-nor";
355*c2502e7bSMarek Behún		#address-cells = <1>;
356*c2502e7bSMarek Behún		#size-cells = <1>;
357*c2502e7bSMarek Behún		reg = <0>;
358*c2502e7bSMarek Behún		spi-max-frequency = <40000000>;
359*c2502e7bSMarek Behún
360*c2502e7bSMarek Behún		partitions {
361*c2502e7bSMarek Behún			compatible = "fixed-partitions";
362*c2502e7bSMarek Behún			#address-cells = <1>;
363*c2502e7bSMarek Behún			#size-cells = <1>;
364*c2502e7bSMarek Behún
365*c2502e7bSMarek Behún			partition@0 {
366*c2502e7bSMarek Behún				reg = <0x0 0x00100000>;
367*c2502e7bSMarek Behún				label = "U-Boot";
368*c2502e7bSMarek Behún			};
369*c2502e7bSMarek Behún
370*c2502e7bSMarek Behún			partition@100000 {
371*c2502e7bSMarek Behún				reg = <0x00100000 0x00700000>;
372*c2502e7bSMarek Behún				label = "Rescue system";
373*c2502e7bSMarek Behún			};
374*c2502e7bSMarek Behún		};
375*c2502e7bSMarek Behún	};
376*c2502e7bSMarek Behún
377*c2502e7bSMarek Behún	/* MISO, MOSI, SCLK and CS1 are routed to pin header CN11 */
378*c2502e7bSMarek Behún};
379*c2502e7bSMarek Behún
380*c2502e7bSMarek Behún&uart0 {
381*c2502e7bSMarek Behún	/* Pin header CN10 */
382*c2502e7bSMarek Behún	pinctrl-names = "default";
383*c2502e7bSMarek Behún	pinctrl-0 = <&uart0_pins>;
384*c2502e7bSMarek Behún	status = "okay";
385*c2502e7bSMarek Behún};
386*c2502e7bSMarek Behún
387*c2502e7bSMarek Behún&uart1 {
388*c2502e7bSMarek Behún	/* Pin header CN11 */
389*c2502e7bSMarek Behún	pinctrl-names = "default";
390*c2502e7bSMarek Behún	pinctrl-0 = <&uart1_pins>;
391*c2502e7bSMarek Behún	status = "okay";
392*c2502e7bSMarek Behún};
393