xref: /rk3399_rockchip-uboot/arch/arm/dts/armada-xp-maxbcm.dts (revision f46c25583a73042edf432b209ee4b93bc3f7e762)
1*18c1272fSStefan Roese/*
2*18c1272fSStefan Roese * Device Tree file for Marvell Armada XP maxbcm board
3*18c1272fSStefan Roese *
4*18c1272fSStefan Roese * Copyright (C) 2013-2014 Marvell
5*18c1272fSStefan Roese *
6*18c1272fSStefan Roese * Lior Amsalem <alior@marvell.com>
7*18c1272fSStefan Roese * Gregory CLEMENT <gregory.clement@free-electrons.com>
8*18c1272fSStefan Roese * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9*18c1272fSStefan Roese *
10*18c1272fSStefan Roese * This file is dual-licensed: you can use it either under the terms
11*18c1272fSStefan Roese * of the GPL or the X11 license, at your option. Note that this dual
12*18c1272fSStefan Roese * licensing only applies to this file, and not this project as a
13*18c1272fSStefan Roese * whole.
14*18c1272fSStefan Roese *
15*18c1272fSStefan Roese *  a) This file is free software; you can redistribute it and/or
16*18c1272fSStefan Roese *     modify it under the terms of the GNU General Public License as
17*18c1272fSStefan Roese *     published by the Free Software Foundation; either version 2 of the
18*18c1272fSStefan Roese *     License, or (at your option) any later version.
19*18c1272fSStefan Roese *
20*18c1272fSStefan Roese *     This file is distributed in the hope that it will be useful
21*18c1272fSStefan Roese *     but WITHOUT ANY WARRANTY; without even the implied warranty of
22*18c1272fSStefan Roese *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23*18c1272fSStefan Roese *     GNU General Public License for more details.
24*18c1272fSStefan Roese *
25*18c1272fSStefan Roese * Or, alternatively
26*18c1272fSStefan Roese *
27*18c1272fSStefan Roese *  b) Permission is hereby granted, free of charge, to any person
28*18c1272fSStefan Roese *     obtaining a copy of this software and associated documentation
29*18c1272fSStefan Roese *     files (the "Software"), to deal in the Software without
30*18c1272fSStefan Roese *     restriction, including without limitation the rights to use
31*18c1272fSStefan Roese *     copy, modify, merge, publish, distribute, sublicense, and/or
32*18c1272fSStefan Roese *     sell copies of the Software, and to permit persons to whom the
33*18c1272fSStefan Roese *     Software is furnished to do so, subject to the following
34*18c1272fSStefan Roese *     conditions:
35*18c1272fSStefan Roese *
36*18c1272fSStefan Roese *     The above copyright notice and this permission notice shall be
37*18c1272fSStefan Roese *     included in all copies or substantial portions of the Software.
38*18c1272fSStefan Roese *
39*18c1272fSStefan Roese *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
40*18c1272fSStefan Roese *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
41*18c1272fSStefan Roese *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42*18c1272fSStefan Roese *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
43*18c1272fSStefan Roese *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
44*18c1272fSStefan Roese *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45*18c1272fSStefan Roese *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
46*18c1272fSStefan Roese *     OTHER DEALINGS IN THE SOFTWARE.
47*18c1272fSStefan Roese *
48*18c1272fSStefan Roese * Note: this Device Tree assumes that the bootloader has remapped the
49*18c1272fSStefan Roese * internal registers to 0xf1000000 (instead of the default
50*18c1272fSStefan Roese * 0xd0000000). The 0xf1000000 is the default used by the recent,
51*18c1272fSStefan Roese * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
52*18c1272fSStefan Roese * boards were delivered with an older version of the bootloader that
53*18c1272fSStefan Roese * left internal registers mapped at 0xd0000000. If you are in this
54*18c1272fSStefan Roese * situation, you should either update your bootloader (preferred
55*18c1272fSStefan Roese * solution) or the below Device Tree should be adjusted.
56*18c1272fSStefan Roese */
57*18c1272fSStefan Roese
58*18c1272fSStefan Roese/dts-v1/;
59*18c1272fSStefan Roese#include <dt-bindings/gpio/gpio.h>
60*18c1272fSStefan Roese#include "armada-xp-mv78460.dtsi"
61*18c1272fSStefan Roese
62*18c1272fSStefan Roese/ {
63*18c1272fSStefan Roese	model = "Marvell Armada XP MAXBCM";
64*18c1272fSStefan Roese	compatible = "marvell,axp-gp", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
65*18c1272fSStefan Roese
66*18c1272fSStefan Roese	chosen {
67*18c1272fSStefan Roese		stdout-path = "serial0:115200n8";
68*18c1272fSStefan Roese	};
69*18c1272fSStefan Roese
70*18c1272fSStefan Roese	aliases {
71*18c1272fSStefan Roese		spi0 = &spi0;
72*18c1272fSStefan Roese	};
73*18c1272fSStefan Roese
74*18c1272fSStefan Roese	memory {
75*18c1272fSStefan Roese		device_type = "memory";
76*18c1272fSStefan Roese		/*
77*18c1272fSStefan Roese                 * 8 GB of plug-in RAM modules by default.The amount
78*18c1272fSStefan Roese                 * of memory available can be changed by the
79*18c1272fSStefan Roese                 * bootloader according the size of the module
80*18c1272fSStefan Roese                 * actually plugged. However, memory between
81*18c1272fSStefan Roese                 * 0xF0000000 to 0xFFFFFFFF cannot be used, as it is
82*18c1272fSStefan Roese                 * the address range used for I/O (internal registers,
83*18c1272fSStefan Roese                 * MBus windows).
84*18c1272fSStefan Roese		 */
85*18c1272fSStefan Roese		reg = <0x00000000 0x00000000 0x00000000 0xf0000000>,
86*18c1272fSStefan Roese		      <0x00000001 0x00000000 0x00000001 0x00000000>;
87*18c1272fSStefan Roese	};
88*18c1272fSStefan Roese
89*18c1272fSStefan Roese	cpus {
90*18c1272fSStefan Roese		pm_pic {
91*18c1272fSStefan Roese			ctrl-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>,
92*18c1272fSStefan Roese				     <&gpio0 17 GPIO_ACTIVE_LOW>,
93*18c1272fSStefan Roese				     <&gpio0 18 GPIO_ACTIVE_LOW>;
94*18c1272fSStefan Roese		};
95*18c1272fSStefan Roese	};
96*18c1272fSStefan Roese
97*18c1272fSStefan Roese	soc {
98*18c1272fSStefan Roese		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
99*18c1272fSStefan Roese			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
100*18c1272fSStefan Roese			  MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000>;
101*18c1272fSStefan Roese
102*18c1272fSStefan Roese		devbus-bootcs {
103*18c1272fSStefan Roese			status = "okay";
104*18c1272fSStefan Roese
105*18c1272fSStefan Roese			/* Device Bus parameters are required */
106*18c1272fSStefan Roese
107*18c1272fSStefan Roese			/* Read parameters */
108*18c1272fSStefan Roese			devbus,bus-width    = <16>;
109*18c1272fSStefan Roese			devbus,turn-off-ps  = <60000>;
110*18c1272fSStefan Roese			devbus,badr-skew-ps = <0>;
111*18c1272fSStefan Roese			devbus,acc-first-ps = <124000>;
112*18c1272fSStefan Roese			devbus,acc-next-ps  = <248000>;
113*18c1272fSStefan Roese			devbus,rd-setup-ps  = <0>;
114*18c1272fSStefan Roese			devbus,rd-hold-ps   = <0>;
115*18c1272fSStefan Roese
116*18c1272fSStefan Roese			/* Write parameters */
117*18c1272fSStefan Roese			devbus,sync-enable = <0>;
118*18c1272fSStefan Roese			devbus,wr-high-ps  = <60000>;
119*18c1272fSStefan Roese			devbus,wr-low-ps   = <60000>;
120*18c1272fSStefan Roese			devbus,ale-wr-ps   = <60000>;
121*18c1272fSStefan Roese
122*18c1272fSStefan Roese			/* NOR 16 MiB */
123*18c1272fSStefan Roese			nor@0 {
124*18c1272fSStefan Roese				compatible = "cfi-flash";
125*18c1272fSStefan Roese				reg = <0 0x1000000>;
126*18c1272fSStefan Roese				bank-width = <2>;
127*18c1272fSStefan Roese			};
128*18c1272fSStefan Roese		};
129*18c1272fSStefan Roese
130*18c1272fSStefan Roese		pcie-controller {
131*18c1272fSStefan Roese			status = "okay";
132*18c1272fSStefan Roese
133*18c1272fSStefan Roese			/*
134*18c1272fSStefan Roese			 * The 3 slots are physically present as
135*18c1272fSStefan Roese			 * standard PCIe slots on the board.
136*18c1272fSStefan Roese			 */
137*18c1272fSStefan Roese			pcie@1,0 {
138*18c1272fSStefan Roese				/* Port 0, Lane 0 */
139*18c1272fSStefan Roese				status = "okay";
140*18c1272fSStefan Roese			};
141*18c1272fSStefan Roese			pcie@9,0 {
142*18c1272fSStefan Roese				/* Port 2, Lane 0 */
143*18c1272fSStefan Roese				status = "okay";
144*18c1272fSStefan Roese			};
145*18c1272fSStefan Roese			pcie@10,0 {
146*18c1272fSStefan Roese				/* Port 3, Lane 0 */
147*18c1272fSStefan Roese				status = "okay";
148*18c1272fSStefan Roese			};
149*18c1272fSStefan Roese		};
150*18c1272fSStefan Roese
151*18c1272fSStefan Roese		internal-regs {
152*18c1272fSStefan Roese			serial@12000 {
153*18c1272fSStefan Roese				status = "okay";
154*18c1272fSStefan Roese				u-boot,dm-pre-reloc;
155*18c1272fSStefan Roese			};
156*18c1272fSStefan Roese			serial@12100 {
157*18c1272fSStefan Roese				status = "okay";
158*18c1272fSStefan Roese			};
159*18c1272fSStefan Roese			serial@12200 {
160*18c1272fSStefan Roese				status = "okay";
161*18c1272fSStefan Roese			};
162*18c1272fSStefan Roese			serial@12300 {
163*18c1272fSStefan Roese				status = "okay";
164*18c1272fSStefan Roese			};
165*18c1272fSStefan Roese			pinctrl {
166*18c1272fSStefan Roese				pinctrl-0 = <&pic_pins>;
167*18c1272fSStefan Roese				pinctrl-names = "default";
168*18c1272fSStefan Roese				pic_pins: pic-pins-0 {
169*18c1272fSStefan Roese					marvell,pins = "mpp16", "mpp17",
170*18c1272fSStefan Roese						       "mpp18";
171*18c1272fSStefan Roese					marvell,function = "gpio";
172*18c1272fSStefan Roese				};
173*18c1272fSStefan Roese			};
174*18c1272fSStefan Roese			sata@a0000 {
175*18c1272fSStefan Roese				nr-ports = <2>;
176*18c1272fSStefan Roese				status = "okay";
177*18c1272fSStefan Roese			};
178*18c1272fSStefan Roese
179*18c1272fSStefan Roese			mdio {
180*18c1272fSStefan Roese				phy0: ethernet-phy@0 {
181*18c1272fSStefan Roese					reg = <0>;
182*18c1272fSStefan Roese				};
183*18c1272fSStefan Roese
184*18c1272fSStefan Roese				phy1: ethernet-phy@1 {
185*18c1272fSStefan Roese					reg = <1>;
186*18c1272fSStefan Roese				};
187*18c1272fSStefan Roese
188*18c1272fSStefan Roese				phy2: ethernet-phy@2 {
189*18c1272fSStefan Roese					reg = <2>;
190*18c1272fSStefan Roese				};
191*18c1272fSStefan Roese
192*18c1272fSStefan Roese				phy3: ethernet-phy@3 {
193*18c1272fSStefan Roese					reg = <3>;
194*18c1272fSStefan Roese				};
195*18c1272fSStefan Roese			};
196*18c1272fSStefan Roese
197*18c1272fSStefan Roese			ethernet@70000 {
198*18c1272fSStefan Roese				status = "okay";
199*18c1272fSStefan Roese				phy = <&phy0>;
200*18c1272fSStefan Roese				phy-mode = "sgmii";
201*18c1272fSStefan Roese			};
202*18c1272fSStefan Roese			ethernet@74000 {
203*18c1272fSStefan Roese				status = "okay";
204*18c1272fSStefan Roese				phy = <&phy1>;
205*18c1272fSStefan Roese				phy-mode = "sgmii";
206*18c1272fSStefan Roese			};
207*18c1272fSStefan Roese			ethernet@30000 {
208*18c1272fSStefan Roese				status = "okay";
209*18c1272fSStefan Roese				phy = <&phy2>;
210*18c1272fSStefan Roese				phy-mode = "sgmii";
211*18c1272fSStefan Roese			};
212*18c1272fSStefan Roese			ethernet@34000 {
213*18c1272fSStefan Roese				status = "okay";
214*18c1272fSStefan Roese				phy = <&phy3>;
215*18c1272fSStefan Roese				phy-mode = "sgmii";
216*18c1272fSStefan Roese			};
217*18c1272fSStefan Roese
218*18c1272fSStefan Roese			/* Front-side USB slot */
219*18c1272fSStefan Roese			usb@50000 {
220*18c1272fSStefan Roese				status = "okay";
221*18c1272fSStefan Roese			};
222*18c1272fSStefan Roese
223*18c1272fSStefan Roese			/* Back-side USB slot */
224*18c1272fSStefan Roese			usb@51000 {
225*18c1272fSStefan Roese				status = "okay";
226*18c1272fSStefan Roese			};
227*18c1272fSStefan Roese
228*18c1272fSStefan Roese			spi0: spi@10600 {
229*18c1272fSStefan Roese				status = "okay";
230*18c1272fSStefan Roese
231*18c1272fSStefan Roese				spi-flash@0 {
232*18c1272fSStefan Roese					#address-cells = <1>;
233*18c1272fSStefan Roese					#size-cells = <1>;
234*18c1272fSStefan Roese					compatible = "n25q128a13", "jedec,spi-nor";
235*18c1272fSStefan Roese					reg = <0>; /* Chip select 0 */
236*18c1272fSStefan Roese					spi-max-frequency = <108000000>;
237*18c1272fSStefan Roese				};
238*18c1272fSStefan Roese			};
239*18c1272fSStefan Roese
240*18c1272fSStefan Roese			nand@d0000 {
241*18c1272fSStefan Roese				status = "okay";
242*18c1272fSStefan Roese				num-cs = <1>;
243*18c1272fSStefan Roese				marvell,nand-keep-config;
244*18c1272fSStefan Roese				marvell,nand-enable-arbiter;
245*18c1272fSStefan Roese				nand-on-flash-bbt;
246*18c1272fSStefan Roese			};
247*18c1272fSStefan Roese		};
248*18c1272fSStefan Roese	};
249*18c1272fSStefan Roese};
250