1ec7e5a56SThomas Petazzoni/*
2ec7e5a56SThomas Petazzoni * Copyright (C) 2016 Marvell Technology Group Ltd.
3ec7e5a56SThomas Petazzoni *
4ec7e5a56SThomas Petazzoni * This file is dual-licensed: you can use it either under the terms
5ec7e5a56SThomas Petazzoni * of the GPLv2 or the X11 license, at your option. Note that this dual
6ec7e5a56SThomas Petazzoni * licensing only applies to this file, and not this project as a
7ec7e5a56SThomas Petazzoni * whole.
8ec7e5a56SThomas Petazzoni *
9ec7e5a56SThomas Petazzoni *  a) This library is free software; you can redistribute it and/or
10ec7e5a56SThomas Petazzoni *     modify it under the terms of the GNU General Public License as
11ec7e5a56SThomas Petazzoni *     published by the Free Software Foundation; either version 2 of the
12ec7e5a56SThomas Petazzoni *     License, or (at your option) any later version.
13ec7e5a56SThomas Petazzoni *
14ec7e5a56SThomas Petazzoni *     This library is distributed in the hope that it will be useful,
15ec7e5a56SThomas Petazzoni *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16ec7e5a56SThomas Petazzoni *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17ec7e5a56SThomas Petazzoni *     GNU General Public License for more details.
18ec7e5a56SThomas Petazzoni *
19ec7e5a56SThomas Petazzoni * Or, alternatively,
20ec7e5a56SThomas Petazzoni *
21ec7e5a56SThomas Petazzoni *  b) Permission is hereby granted, free of charge, to any person
22ec7e5a56SThomas Petazzoni *     obtaining a copy of this software and associated documentation
23ec7e5a56SThomas Petazzoni *     files (the "Software"), to deal in the Software without
24ec7e5a56SThomas Petazzoni *     restriction, including without limitation the rights to use,
25ec7e5a56SThomas Petazzoni *     copy, modify, merge, publish, distribute, sublicense, and/or
26ec7e5a56SThomas Petazzoni *     sell copies of the Software, and to permit persons to whom the
27ec7e5a56SThomas Petazzoni *     Software is furnished to do so, subject to the following
28ec7e5a56SThomas Petazzoni *     conditions:
29ec7e5a56SThomas Petazzoni *
30ec7e5a56SThomas Petazzoni *     The above copyright notice and this permission notice shall be
31ec7e5a56SThomas Petazzoni *     included in all copies or substantial portions of the Software.
32ec7e5a56SThomas Petazzoni *
33ec7e5a56SThomas Petazzoni *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34ec7e5a56SThomas Petazzoni *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35ec7e5a56SThomas Petazzoni *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36ec7e5a56SThomas Petazzoni *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37ec7e5a56SThomas Petazzoni *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38ec7e5a56SThomas Petazzoni *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39ec7e5a56SThomas Petazzoni *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40ec7e5a56SThomas Petazzoni *     OTHER DEALINGS IN THE SOFTWARE.
41ec7e5a56SThomas Petazzoni */
42ec7e5a56SThomas Petazzoni
43ec7e5a56SThomas Petazzoni/*
44ec7e5a56SThomas Petazzoni * Device Tree file for Marvell Armada 7040 Development board platform
45ec7e5a56SThomas Petazzoni */
46ec7e5a56SThomas Petazzoni
47915c71daSHanna Hawa#include <dt-bindings/gpio/gpio.h>
48ec7e5a56SThomas Petazzoni#include "armada-7040.dtsi"
49ec7e5a56SThomas Petazzoni
50ec7e5a56SThomas Petazzoni/ {
51ec7e5a56SThomas Petazzoni	model = "Marvell Armada 7040 DB board";
52ec7e5a56SThomas Petazzoni	compatible = "marvell,armada7040-db", "marvell,armada7040",
53ec7e5a56SThomas Petazzoni		     "marvell,armada-ap806-quad", "marvell,armada-ap806";
54ec7e5a56SThomas Petazzoni
55bf151162SThomas Petazzoni	chosen {
56bf151162SThomas Petazzoni		stdout-path = "serial0:115200n8";
57bf151162SThomas Petazzoni	};
58bf151162SThomas Petazzoni
59d8bcaabeSRob Herring	memory@0 {
60ec7e5a56SThomas Petazzoni		device_type = "memory";
61ec7e5a56SThomas Petazzoni		reg = <0x0 0x0 0x0 0x80000000>;
62ec7e5a56SThomas Petazzoni	};
63915c71daSHanna Hawa
6491f1be92SThomas Petazzoni	cp0_reg_usb3_0_vbus: cp0-usb3-0-vbus {
65915c71daSHanna Hawa		compatible = "regulator-fixed";
66915c71daSHanna Hawa		regulator-name = "usb3h0-vbus";
67915c71daSHanna Hawa		regulator-min-microvolt = <5000000>;
68915c71daSHanna Hawa		regulator-max-microvolt = <5000000>;
69915c71daSHanna Hawa		enable-active-high;
70915c71daSHanna Hawa		gpio = <&expander0 0 GPIO_ACTIVE_HIGH>;
71915c71daSHanna Hawa	};
72915c71daSHanna Hawa
7391f1be92SThomas Petazzoni	cp0_reg_usb3_1_vbus: cp0-usb3-1-vbus {
74915c71daSHanna Hawa		compatible = "regulator-fixed";
75915c71daSHanna Hawa		regulator-name = "usb3h1-vbus";
76915c71daSHanna Hawa		regulator-min-microvolt = <5000000>;
77915c71daSHanna Hawa		regulator-max-microvolt = <5000000>;
78915c71daSHanna Hawa		enable-active-high;
79915c71daSHanna Hawa		gpio = <&expander0 1 GPIO_ACTIVE_HIGH>;
80915c71daSHanna Hawa	};
81915c71daSHanna Hawa
8291f1be92SThomas Petazzoni	cp0_usb3_0_phy: cp0-usb3-0-phy {
83915c71daSHanna Hawa		compatible = "usb-nop-xceiv";
8491f1be92SThomas Petazzoni		vcc-supply = <&cp0_reg_usb3_0_vbus>;
85915c71daSHanna Hawa	};
86915c71daSHanna Hawa
8791f1be92SThomas Petazzoni	cp0_usb3_1_phy: cp0-usb3-1-phy {
88915c71daSHanna Hawa		compatible = "usb-nop-xceiv";
8991f1be92SThomas Petazzoni		vcc-supply = <&cp0_reg_usb3_1_vbus>;
90915c71daSHanna Hawa	};
91037ad463SAndreas Färber};
92ec7e5a56SThomas Petazzoni
93037ad463SAndreas Färber&i2c0 {
94037ad463SAndreas Färber	status = "okay";
95037ad463SAndreas Färber	clock-frequency = <100000>;
96037ad463SAndreas Färber};
97037ad463SAndreas Färber
98037ad463SAndreas Färber&spi0 {
99ec7e5a56SThomas Petazzoni	status = "okay";
100ec7e5a56SThomas Petazzoni
101ec7e5a56SThomas Petazzoni	spi-flash@0 {
102ec7e5a56SThomas Petazzoni		#address-cells = <1>;
103ec7e5a56SThomas Petazzoni		#size-cells = <1>;
104fe85e20eSThomas Petazzoni		compatible = "jedec,spi-nor";
105fe85e20eSThomas Petazzoni		reg = <0>;
106ec7e5a56SThomas Petazzoni		spi-max-frequency = <10000000>;
107ec7e5a56SThomas Petazzoni
108fe85e20eSThomas Petazzoni		partitions {
109fe85e20eSThomas Petazzoni			compatible = "fixed-partitions";
110fe85e20eSThomas Petazzoni			#address-cells = <1>;
111fe85e20eSThomas Petazzoni			#size-cells = <1>;
112fe85e20eSThomas Petazzoni
113ec7e5a56SThomas Petazzoni			partition@0 {
114ec7e5a56SThomas Petazzoni				label = "U-Boot";
115ec7e5a56SThomas Petazzoni				reg = <0 0x200000>;
116ec7e5a56SThomas Petazzoni			};
117ec7e5a56SThomas Petazzoni			partition@400000 {
118ec7e5a56SThomas Petazzoni				label = "Filesystem";
119ec7e5a56SThomas Petazzoni				reg = <0x200000 0xce0000>;
120ec7e5a56SThomas Petazzoni			};
121ec7e5a56SThomas Petazzoni		};
122ec7e5a56SThomas Petazzoni	};
123fe85e20eSThomas Petazzoni};
124ec7e5a56SThomas Petazzoni
125037ad463SAndreas Färber&uart0 {
126ec7e5a56SThomas Petazzoni	status = "okay";
1279e83bbdbSThomas Petazzoni	pinctrl-0 = <&uart0_pins>;
1289e83bbdbSThomas Petazzoni	pinctrl-names = "default";
129ec7e5a56SThomas Petazzoni};
130fea14498SThomas Petazzoni
131fea14498SThomas Petazzoni
13291f1be92SThomas Petazzoni&cp0_pcie2 {
133fea14498SThomas Petazzoni	status = "okay";
134fea14498SThomas Petazzoni};
135fea14498SThomas Petazzoni
13691f1be92SThomas Petazzoni&cp0_i2c0 {
137fea14498SThomas Petazzoni	status = "okay";
138fea14498SThomas Petazzoni	clock-frequency = <100000>;
139915c71daSHanna Hawa
140915c71daSHanna Hawa	expander0: pca9555@21 {
141915c71daSHanna Hawa		compatible = "nxp,pca9555";
142915c71daSHanna Hawa		pinctrl-names = "default";
143915c71daSHanna Hawa		gpio-controller;
144915c71daSHanna Hawa		#gpio-cells = <2>;
145915c71daSHanna Hawa		reg = <0x21>;
146a5f5c5bbSGregory CLEMENT		/*
147a5f5c5bbSGregory CLEMENT		 * IO0_0: USB3_PWR_EN0	IO1_0: USB_3_1_Dev_Detect
148a5f5c5bbSGregory CLEMENT		 * IO0_1: USB3_PWR_EN1	IO1_1: USB2_1_current_limit
149a5f5c5bbSGregory CLEMENT		 * IO0_2: DDR3_4_Detect	IO1_2: Hcon_IO_RstN
150a5f5c5bbSGregory CLEMENT		 * IO0_3: USB2_DEVICE_DETECT
151a5f5c5bbSGregory CLEMENT		 * IO0_4: GPIO_0	IO1_4: SD_Status
152a5f5c5bbSGregory CLEMENT		 * IO0_5: GPIO_1	IO1_5: LDO_5V_Enable
153a5f5c5bbSGregory CLEMENT		 * IO0_6: IHB_5V_Enable	IO1_6: PWR_EN_eMMC
154a5f5c5bbSGregory CLEMENT		 * IO0_7:		IO1_7: SDIO_Vcntrl
155a5f5c5bbSGregory CLEMENT		 */
156915c71daSHanna Hawa	};
157fea14498SThomas Petazzoni};
158fea14498SThomas Petazzoni
15991f1be92SThomas Petazzoni&cp0_nand {
16073ae5fe8SGregory CLEMENT	/*
16173ae5fe8SGregory CLEMENT	 * SPI on CPM and NAND have common pins on this board. We can
16273ae5fe8SGregory CLEMENT	 * use only one at a time. To enable the NAND (whihch will
16373ae5fe8SGregory CLEMENT	 * disable the SPI), the "status = "okay";" line have to be
16473ae5fe8SGregory CLEMENT	 * added here.
16573ae5fe8SGregory CLEMENT	 */
16673ae5fe8SGregory CLEMENT	num-cs = <1>;
16773ae5fe8SGregory CLEMENT	pinctrl-0 = <&nand_pins>, <&nand_rb>;
16873ae5fe8SGregory CLEMENT	pinctrl-names = "default";
16973ae5fe8SGregory CLEMENT	nand-ecc-strength = <4>;
17073ae5fe8SGregory CLEMENT	nand-ecc-step-size = <512>;
17173ae5fe8SGregory CLEMENT	marvell,nand-enable-arbiter;
17273ae5fe8SGregory CLEMENT	nand-on-flash-bbt;
17373ae5fe8SGregory CLEMENT
17473ae5fe8SGregory CLEMENT	partition@0 {
17573ae5fe8SGregory CLEMENT		label = "U-Boot";
17673ae5fe8SGregory CLEMENT		reg = <0 0x200000>;
17773ae5fe8SGregory CLEMENT	};
17873ae5fe8SGregory CLEMENT	partition@200000 {
17973ae5fe8SGregory CLEMENT		label = "Linux";
18073ae5fe8SGregory CLEMENT		reg = <0x200000 0xe00000>;
18173ae5fe8SGregory CLEMENT	};
18273ae5fe8SGregory CLEMENT	partition@1000000 {
18373ae5fe8SGregory CLEMENT		label = "Filesystem";
18473ae5fe8SGregory CLEMENT		reg = <0x1000000 0x3f000000>;
18573ae5fe8SGregory CLEMENT	};
18673ae5fe8SGregory CLEMENT};
18773ae5fe8SGregory CLEMENT
18873ae5fe8SGregory CLEMENT
18991f1be92SThomas Petazzoni&cp0_spi1 {
190fea14498SThomas Petazzoni	status = "okay";
191fea14498SThomas Petazzoni
192fea14498SThomas Petazzoni	spi-flash@0 {
193fea14498SThomas Petazzoni		#address-cells = <0x1>;
194fea14498SThomas Petazzoni		#size-cells = <0x1>;
195fea14498SThomas Petazzoni		compatible = "jedec,spi-nor";
196fea14498SThomas Petazzoni		reg = <0x0>;
197fea14498SThomas Petazzoni		spi-max-frequency = <20000000>;
198fea14498SThomas Petazzoni
199fea14498SThomas Petazzoni		partitions {
200fea14498SThomas Petazzoni			compatible = "fixed-partitions";
201fea14498SThomas Petazzoni			#address-cells = <1>;
202fea14498SThomas Petazzoni			#size-cells = <1>;
203fea14498SThomas Petazzoni
204fea14498SThomas Petazzoni			partition@0 {
205fea14498SThomas Petazzoni				label = "U-Boot";
206fea14498SThomas Petazzoni				reg = <0x0 0x200000>;
207fea14498SThomas Petazzoni			};
208fea14498SThomas Petazzoni
209fea14498SThomas Petazzoni			partition@400000 {
210fea14498SThomas Petazzoni				label = "Filesystem";
211fea14498SThomas Petazzoni				reg = <0x200000 0xe00000>;
212fea14498SThomas Petazzoni			};
213fea14498SThomas Petazzoni		};
214fea14498SThomas Petazzoni	};
215fea14498SThomas Petazzoni};
216fea14498SThomas Petazzoni
21791f1be92SThomas Petazzoni&cp0_sata0 {
218fea14498SThomas Petazzoni	status = "okay";
219fea14498SThomas Petazzoni};
220fea14498SThomas Petazzoni
22191f1be92SThomas Petazzoni&cp0_usb3_0 {
22291f1be92SThomas Petazzoni	usb-phy = <&cp0_usb3_0_phy>;
223fea14498SThomas Petazzoni	status = "okay";
224fea14498SThomas Petazzoni};
225fea14498SThomas Petazzoni
22691f1be92SThomas Petazzoni&cp0_usb3_1 {
22791f1be92SThomas Petazzoni	usb-phy = <&cp0_usb3_1_phy>;
228fea14498SThomas Petazzoni	status = "okay";
229fea14498SThomas Petazzoni};
23060894719SThomas Petazzoni
231910b4c5cSGregory CLEMENT&ap_sdhci0 {
232910b4c5cSGregory CLEMENT	status = "okay";
233910b4c5cSGregory CLEMENT	bus-width = <4>;
234910b4c5cSGregory CLEMENT	no-1-8-v;
235910b4c5cSGregory CLEMENT	non-removable;
236910b4c5cSGregory CLEMENT};
237910b4c5cSGregory CLEMENT
23891f1be92SThomas Petazzoni&cp0_sdhci0 {
239910b4c5cSGregory CLEMENT	status = "okay";
240910b4c5cSGregory CLEMENT	bus-width = <4>;
241910b4c5cSGregory CLEMENT	no-1-8-v;
242c4e3bf29SGregory CLEMENT	cd-gpios = <&expander0 12 GPIO_ACTIVE_LOW>;
243910b4c5cSGregory CLEMENT};
244910b4c5cSGregory CLEMENT
24591f1be92SThomas Petazzoni&cp0_mdio {
2463c6912cdSAntoine Tenart	status = "okay";
2473c6912cdSAntoine Tenart
24860894719SThomas Petazzoni	phy0: ethernet-phy@0 {
24960894719SThomas Petazzoni		reg = <0>;
25060894719SThomas Petazzoni	};
25160894719SThomas Petazzoni	phy1: ethernet-phy@1 {
25260894719SThomas Petazzoni		reg = <1>;
25360894719SThomas Petazzoni	};
25460894719SThomas Petazzoni};
25560894719SThomas Petazzoni
25691f1be92SThomas Petazzoni&cp0_ethernet {
25760894719SThomas Petazzoni	status = "okay";
25860894719SThomas Petazzoni};
25960894719SThomas Petazzoni
26091f1be92SThomas Petazzoni&cp0_eth0 {
26130967cfeSAntoine Tenart	status = "okay";
26230967cfeSAntoine Tenart	/* Network PHY */
26330967cfeSAntoine Tenart	phy-mode = "10gbase-kr";
26430967cfeSAntoine Tenart	/* Generic PHY, providing serdes lanes */
26591f1be92SThomas Petazzoni	phys = <&cp0_comphy2 0>;
26630967cfeSAntoine Tenart};
26730967cfeSAntoine Tenart
26891f1be92SThomas Petazzoni&cp0_eth1 {
26960894719SThomas Petazzoni	status = "okay";
270723abeedSAntoine Tenart	/* Network PHY */
27160894719SThomas Petazzoni	phy = <&phy0>;
27260894719SThomas Petazzoni	phy-mode = "sgmii";
273723abeedSAntoine Tenart	/* Generic PHY, providing serdes lanes */
27491f1be92SThomas Petazzoni	phys = <&cp0_comphy0 1>;
27560894719SThomas Petazzoni};
27660894719SThomas Petazzoni
27791f1be92SThomas Petazzoni&cp0_eth2 {
27860894719SThomas Petazzoni	status = "okay";
27960894719SThomas Petazzoni	phy = <&phy1>;
28060894719SThomas Petazzoni	phy-mode = "rgmii-id";
28160894719SThomas Petazzoni};
282