xref: /OK3568_Linux_fs/u-boot/arch/arm/dts/armada-8040-mcbin.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Copyright (C) 2016 Marvell International Ltd.
3*4882a593Smuzhiyun *
4*4882a593Smuzhiyun * SPDX-License-Identifier:	GPL-2.0
5*4882a593Smuzhiyun * https://spdx.org/licenses
6*4882a593Smuzhiyun */
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun#include "armada-8040.dtsi" /* include SoC device tree */
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun/ {
11*4882a593Smuzhiyun	model = "MACCHIATOBin-8040";
12*4882a593Smuzhiyun	compatible = "marvell,armada8040-mcbin",
13*4882a593Smuzhiyun		     "marvell,armada8040";
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun	chosen {
16*4882a593Smuzhiyun		stdout-path = "serial0:115200n8";
17*4882a593Smuzhiyun	};
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun	aliases {
20*4882a593Smuzhiyun		i2c0 = &cpm_i2c0;
21*4882a593Smuzhiyun		i2c1 = &cpm_i2c1;
22*4882a593Smuzhiyun		spi0 = &cps_spi1;
23*4882a593Smuzhiyun		gpio0 = &ap_gpio0;
24*4882a593Smuzhiyun		gpio1 = &cpm_gpio0;
25*4882a593Smuzhiyun		gpio2 = &cpm_gpio1;
26*4882a593Smuzhiyun	};
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun	memory@00000000 {
29*4882a593Smuzhiyun		device_type = "memory";
30*4882a593Smuzhiyun		reg = <0x0 0x0 0x0 0x80000000>;
31*4882a593Smuzhiyun	};
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun	simple-bus {
34*4882a593Smuzhiyun		compatible = "simple-bus";
35*4882a593Smuzhiyun		#address-cells = <1>;
36*4882a593Smuzhiyun		#size-cells = <0>;
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun		reg_usb3h0_vbus: usb3-vbus0 {
39*4882a593Smuzhiyun			compatible = "regulator-fixed";
40*4882a593Smuzhiyun			pinctrl-names = "default";
41*4882a593Smuzhiyun			pinctrl-0 = <&cpm_xhci_vbus_pins>;
42*4882a593Smuzhiyun			regulator-name = "reg-usb3h0-vbus";
43*4882a593Smuzhiyun			regulator-min-microvolt = <5000000>;
44*4882a593Smuzhiyun			regulator-max-microvolt = <5000000>;
45*4882a593Smuzhiyun			startup-delay-us = <500000>;
46*4882a593Smuzhiyun			enable-active-high;
47*4882a593Smuzhiyun			regulator-always-on;
48*4882a593Smuzhiyun			regulator-boot-on;
49*4882a593Smuzhiyun			gpio = <&cpm_gpio1 15 GPIO_ACTIVE_HIGH>; /* GPIO[47] */
50*4882a593Smuzhiyun		};
51*4882a593Smuzhiyun	};
52*4882a593Smuzhiyun};
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun/* Accessible over the mini-USB CON9 connector on the main board */
55*4882a593Smuzhiyun&uart0 {
56*4882a593Smuzhiyun	status = "okay";
57*4882a593Smuzhiyun};
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun&ap_pinctl {
60*4882a593Smuzhiyun	/*
61*4882a593Smuzhiyun	 * MPP Bus:
62*4882a593Smuzhiyun	 * eMMC [0-10]
63*4882a593Smuzhiyun	 * UART0 [11,19]
64*4882a593Smuzhiyun	 */
65*4882a593Smuzhiyun		  /* 0 1 2 3 4 5 6 7 8 9 */
66*4882a593Smuzhiyun	pin-func = < 1 1 1 1 1 1 1 1 1 1
67*4882a593Smuzhiyun		     1 3 0 0 0 0 0 0 0 3 >;
68*4882a593Smuzhiyun};
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun/* on-board eMMC */
71*4882a593Smuzhiyun&ap_sdhci0 {
72*4882a593Smuzhiyun	pinctrl-names = "default";
73*4882a593Smuzhiyun	pinctrl-0 = <&ap_emmc_pins>;
74*4882a593Smuzhiyun	bus-width= <8>;
75*4882a593Smuzhiyun	status = "okay";
76*4882a593Smuzhiyun};
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun&cpm_pinctl {
79*4882a593Smuzhiyun	/*
80*4882a593Smuzhiyun	 * MPP Bus:
81*4882a593Smuzhiyun	 * [0-31] = 0xff: Keep default CP0_shared_pins:
82*4882a593Smuzhiyun	 * [11] CLKOUT_MPP_11 (out)
83*4882a593Smuzhiyun	 * [23] LINK_RD_IN_CP2CP (in)
84*4882a593Smuzhiyun	 * [25] CLKOUT_MPP_25 (out)
85*4882a593Smuzhiyun	 * [29] AVS_FB_IN_CP2CP (in)
86*4882a593Smuzhiyun	 * [32,34] SMI
87*4882a593Smuzhiyun	 * [33]    MSS power down
88*4882a593Smuzhiyun	 * [35-38] CP0 I2C1 and I2C0
89*4882a593Smuzhiyun	 * [39] MSS CKE Enable
90*4882a593Smuzhiyun	 * [40,41] CP0 UART1 TX/RX
91*4882a593Smuzhiyun	 * [42,43] XSMI (controls two 10G phys)
92*4882a593Smuzhiyun	 * [47] USB VBUS EN
93*4882a593Smuzhiyun	 * [48] FAN PWM
94*4882a593Smuzhiyun	 * [49] 10G port 1 interrupt
95*4882a593Smuzhiyun	 * [50] 10G port 0 interrupt
96*4882a593Smuzhiyun	 * [51] 2.5G SFP TX fault
97*4882a593Smuzhiyun	 * [52] PCIe reset out
98*4882a593Smuzhiyun	 * [53] 2.5G SFP mode
99*4882a593Smuzhiyun	 * [54] 2.5G SFP LOS
100*4882a593Smuzhiyun	 * [55] Micro SD card detect
101*4882a593Smuzhiyun	 * [56-61] Micro SD
102*4882a593Smuzhiyun	 * [62] CP1 SFI SFP FAULT
103*4882a593Smuzhiyun	 */
104*4882a593Smuzhiyun		/*   0    1    2    3    4    5    6    7    8    9 */
105*4882a593Smuzhiyun	pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
106*4882a593Smuzhiyun		     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
107*4882a593Smuzhiyun		     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
108*4882a593Smuzhiyun		     0xff 0    7    0xa  7    2    2    2    2    0xa
109*4882a593Smuzhiyun		     7    7    8    8    0    0    0    0    0    0
110*4882a593Smuzhiyun		     0    0    0    0    0    0    0xe  0xe  0xe  0xe
111*4882a593Smuzhiyun		     0xe  0xe  0 >;
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun	cpm_xhci_vbus_pins: cpm-xhci-vbus-pins {
114*4882a593Smuzhiyun		marvell,pins = < 47 >;
115*4882a593Smuzhiyun		marvell,function = <0>;
116*4882a593Smuzhiyun	};
117*4882a593Smuzhiyun
118*4882a593Smuzhiyun	cpm_pcie_reset_pins: cpm-pcie-reset-pins {
119*4882a593Smuzhiyun		marvell,pins = < 52 >;
120*4882a593Smuzhiyun		marvell,function = <0>;
121*4882a593Smuzhiyun	};
122*4882a593Smuzhiyun};
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun/* uSD slot */
125*4882a593Smuzhiyun&cpm_sdhci0 {
126*4882a593Smuzhiyun	pinctrl-names = "default";
127*4882a593Smuzhiyun	pinctrl-0 = <&cpm_sdhci_pins>;
128*4882a593Smuzhiyun	bus-width= <4>;
129*4882a593Smuzhiyun	status = "okay";
130*4882a593Smuzhiyun};
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun/* PCIe x4 */
133*4882a593Smuzhiyun&cpm_pcie0 {
134*4882a593Smuzhiyun	num-lanes = <4>;
135*4882a593Smuzhiyun	pinctrl-names = "default";
136*4882a593Smuzhiyun	pinctrl-0 = <&cpm_pcie_reset_pins>;
137*4882a593Smuzhiyun	marvell,reset-gpio = <&cpm_gpio1 20 GPIO_ACTIVE_HIGH>; /* GPIO[52] */
138*4882a593Smuzhiyun	status = "okay";
139*4882a593Smuzhiyun};
140*4882a593Smuzhiyun
141*4882a593Smuzhiyun&cpm_i2c0 {
142*4882a593Smuzhiyun	pinctrl-names = "default";
143*4882a593Smuzhiyun	pinctrl-0 = <&cpm_i2c0_pins>;
144*4882a593Smuzhiyun	status = "okay";
145*4882a593Smuzhiyun	clock-frequency = <100000>;
146*4882a593Smuzhiyun};
147*4882a593Smuzhiyun
148*4882a593Smuzhiyun&cpm_i2c1 {
149*4882a593Smuzhiyun	pinctrl-names = "default";
150*4882a593Smuzhiyun	pinctrl-0 = <&cpm_i2c1_pins>;
151*4882a593Smuzhiyun	status = "okay";
152*4882a593Smuzhiyun	clock-frequency = <100000>;
153*4882a593Smuzhiyun};
154*4882a593Smuzhiyun
155*4882a593Smuzhiyun&cpm_sata0 {
156*4882a593Smuzhiyun	status = "okay";
157*4882a593Smuzhiyun};
158*4882a593Smuzhiyun
159*4882a593Smuzhiyun&cpm_comphy {
160*4882a593Smuzhiyun	/*
161*4882a593Smuzhiyun	 * CP0 Serdes Configuration:
162*4882a593Smuzhiyun	 * Lane 0: PCIe0 (x4)
163*4882a593Smuzhiyun	 * Lane 1: PCIe0 (x4)
164*4882a593Smuzhiyun	 * Lane 2: PCIe0 (x4)
165*4882a593Smuzhiyun	 * Lane 3: PCIe0 (x4)
166*4882a593Smuzhiyun	 * Lane 4: SFI (10G)
167*4882a593Smuzhiyun	 * Lane 5: SATA1
168*4882a593Smuzhiyun	 */
169*4882a593Smuzhiyun	phy0 {
170*4882a593Smuzhiyun		phy-type = <PHY_TYPE_PEX0>;
171*4882a593Smuzhiyun	};
172*4882a593Smuzhiyun	phy1 {
173*4882a593Smuzhiyun		phy-type = <PHY_TYPE_PEX0>;
174*4882a593Smuzhiyun	};
175*4882a593Smuzhiyun	phy2 {
176*4882a593Smuzhiyun		phy-type = <PHY_TYPE_PEX0>;
177*4882a593Smuzhiyun	};
178*4882a593Smuzhiyun	phy3 {
179*4882a593Smuzhiyun		phy-type = <PHY_TYPE_PEX0>;
180*4882a593Smuzhiyun	};
181*4882a593Smuzhiyun	phy4 {
182*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SFI>;
183*4882a593Smuzhiyun	};
184*4882a593Smuzhiyun	phy5 {
185*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SATA1>;
186*4882a593Smuzhiyun	};
187*4882a593Smuzhiyun};
188*4882a593Smuzhiyun
189*4882a593Smuzhiyun&cps_sata0 {
190*4882a593Smuzhiyun	status = "okay";
191*4882a593Smuzhiyun};
192*4882a593Smuzhiyun
193*4882a593Smuzhiyun&cps_usb3_0 {
194*4882a593Smuzhiyun	vbus-supply = <&reg_usb3h0_vbus>;
195*4882a593Smuzhiyun	status = "okay";
196*4882a593Smuzhiyun};
197*4882a593Smuzhiyun
198*4882a593Smuzhiyun&cps_utmi0 {
199*4882a593Smuzhiyun	status = "okay";
200*4882a593Smuzhiyun};
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun&cps_pinctl {
203*4882a593Smuzhiyun	/*
204*4882a593Smuzhiyun	 * MPP Bus:
205*4882a593Smuzhiyun	 * [0-5] TDM
206*4882a593Smuzhiyun	 * [6,7] CP1_UART 0
207*4882a593Smuzhiyun	 * [8]   CP1 10G SFP LOS
208*4882a593Smuzhiyun	 * [9]   CP1 10G PHY RESET
209*4882a593Smuzhiyun	 * [10]  CP1 10G SFP TX Disable
210*4882a593Smuzhiyun	 * [11]  CP1 10G SFP Mode
211*4882a593Smuzhiyun	 * [12]  SPI1 CS1n
212*4882a593Smuzhiyun	 * [13]  SPI1 MISO (TDM and SPI ROM shared)
213*4882a593Smuzhiyun	 * [14]  SPI1 CS0n
214*4882a593Smuzhiyun	 * [15]  SPI1 MOSI (TDM and SPI ROM shared)
215*4882a593Smuzhiyun	 * [16]  SPI1 CLK (TDM and SPI ROM shared)
216*4882a593Smuzhiyun	 * [24]  CP1 2.5G SFP TX Disable
217*4882a593Smuzhiyun	 * [26]  CP0 10G SFP TX Fault
218*4882a593Smuzhiyun	 * [27]  CP0 10G SFP Mode
219*4882a593Smuzhiyun	 * [28]  CP0 10G SFP LOS
220*4882a593Smuzhiyun	 * [29]  CP0 10G SFP TX Disable
221*4882a593Smuzhiyun	 * [30]  USB Over current indication
222*4882a593Smuzhiyun	 * [31]  10G Port 0 phy reset
223*4882a593Smuzhiyun	 * [32-62] = 0xff: Keep default CP1_shared_pins:
224*4882a593Smuzhiyun	 */
225*4882a593Smuzhiyun		/*   0    1    2    3    4    5    6    7    8    9 */
226*4882a593Smuzhiyun	pin-func = < 0x4  0x4  0x4  0x4  0x4  0x4  0x8  0x8  0x0  0x0
227*4882a593Smuzhiyun		     0x0  0x0  0x3  0x3  0x3  0x3  0x3  0xff 0xff 0xff
228*4882a593Smuzhiyun		     0xff 0xff 0xff 0xff 0x0  0xff 0x0  0x0  0x0 0x0
229*4882a593Smuzhiyun		     0x0  0x0  0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
230*4882a593Smuzhiyun		     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
231*4882a593Smuzhiyun		     0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
232*4882a593Smuzhiyun		     0xff 0xff 0xff>;
233*4882a593Smuzhiyun};
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun&cps_spi1 {
236*4882a593Smuzhiyun	pinctrl-names = "default";
237*4882a593Smuzhiyun	pinctrl-0 = <&cps_spi1_pins>;
238*4882a593Smuzhiyun	status = "okay";
239*4882a593Smuzhiyun
240*4882a593Smuzhiyun	spi-flash@0 {
241*4882a593Smuzhiyun		#address-cells = <1>;
242*4882a593Smuzhiyun		#size-cells = <1>;
243*4882a593Smuzhiyun		compatible = "jedec,spi-nor";
244*4882a593Smuzhiyun		reg = <0>;
245*4882a593Smuzhiyun		spi-max-frequency = <10000000>;
246*4882a593Smuzhiyun
247*4882a593Smuzhiyun		partitions {
248*4882a593Smuzhiyun			compatible = "fixed-partitions";
249*4882a593Smuzhiyun			#address-cells = <1>;
250*4882a593Smuzhiyun			#size-cells = <1>;
251*4882a593Smuzhiyun
252*4882a593Smuzhiyun			partition@0 {
253*4882a593Smuzhiyun				label = "U-Boot";
254*4882a593Smuzhiyun				reg = <0 0x200000>;
255*4882a593Smuzhiyun			};
256*4882a593Smuzhiyun			partition@400000 {
257*4882a593Smuzhiyun				label = "Filesystem";
258*4882a593Smuzhiyun				reg = <0x200000 0xce0000>;
259*4882a593Smuzhiyun			};
260*4882a593Smuzhiyun		};
261*4882a593Smuzhiyun	};
262*4882a593Smuzhiyun};
263*4882a593Smuzhiyun
264*4882a593Smuzhiyun&cps_comphy {
265*4882a593Smuzhiyun	/*
266*4882a593Smuzhiyun	 * CP1 Serdes Configuration:
267*4882a593Smuzhiyun	 * Lane 0: SGMII1
268*4882a593Smuzhiyun	 * Lane 1: SATA 0
269*4882a593Smuzhiyun	 * Lane 2: USB HOST 0
270*4882a593Smuzhiyun	 * Lane 3: SATA1
271*4882a593Smuzhiyun	 * Lane 4: SFI (10G)
272*4882a593Smuzhiyun	 * Lane 5: SGMII3
273*4882a593Smuzhiyun	 */
274*4882a593Smuzhiyun	phy0 {
275*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SGMII1>;
276*4882a593Smuzhiyun		phy-speed = <PHY_SPEED_1_25G>;
277*4882a593Smuzhiyun	};
278*4882a593Smuzhiyun	phy1 {
279*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SATA0>;
280*4882a593Smuzhiyun	};
281*4882a593Smuzhiyun	phy2 {
282*4882a593Smuzhiyun		phy-type = <PHY_TYPE_USB3_HOST0>;
283*4882a593Smuzhiyun	};
284*4882a593Smuzhiyun	phy3 {
285*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SATA1>;
286*4882a593Smuzhiyun	};
287*4882a593Smuzhiyun	phy4 {
288*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SFI>;
289*4882a593Smuzhiyun	};
290*4882a593Smuzhiyun	phy5 {
291*4882a593Smuzhiyun		phy-type = <PHY_TYPE_SGMII3>;
292*4882a593Smuzhiyun	};
293*4882a593Smuzhiyun};
294