1279377Simp/*
2279377Simp * Copyright 2013-2014 Freescale Semiconductor, Inc.
3279377Simp *
4279377Simp * This file is dual-licensed: you can use it either under the terms
5279377Simp * of the GPL or the X11 license, at your option. Note that this dual
6279377Simp * licensing only applies to this file, and not this project as a
7279377Simp * whole.
8279377Simp *
9279377Simp *  a) This file is free software; you can redistribute it and/or
10279377Simp *     modify it under the terms of the GNU General Public License as
11279377Simp *     published by the Free Software Foundation; either version 2 of
12279377Simp *     the License, or (at your option) any later version.
13279377Simp *
14279377Simp *     This file is distributed in the hope that it will be useful,
15279377Simp *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16279377Simp *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17279377Simp *     GNU General Public License for more details.
18279377Simp *
19279377Simp *     You should have received a copy of the GNU General Public
20279377Simp *     License along with this file; if not, write to the Free
21279377Simp *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22279377Simp *     MA 02110-1301 USA
23279377Simp *
24279377Simp * Or, alternatively,
25279377Simp *
26279377Simp *  b) Permission is hereby granted, free of charge, to any person
27279377Simp *     obtaining a copy of this software and associated documentation
28279377Simp *     files (the "Software"), to deal in the Software without
29279377Simp *     restriction, including without limitation the rights to use,
30279377Simp *     copy, modify, merge, publish, distribute, sublicense, and/or
31279377Simp *     sell copies of the Software, and to permit persons to whom the
32279377Simp *     Software is furnished to do so, subject to the following
33279377Simp *     conditions:
34279377Simp *
35279377Simp *     The above copyright notice and this permission notice shall be
36279377Simp *     included in all copies or substantial portions of the Software.
37279377Simp *
38279377Simp *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39279377Simp *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40279377Simp *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41279377Simp *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42279377Simp *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43279377Simp *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44279377Simp *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45279377Simp *     OTHER DEALINGS IN THE SOFTWARE.
46279377Simp */
47279377Simp
48279377Simp/dts-v1/;
49279377Simp#include "ls1021a.dtsi"
50279377Simp
51279377Simp/ {
52279377Simp	model = "LS1021A QDS Board";
53279377Simp
54279377Simp	aliases {
55279377Simp		enet0_rgmii_phy = &rgmii_phy1;
56279377Simp		enet1_rgmii_phy = &rgmii_phy2;
57279377Simp		enet2_rgmii_phy = &rgmii_phy3;
58279377Simp		enet0_sgmii_phy = &sgmii_phy1c;
59279377Simp		enet1_sgmii_phy = &sgmii_phy1d;
60279377Simp	};
61295436Sandrew
62295436Sandrew	sys_mclk: clock-mclk {
63295436Sandrew		compatible = "fixed-clock";
64295436Sandrew		#clock-cells = <0>;
65295436Sandrew		clock-frequency = <24576000>;
66295436Sandrew	};
67295436Sandrew
68295436Sandrew	regulators {
69295436Sandrew		compatible = "simple-bus";
70295436Sandrew		#address-cells = <1>;
71295436Sandrew		#size-cells = <0>;
72295436Sandrew
73295436Sandrew		reg_3p3v: regulator@0 {
74295436Sandrew			compatible = "regulator-fixed";
75295436Sandrew			reg = <0>;
76295436Sandrew			regulator-name = "3P3V";
77295436Sandrew			regulator-min-microvolt = <3300000>;
78295436Sandrew			regulator-max-microvolt = <3300000>;
79295436Sandrew			regulator-always-on;
80295436Sandrew		};
81295436Sandrew	};
82295436Sandrew
83295436Sandrew	sound {
84295436Sandrew		compatible = "simple-audio-card";
85295436Sandrew		simple-audio-card,format = "i2s";
86295436Sandrew		simple-audio-card,widgets =
87295436Sandrew			"Microphone", "Microphone Jack",
88295436Sandrew			"Headphone", "Headphone Jack",
89295436Sandrew			"Speaker", "Speaker Ext",
90295436Sandrew			"Line", "Line In Jack";
91295436Sandrew		simple-audio-card,routing =
92295436Sandrew			"MIC_IN", "Microphone Jack",
93295436Sandrew			"Microphone Jack", "Mic Bias",
94295436Sandrew			"LINE_IN", "Line In Jack",
95295436Sandrew			"Headphone Jack", "HP_OUT",
96295436Sandrew			"Speaker Ext", "LINE_OUT";
97295436Sandrew
98295436Sandrew		simple-audio-card,cpu {
99295436Sandrew			sound-dai = <&sai2>;
100295436Sandrew			frame-master;
101295436Sandrew			bitclock-master;
102295436Sandrew		};
103295436Sandrew
104295436Sandrew		simple-audio-card,codec {
105295436Sandrew			sound-dai = <&codec>;
106295436Sandrew			frame-master;
107295436Sandrew			bitclock-master;
108295436Sandrew		};
109295436Sandrew	};
110279377Simp};
111279377Simp
112279377Simp&dspi0 {
113279377Simp	bus-num = <0>;
114279377Simp	status = "okay";
115279377Simp
116279377Simp	dspiflash: at45db021d@0 {
117279377Simp		#address-cells = <1>;
118279377Simp		#size-cells = <1>;
119279377Simp		compatible = "atmel,at45db021d", "atmel,at45", "atmel,dataflash";
120279377Simp		spi-max-frequency = <16000000>;
121279377Simp		spi-cpol;
122279377Simp		spi-cpha;
123279377Simp		reg = <0>;
124279377Simp	};
125279377Simp};
126279377Simp
127295436Sandrew&enet0 {
128295436Sandrew	tbi-handle = <&tbi0>;
129295436Sandrew	phy-handle = <&sgmii_phy1c>;
130295436Sandrew	phy-connection-type = "sgmii";
131295436Sandrew	status = "okay";
132295436Sandrew};
133295436Sandrew
134295436Sandrew&enet1 {
135295436Sandrew	tbi-handle = <&tbi0>;
136295436Sandrew	phy-handle = <&sgmii_phy1d>;
137295436Sandrew	phy-connection-type = "sgmii";
138295436Sandrew	status = "okay";
139295436Sandrew};
140295436Sandrew
141295436Sandrew&enet2 {
142295436Sandrew	phy-handle = <&rgmii_phy3>;
143295436Sandrew	phy-connection-type = "rgmii-id";
144295436Sandrew	status = "okay";
145295436Sandrew};
146295436Sandrew
147279377Simp&i2c0 {
148279377Simp	status = "okay";
149279377Simp
150279377Simp	pca9547: mux@77 {
151295436Sandrew		compatible = "nxp,pca9547";
152279377Simp		reg = <0x77>;
153279377Simp		#address-cells = <1>;
154279377Simp		#size-cells = <0>;
155279377Simp
156279377Simp		i2c@0 {
157279377Simp			#address-cells = <1>;
158279377Simp			#size-cells = <0>;
159279377Simp			reg = <0x0>;
160279377Simp
161279377Simp			ds3232: rtc@68 {
162279377Simp				compatible = "dallas,ds3232";
163279377Simp				reg = <0x68>;
164279377Simp				interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
165279377Simp			};
166279377Simp		};
167279377Simp
168279377Simp		i2c@2 {
169279377Simp			#address-cells = <1>;
170279377Simp			#size-cells = <0>;
171279377Simp			reg = <0x2>;
172279377Simp
173279377Simp			ina220@40 {
174279377Simp				compatible = "ti,ina220";
175279377Simp				reg = <0x40>;
176279377Simp				shunt-resistor = <1000>;
177279377Simp			};
178279377Simp
179279377Simp			ina220@41 {
180279377Simp				compatible = "ti,ina220";
181279377Simp				reg = <0x41>;
182279377Simp				shunt-resistor = <1000>;
183279377Simp			};
184279377Simp		};
185279377Simp
186279377Simp		i2c@3 {
187279377Simp			#address-cells = <1>;
188279377Simp			#size-cells = <0>;
189279377Simp			reg = <0x3>;
190279377Simp
191279377Simp			eeprom@56 {
192279377Simp				compatible = "atmel,24c512";
193279377Simp				reg = <0x56>;
194279377Simp			};
195279377Simp
196279377Simp			eeprom@57 {
197279377Simp				compatible = "atmel,24c512";
198279377Simp				reg = <0x57>;
199279377Simp			};
200279377Simp
201279377Simp			adt7461a@4c {
202279377Simp				compatible = "adi,adt7461a";
203279377Simp				reg = <0x4c>;
204279377Simp			};
205279377Simp		};
206295436Sandrew
207295436Sandrew		i2c@4 {
208295436Sandrew			#address-cells = <1>;
209295436Sandrew			#size-cells = <0>;
210295436Sandrew			reg = <0x4>;
211295436Sandrew
212295436Sandrew			codec: sgtl5000@2a {
213295436Sandrew				#sound-dai-cells = <0>;
214295436Sandrew				compatible = "fsl,sgtl5000";
215295436Sandrew				reg = <0x2a>;
216295436Sandrew				VDDA-supply = <&reg_3p3v>;
217295436Sandrew				VDDIO-supply = <&reg_3p3v>;
218295436Sandrew				clocks = <&sys_mclk 1>;
219295436Sandrew			};
220295436Sandrew		};
221279377Simp	};
222279377Simp};
223279377Simp
224279377Simp&ifc {
225279377Simp	#address-cells = <2>;
226279377Simp	#size-cells = <1>;
227279377Simp	/* NOR, NAND Flashes and FPGA on board */
228279377Simp	ranges = <0x0 0x0 0x0 0x60000000 0x08000000
229279377Simp		  0x2 0x0 0x0 0x7e800000 0x00010000
230279377Simp		  0x3 0x0 0x0 0x7fb00000 0x00000100>;
231279377Simp	status = "okay";
232279377Simp
233279377Simp	nor@0,0 {
234279377Simp		#address-cells = <1>;
235279377Simp		#size-cells = <1>;
236279377Simp		compatible = "cfi-flash";
237279377Simp		reg = <0x0 0x0 0x8000000>;
238279377Simp		bank-width = <2>;
239279377Simp		device-width = <1>;
240279377Simp	};
241279377Simp
242279377Simp	fpga: board-control@3,0 {
243279377Simp		#address-cells = <1>;
244279377Simp		#size-cells = <1>;
245279377Simp		compatible = "simple-bus";
246279377Simp		reg = <0x3 0x0 0x0000100>;
247279377Simp		bank-width = <1>;
248279377Simp		device-width = <1>;
249279377Simp		ranges = <0 3 0 0x100>;
250279377Simp
251279377Simp		mdio-mux-emi1 {
252279377Simp			compatible = "mdio-mux-mmioreg";
253279377Simp			mdio-parent-bus = <&mdio0>;
254279377Simp			#address-cells = <1>;
255279377Simp			#size-cells = <0>;
256279377Simp			reg = <0x54 1>; /* BRDCFG4 */
257279377Simp			mux-mask = <0xe0>; /* EMI1[2:0] */
258279377Simp
259279377Simp			/* Onboard PHYs */
260279377Simp			ls1021amdio0: mdio@0 {
261279377Simp				reg = <0>;
262279377Simp				#address-cells = <1>;
263279377Simp				#size-cells = <0>;
264279377Simp				rgmii_phy1: ethernet-phy@1 {
265279377Simp					reg = <0x1>;
266279377Simp				};
267279377Simp			};
268279377Simp
269279377Simp			ls1021amdio1: mdio@20 {
270279377Simp				reg = <0x20>;
271279377Simp				#address-cells = <1>;
272279377Simp				#size-cells = <0>;
273279377Simp				rgmii_phy2: ethernet-phy@2 {
274279377Simp					reg = <0x2>;
275279377Simp				};
276279377Simp			};
277279377Simp
278279377Simp			ls1021amdio2: mdio@40 {
279279377Simp				reg = <0x40>;
280279377Simp				#address-cells = <1>;
281279377Simp				#size-cells = <0>;
282279377Simp				rgmii_phy3: ethernet-phy@3 {
283279377Simp					reg = <0x3>;
284279377Simp				};
285279377Simp			};
286279377Simp
287279377Simp			ls1021amdio3: mdio@60 {
288279377Simp				reg = <0x60>;
289279377Simp				#address-cells = <1>;
290279377Simp				#size-cells = <0>;
291279377Simp				sgmii_phy1c: ethernet-phy@1c {
292279377Simp					reg = <0x1c>;
293279377Simp				};
294279377Simp			};
295279377Simp
296279377Simp			ls1021amdio4: mdio@80 {
297279377Simp				reg = <0x80>;
298279377Simp				#address-cells = <1>;
299279377Simp				#size-cells = <0>;
300279377Simp				sgmii_phy1d: ethernet-phy@1d {
301279377Simp					reg = <0x1d>;
302279377Simp				};
303279377Simp			};
304279377Simp		};
305279377Simp	};
306279377Simp};
307279377Simp
308279377Simp&lpuart0 {
309279377Simp	status = "okay";
310279377Simp};
311279377Simp
312279377Simp&mdio0 {
313279377Simp	tbi0: tbi-phy@8 {
314279377Simp		reg = <0x8>;
315279377Simp		device_type = "tbi-phy";
316279377Simp	};
317279377Simp};
318279377Simp
319295436Sandrew&sai2 {
320295436Sandrew	status = "okay";
321295436Sandrew};
322295436Sandrew
323295436Sandrew&sata {
324295436Sandrew	status = "okay";
325295436Sandrew};
326295436Sandrew
327279377Simp&uart0 {
328279377Simp	status = "okay";
329279377Simp};
330279377Simp
331279377Simp&uart1 {
332279377Simp	status = "okay";
333279377Simp};
334