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