1/*
2 * Device Tree file for Marvell Armada 3720 development board
3 * (DB-88F3720-DDR3)
4 * Copyright (C) 2016 Marvell
5 *
6 * Gregory CLEMENT <gregory.clement@free-electrons.com>
7 *
8 * This file is dual-licensed: you can use it either under the terms
9 * of the GPL or the X11 license, at your option. Note that this dual
10 * licensing only applies to this file, and not this project as a
11 * whole.
12 *
13 *  a) This file is free software; you can redistribute it and/or
14 *     modify it under the terms of the GNU General Public License as
15 *     published by the Free Software Foundation; either version 2 of the
16 *     License, or (at your option) any later version.
17 *
18 *     This file is distributed in the hope that it will be useful,
19 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
20 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 *     GNU General Public License for more details.
22 *
23 * Or, alternatively,
24 *
25 *  b) Permission is hereby granted, free of charge, to any person
26 *     obtaining a copy of this software and associated documentation
27 *     files (the "Software"), to deal in the Software without
28 *     restriction, including without limitation the rights to use,
29 *     copy, modify, merge, publish, distribute, sublicense, and/or
30 *     sell copies of the Software, and to permit persons to whom the
31 *     Software is furnished to do so, subject to the following
32 *     conditions:
33 *
34 *     The above copyright notice and this permission notice shall be
35 *     included in all copies or substantial portions of the Software.
36 *
37 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 *     OTHER DEALINGS IN THE SOFTWARE.
45 *
46 * This file is compatible with the version 1.4 and the version 2.0 of
47 * the board, however the CON numbers are different between the 2
48 * version
49 */
50
51/dts-v1/;
52
53#include <dt-bindings/gpio/gpio.h>
54#include "armada-372x.dtsi"
55
56/ {
57	model = "Marvell Armada 3720 Development Board DB-88F3720-DDR3";
58	compatible = "marvell,armada-3720-db", "marvell,armada3720", "marvell,armada3710";
59
60	chosen {
61		stdout-path = "serial0:115200n8";
62	};
63
64	memory@0 {
65		device_type = "memory";
66		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
67	};
68
69	exp_usb3_vbus: usb3-vbus {
70		compatible = "regulator-fixed";
71		regulator-name = "usb3-vbus";
72		regulator-min-microvolt = <5000000>;
73		regulator-max-microvolt = <5000000>;
74		enable-active-high;
75		regulator-always-on;
76		gpio = <&gpio_exp 1 GPIO_ACTIVE_HIGH>;
77	};
78
79	usb3_phy: usb3-phy {
80		compatible = "usb-nop-xceiv";
81		vcc-supply = <&exp_usb3_vbus>;
82	};
83
84	vcc_sd_reg1: regulator {
85		compatible = "regulator-gpio";
86		regulator-name = "vcc_sd1";
87		regulator-min-microvolt = <1800000>;
88		regulator-max-microvolt = <3300000>;
89		regulator-boot-on;
90
91		gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
92		gpios-states = <0>;
93		states = <1800000 0x1
94			  3300000 0x0>;
95		enable-active-high;
96	};
97};
98
99/* Gigabit module on CON19(V2.0)/CON21(V1.4) */
100&eth0 {
101	pinctrl-names = "default";
102	pinctrl-0 = <&rgmii_pins>;
103	phy-mode = "rgmii-id";
104	phy = <&phy0>;
105	status = "okay";
106};
107
108/* Gigabit module on CON18(V2.0)/CON20(V1.4) */
109&eth1 {
110	phy-mode = "sgmii";
111	phy = <&phy1>;
112	status = "okay";
113};
114
115&i2c0 {
116	pinctrl-names = "default";
117	pinctrl-0 = <&i2c1_pins>;
118	status = "okay";
119
120	gpio_exp: pca9555@22 {
121		compatible = "nxp,pca9555";
122		gpio-controller;
123		#gpio-cells = <2>;
124
125		reg = <0x22>;
126		/*
127		 * IO0_0: PWR_EN_USB2	IO1_0: PWR_EN_VTT
128		 * IO0_1: PWR_EN_USB23	IO1_1: MPCIE_WDISABLE
129		 * IO0_2: PWR_EN_SATA	IO1_2: RGMII_DEV_RSTN
130		 * IO0_3: PWR_EN_PCIE	IO1_3: SGMII_DEV_RSTN
131		 * IO0_4: PWR_EN_SD
132		 * IO0_5: PWR_EN_EMMC
133		 * IO0_6: PWR_EN_RGMII	IO1_6: SATA_USB3.0_SEL
134		 * IO0_7: PWR_EN_SGMII	IO1_7: PWR_MCI_PS
135		 */
136	};
137
138	rtc@68  {
139		/* PT7C4337A from pericom fully compatible with the ds1337 */
140		compatible = "dallas,ds1337";
141		reg = <0x68>;
142	};
143};
144
145&mdio {
146	status = "okay";
147	phy0: ethernet-phy@0 {
148		reg = <0>;
149	};
150
151	phy1: ethernet-phy@1 {
152		reg = <1>;
153	};
154};
155
156/* CON15(V2.0)/CON17(V1.4) : PCIe / CON15(V2.0)/CON12(V1.4) :mini-PCIe */
157&pcie0 {
158	status = "okay";
159};
160
161/* CON3 */
162&sata {
163	status = "okay";
164};
165
166&sdhci0 {
167	non-removable;
168	bus-width = <8>;
169	mmc-ddr-1_8v;
170	mmc-hs400-1_8v;
171	marvell,pad-type = "fixed-1-8v";
172	status = "okay";
173};
174
175/* SD slot module on CON14(V2.0)/CON15(V1.4) */
176&sdhci1 {
177	wp-inverted;
178	cd-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
179	bus-width = <4>;
180	marvell,pad-type = "sd";
181	vqmmc-supply = <&vcc_sd_reg1>;
182	status = "okay";
183};
184
185&spi0 {
186	status = "okay";
187	pinctrl-names = "default";
188	pinctrl-0 = <&spi_quad_pins>;
189
190	m25p80@0 {
191		compatible = "jedec,spi-nor";
192		reg = <0>;
193		spi-max-frequency = <108000000>;
194		spi-rx-bus-width = <4>;
195		spi-tx-bus-width = <4>;
196
197		partitions {
198			compatible = "fixed-partitions";
199			#address-cells = <1>;
200			#size-cells = <1>;
201			partition@0 {
202				label = "bootloader";
203				reg = <0x0 0x200000>;
204			};
205			partition@200000 {
206				label = "U-boot Env";
207				reg = <0x200000 0x10000>;
208			};
209			partition@210000 {
210				label = "Linux";
211				reg = <0x210000 0xDF0000>;
212			};
213		};
214	};
215};
216
217/*
218 * Exported on the micro USB connector CON30(V2.0)/CON32(V1.4) through
219 * an FTDI
220 */
221&uart0 {
222	pinctrl-names = "default";
223	pinctrl-0 = <&uart1_pins>;
224	status = "okay";
225};
226
227/* CON27(V2.0)/CON29(V1.4) */
228&usb2 {
229	status = "okay";
230};
231
232/* CON29(V2.0)/CON31(V1.4) */
233&usb3 {
234	status = "okay";
235	usb-phy = <&usb3_phy>;
236};
237