1/*
2 * Device Tree file for Globalscale Marvell ESPRESSOBin Board
3 * Copyright (C) 2016 Marvell
4 *
5 * Romain Perier <romain.perier@free-electrons.com>
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 *  a) This file is free software; you can redistribute it and/or
13 *     modify it under the terms of the GNU General Public License as
14 *     published by the Free Software Foundation; either version 2 of the
15 *     License, or (at your option) any later version.
16 *
17 *     This file is distributed in the hope that it will be useful,
18 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 *     GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 *  b) Permission is hereby granted, free of charge, to any person
25 *     obtaining a copy of this software and associated documentation
26 *     files (the "Software"), to deal in the Software without
27 *     restriction, including without limitation the rights to use,
28 *     copy, modify, merge, publish, distribute, sublicense, and/or
29 *     sell copies of the Software, and to permit persons to whom the
30 *     Software is furnished to do so, subject to the following
31 *     conditions:
32 *
33 *     The above copyright notice and this permission notice shall be
34 *     included in all copies or substantial portions of the Software.
35 *
36 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 *     OTHER DEALINGS IN THE SOFTWARE.
44 */
45
46/dts-v1/;
47
48#include "armada-372x.dtsi"
49
50/ {
51	model = "Globalscale Marvell ESPRESSOBin Board";
52	compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
53
54	chosen {
55		stdout-path = "serial0:115200n8";
56	};
57
58	memory@0 {
59		device_type = "memory";
60		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
61	};
62};
63
64/* J9 */
65&pcie0 {
66	status = "okay";
67};
68
69/* J6 */
70&sata {
71	status = "okay";
72};
73
74/* Exported on the micro USB connector J5 through an FTDI */
75&uart0 {
76	status = "okay";
77};
78
79/* J7 */
80&usb3 {
81	status = "okay";
82};
83
84/* J8 */
85&usb2 {
86	status = "okay";
87};
88
89&mdio {
90	switch0: switch0@1 {
91		compatible = "marvell,mv88e6085";
92		#address-cells = <1>;
93		#size-cells = <0>;
94		reg = <1>;
95
96		dsa,member = <0 0>;
97
98		ports {
99			#address-cells = <1>;
100			#size-cells = <0>;
101
102			port@0 {
103				reg = <0>;
104				label = "cpu";
105				ethernet = <&eth0>;
106			};
107
108			port@1 {
109				reg = <1>;
110				label = "wan";
111				phy-handle = <&switch0phy0>;
112			};
113
114			port@2 {
115				reg = <2>;
116				label = "lan0";
117				phy-handle = <&switch0phy1>;
118			};
119
120			port@3 {
121				reg = <3>;
122				label = "lan1";
123				phy-handle = <&switch0phy2>;
124			};
125
126		};
127
128		mdio {
129			#address-cells = <1>;
130			#size-cells = <0>;
131
132			switch0phy0: switch0phy0@11 {
133				reg = <0x11>;
134			};
135			switch0phy1: switch0phy1@12 {
136				reg = <0x12>;
137			};
138			switch0phy2: switch0phy2@13 {
139				reg = <0x13>;
140			};
141		};
142	};
143};
144
145&eth0 {
146	phy-mode = "rgmii-id";
147	status = "okay";
148
149	fixed-link {
150		speed = <1000>;
151		full-duplex;
152	};
153};
154