1/*
2 * Device Tree file for Marvell Armada 370 evaluation board
3 * (DB-88F6710-BP-DDR3)
4 *
5 *  Copyright (C) 2012 Marvell
6 *
7 * Lior Amsalem <alior@marvell.com>
8 * Gregory CLEMENT <gregory.clement@free-electrons.com>
9 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 *
11 * This file is dual-licensed: you can use it either under the terms
12 * of the GPL or the X11 license, at your option. Note that this dual
13 * licensing only applies to this file, and not this project as a
14 * whole.
15 *
16 *  a) This file is free software; you can redistribute it and/or
17 *     modify it under the terms of the GNU General Public License as
18 *     published by the Free Software Foundation; either version 2 of the
19 *     License, or (at your option) any later version.
20 *
21 *     This file is distributed in the hope that it will be useful
22 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
23 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 *     GNU General Public License for more details.
25 *
26 * Or, alternatively
27 *
28 *  b) Permission is hereby granted, free of charge, to any person
29 *     obtaining a copy of this software and associated documentation
30 *     files (the "Software"), to deal in the Software without
31 *     restriction, including without limitation the rights to use
32 *     copy, modify, merge, publish, distribute, sublicense, and/or
33 *     sell copies of the Software, and to permit persons to whom the
34 *     Software is furnished to do so, subject to the following
35 *     conditions:
36 *
37 *     The above copyright notice and this permission notice shall be
38 *     included in all copies or substantial portions of the Software.
39 *
40 *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
41 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
45 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 *     OTHER DEALINGS IN THE SOFTWARE.
48 *
49 * Note: this Device Tree assumes that the bootloader has remapped the
50 * internal registers to 0xf1000000 (instead of the default
51 * 0xd0000000). The 0xf1000000 is the default used by the recent,
52 * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
53 * boards were delivered with an older version of the bootloader that
54 * left internal registers mapped at 0xd0000000. If you are in this
55 * situation, you should either update your bootloader (preferred
56 * solution) or the below Device Tree should be adjusted.
57 */
58
59/dts-v1/;
60#include "armada-370.dtsi"
61
62/ {
63	model = "Marvell Armada 370 Evaluation Board";
64	compatible = "marvell,a370-db", "marvell,armada370", "marvell,armada-370-xp";
65
66	chosen {
67		stdout-path = "serial0:115200n8";
68	};
69
70	memory {
71		device_type = "memory";
72		reg = <0x00000000 0x40000000>; /* 1 GB */
73	};
74
75	soc {
76		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
77			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
78			  MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
79
80		internal-regs {
81			serial@12000 {
82				status = "okay";
83			};
84			sata@a0000 {
85				nr-ports = <2>;
86				status = "okay";
87			};
88
89			mdio {
90				pinctrl-0 = <&mdio_pins>;
91				pinctrl-names = "default";
92				phy0: ethernet-phy@0 {
93					reg = <0>;
94				};
95
96				phy1: ethernet-phy@1 {
97					reg = <1>;
98				};
99			};
100
101			ethernet@70000 {
102				pinctrl-0 = <&ge0_rgmii_pins>;
103				pinctrl-names = "default";
104				status = "okay";
105				phy = <&phy0>;
106				phy-mode = "rgmii-id";
107			};
108			ethernet@74000 {
109				pinctrl-0 = <&ge1_rgmii_pins>;
110				pinctrl-names = "default";
111				status = "okay";
112				phy = <&phy1>;
113				phy-mode = "rgmii-id";
114			};
115
116			i2c@11000 {
117				pinctrl-0 = <&i2c0_pins>;
118				pinctrl-names = "default";
119				clock-frequency = <100000>;
120				status = "okay";
121				audio_codec: audio-codec@4a {
122					#sound-dai-cells = <0>;
123					compatible = "cirrus,cs42l51";
124					reg = <0x4a>;
125				};
126			};
127
128			audio-controller@30000 {
129				pinctrl-0 = <&i2s_pins2>;
130				pinctrl-names = "default";
131				status = "okay";
132			};
133
134			mvsdio@d4000 {
135				pinctrl-0 = <&sdio_pins1>;
136				pinctrl-names = "default";
137				/*
138				 * This device is disabled by default, because
139				 * using the SD card connector requires
140				 * changing the default CON40 connector
141				 * "DB-88F6710_MPP_2xRGMII_DEVICE_Jumper" to a
142				 * different connector
143				 * "DB-88F6710_MPP_RGMII_SD_Jumper".
144				 */
145				status = "disabled";
146				/* No CD or WP GPIOs */
147				broken-cd;
148			};
149
150			usb@50000 {
151				status = "okay";
152			};
153
154			usb@51000 {
155				status = "okay";
156			};
157
158			spi0: spi@10600 {
159				pinctrl-0 = <&spi0_pins2>;
160				pinctrl-names = "default";
161				status = "okay";
162
163				spi-flash@0 {
164					#address-cells = <1>;
165					#size-cells = <1>;
166					compatible = "mx25l25635e", "jedec,spi-nor";
167					reg = <0>; /* Chip select 0 */
168					spi-max-frequency = <50000000>;
169				};
170			};
171		};
172
173		pcie-controller {
174			status = "okay";
175			/*
176			 * The two PCIe units are accessible through
177			 * both standard PCIe slots and mini-PCIe
178			 * slots on the board.
179			 */
180			pcie@1,0 {
181				/* Port 0, Lane 0 */
182				status = "okay";
183			};
184
185			pcie@2,0 {
186				/* Port 1, Lane 0 */
187				status = "okay";
188			};
189		};
190	};
191
192	sound {
193		compatible = "simple-audio-card";
194		simple-audio-card,name = "Armada 370 DB Audio";
195		simple-audio-card,mclk-fs = <256>;
196		simple-audio-card,widgets =
197			"Headphone", "Out Jack",
198			"Line", "In Jack";
199		simple-audio-card,routing =
200			"Out Jack", "HPL",
201			"Out Jack", "HPR",
202			"AIN1L", "In Jack",
203			"AIN1L", "In Jack";
204		status = "okay";
205
206		simple-audio-card,dai-link@0 {
207			format = "i2s";
208			cpu {
209				sound-dai = <&audio_controller 0>;
210			};
211
212			codec {
213				sound-dai = <&audio_codec>;
214			};
215		};
216
217		simple-audio-card,dai-link@1 {
218			format = "i2s";
219			cpu {
220				sound-dai = <&audio_controller 1>;
221			};
222
223			codec {
224				sound-dai = <&spdif_out>;
225			};
226		};
227
228		simple-audio-card,dai-link@2 {
229			format = "i2s";
230			cpu {
231				sound-dai = <&audio_controller 1>;
232			};
233
234			codec {
235				sound-dai = <&spdif_in>;
236			};
237		};
238	};
239
240	spdif_out: spdif-out {
241		#sound-dai-cells = <0>;
242		compatible = "linux,spdif-dit";
243	};
244
245	spdif_in: spdif-in {
246		#sound-dai-cells = <0>;
247		compatible = "linux,spdif-dir";
248	};
249};
250