1aef6a7f6SGregory CLEMENT// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2d3f4759bSRussell King/*
3d3f4759bSRussell King * Copyright (C) 2016 Marvell Technology Group Ltd.
4d3f4759bSRussell King *
5d3f4759bSRussell King * Device Tree file for MACCHIATOBin Armada 8040 community board platform
6d3f4759bSRussell King */
7d3f4759bSRussell King
8d3f4759bSRussell King#include "armada-8040.dtsi"
9d3f4759bSRussell King
1045df70cbSRussell King#include <dt-bindings/gpio/gpio.h>
1145df70cbSRussell King
12d3f4759bSRussell King/ {
138f667425SBaruch Siach	model = "Marvell 8040 MACCHIATOBin";
14d3f4759bSRussell King	compatible = "marvell,armada8040-mcbin", "marvell,armada8040",
15d3f4759bSRussell King			"marvell,armada-ap806-quad", "marvell,armada-ap806";
16d3f4759bSRussell King
17f8c19a88SAntoine Tenart	chosen {
18f8c19a88SAntoine Tenart		stdout-path = "serial0:115200n8";
19f8c19a88SAntoine Tenart	};
20f8c19a88SAntoine Tenart
21d8bcaabeSRob Herring	memory@0 {
22d3f4759bSRussell King		device_type = "memory";
23d3f4759bSRussell King		reg = <0x0 0x0 0x0 0x80000000>;
24d3f4759bSRussell King	};
25d3f4759bSRussell King
26474c5885SYan Markman	aliases {
27474c5885SYan Markman		ethernet0 = &cp0_eth0;
28474c5885SYan Markman		ethernet1 = &cp1_eth0;
29474c5885SYan Markman		ethernet2 = &cp1_eth1;
30474c5885SYan Markman	};
31474c5885SYan Markman
32d3f4759bSRussell King	/* Regulator labels correspond with schematics */
33d3f4759bSRussell King	v_3_3: regulator-3-3v {
34d3f4759bSRussell King		compatible = "regulator-fixed";
35d3f4759bSRussell King		regulator-name = "v_3_3";
36d3f4759bSRussell King		regulator-min-microvolt = <3300000>;
37d3f4759bSRussell King		regulator-max-microvolt = <3300000>;
38d3f4759bSRussell King		regulator-always-on;
39d3f4759bSRussell King		status = "okay";
40d3f4759bSRussell King	};
41d3f4759bSRussell King
42d3f4759bSRussell King	v_vddo_h: regulator-1-8v {
43d3f4759bSRussell King		compatible = "regulator-fixed";
44d3f4759bSRussell King		regulator-name = "v_vddo_h";
45d3f4759bSRussell King		regulator-min-microvolt = <1800000>;
46d3f4759bSRussell King		regulator-max-microvolt = <1800000>;
47d3f4759bSRussell King		regulator-always-on;
48d3f4759bSRussell King		status = "okay";
49d3f4759bSRussell King	};
50d3f4759bSRussell King
51d3f4759bSRussell King	v_5v0_usb3_hst_vbus: regulator-usb3-vbus0 {
52d3f4759bSRussell King		compatible = "regulator-fixed";
5345df70cbSRussell King		enable-active-high;
5491f1be92SThomas Petazzoni		gpio = <&cp0_gpio2 15 GPIO_ACTIVE_HIGH>;
5545df70cbSRussell King		pinctrl-names = "default";
5691f1be92SThomas Petazzoni		pinctrl-0 = <&cp0_xhci_vbus_pins>;
57d3f4759bSRussell King		regulator-name = "v_5v0_usb3_hst_vbus";
58d3f4759bSRussell King		regulator-min-microvolt = <5000000>;
59d3f4759bSRussell King		regulator-max-microvolt = <5000000>;
60d3f4759bSRussell King		status = "okay";
61d3f4759bSRussell King	};
62d3f4759bSRussell King
63d3f4759bSRussell King	usb3h0_phy: usb3_phy0 {
64d3f4759bSRussell King		compatible = "usb-nop-xceiv";
65d3f4759bSRussell King		vcc-supply = <&v_5v0_usb3_hst_vbus>;
66d3f4759bSRussell King	};
67d3f4759bSRussell King};
68d3f4759bSRussell King
69d3f4759bSRussell King&uart0 {
70d3f4759bSRussell King	status = "okay";
719e83bbdbSThomas Petazzoni	pinctrl-0 = <&uart0_pins>;
729e83bbdbSThomas Petazzoni	pinctrl-names = "default";
73d3f4759bSRussell King};
74d3f4759bSRussell King
7552983041SRussell King&ap_sdhci0 {
7652983041SRussell King	bus-width = <8>;
7752983041SRussell King	/*
7852983041SRussell King	 * Not stable in HS modes - phy needs "more calibration", so add
7952983041SRussell King	 * the "slow-mode" and disable SDR104, SDR50 and DDR50 modes.
8052983041SRussell King	 */
8152983041SRussell King	marvell,xenon-phy-slow-mode;
8252983041SRussell King	no-1-8-v;
8352983041SRussell King	no-sd;
8452983041SRussell King	no-sdio;
8552983041SRussell King	non-removable;
8652983041SRussell King	status = "okay";
8752983041SRussell King	vqmmc-supply = <&v_vddo_h>;
8852983041SRussell King};
8952983041SRussell King
9091f1be92SThomas Petazzoni&cp0_i2c0 {
91d3f4759bSRussell King	clock-frequency = <100000>;
9231ec18e0SRussell King	pinctrl-names = "default";
9391f1be92SThomas Petazzoni	pinctrl-0 = <&cp0_i2c0_pins>;
94d3f4759bSRussell King	status = "okay";
95d3f4759bSRussell King};
96d3f4759bSRussell King
9791f1be92SThomas Petazzoni&cp0_i2c1 {
988a91e158SRussell King	clock-frequency = <100000>;
998a91e158SRussell King	pinctrl-names = "default";
10091f1be92SThomas Petazzoni	pinctrl-0 = <&cp0_i2c1_pins>;
1018a91e158SRussell King	status = "okay";
1028a91e158SRussell King
1038a91e158SRussell King	i2c-switch@70 {
1048a91e158SRussell King		compatible = "nxp,pca9548";
1058a91e158SRussell King		#address-cells = <1>;
1068a91e158SRussell King		#size-cells = <0>;
1078a91e158SRussell King		reg = <0x70>;
1088a91e158SRussell King
1098a91e158SRussell King		sfpp0_i2c: i2c@0 {
1108a91e158SRussell King			#address-cells = <1>;
1118a91e158SRussell King			#size-cells = <0>;
1128a91e158SRussell King			reg = <0>;
1138a91e158SRussell King		};
1148a91e158SRussell King		sfpp1_i2c: i2c@1 {
1158a91e158SRussell King			#address-cells = <1>;
1168a91e158SRussell King			#size-cells = <0>;
1178a91e158SRussell King			reg = <1>;
1188a91e158SRussell King		};
1198a91e158SRussell King		sfp_1g_i2c: i2c@2 {
1208a91e158SRussell King			#address-cells = <1>;
1218a91e158SRussell King			#size-cells = <0>;
1228a91e158SRussell King			reg = <2>;
1238a91e158SRussell King		};
1248a91e158SRussell King	};
1258a91e158SRussell King};
1268a91e158SRussell King
1274d5a1249SBaruch Siach/* J25 UART header */
1284d5a1249SBaruch Siach&cp0_uart1 {
1294d5a1249SBaruch Siach	pinctrl-names = "default";
1304d5a1249SBaruch Siach	pinctrl-0 = <&cp0_uart1_pins>;
1314d5a1249SBaruch Siach	status = "okay";
1324d5a1249SBaruch Siach};
1334d5a1249SBaruch Siach
13491f1be92SThomas Petazzoni&cp0_mdio {
13531ec18e0SRussell King	pinctrl-names = "default";
13691f1be92SThomas Petazzoni	pinctrl-0 = <&cp0_ge_mdio_pins>;
1376691565fSAntoine Tenart	status = "okay";
1386691565fSAntoine Tenart
1392a324659SMarc Zyngier	ge_phy: ethernet-phy@0 {
1402a324659SMarc Zyngier		reg = <0>;
1412a324659SMarc Zyngier	};
1422a324659SMarc Zyngier};
1432a324659SMarc Zyngier
14491f1be92SThomas Petazzoni&cp0_pcie0 {
145b83e1669SRussell King	pinctrl-names = "default";
14691f1be92SThomas Petazzoni	pinctrl-0 = <&cp0_pcie_pins>;
147b83e1669SRussell King	num-lanes = <4>;
148b83e1669SRussell King	num-viewport = <8>;
14991f1be92SThomas Petazzoni	reset-gpio = <&cp0_gpio1 20 GPIO_ACTIVE_LOW>;
150b83e1669SRussell King	status = "okay";
151b83e1669SRussell King};
152b83e1669SRussell King
15391f1be92SThomas Petazzoni&cp0_pinctrl {
15491f1be92SThomas Petazzoni	cp0_ge_mdio_pins: ge-mdio-pins {
15531ec18e0SRussell King		marvell,pins = "mpp32", "mpp34";
15631ec18e0SRussell King		marvell,function = "ge";
15731ec18e0SRussell King	};
15891f1be92SThomas Petazzoni	cp0_i2c1_pins: i2c1-pins {
1598a91e158SRussell King		marvell,pins = "mpp35", "mpp36";
1608a91e158SRussell King		marvell,function = "i2c1";
1618a91e158SRussell King	};
16291f1be92SThomas Petazzoni	cp0_i2c0_pins: i2c0-pins {
16331ec18e0SRussell King		marvell,pins = "mpp37", "mpp38";
16431ec18e0SRussell King		marvell,function = "i2c0";
16531ec18e0SRussell King	};
1664d5a1249SBaruch Siach	cp0_uart1_pins: uart1-pins {
1674d5a1249SBaruch Siach		marvell,pins = "mpp40", "mpp41";
1684d5a1249SBaruch Siach		marvell,function = "uart1";
1694d5a1249SBaruch Siach	};
17091f1be92SThomas Petazzoni	cp0_xhci_vbus_pins: xhci0-vbus-pins {
17145df70cbSRussell King		marvell,pins = "mpp47";
17245df70cbSRussell King		marvell,function = "gpio";
17345df70cbSRussell King	};
17491f1be92SThomas Petazzoni	cp0_pcie_pins: pcie-pins {
175b83e1669SRussell King		marvell,pins = "mpp52";
176b83e1669SRussell King		marvell,function = "gpio";
177b83e1669SRussell King	};
17891f1be92SThomas Petazzoni	cp0_sdhci_pins: sdhci-pins {
17931ec18e0SRussell King		marvell,pins = "mpp55", "mpp56", "mpp57", "mpp58", "mpp59",
18031ec18e0SRussell King			       "mpp60", "mpp61";
18131ec18e0SRussell King		marvell,function = "sdio";
18231ec18e0SRussell King	};
18331ec18e0SRussell King};
18431ec18e0SRussell King
18591f1be92SThomas Petazzoni&cp0_xmdio {
18672af17b9SAntoine Tenart	status = "okay";
18772af17b9SAntoine Tenart
18872af17b9SAntoine Tenart	phy0: ethernet-phy@0 {
18972af17b9SAntoine Tenart		compatible = "ethernet-phy-ieee802.3-c45";
19072af17b9SAntoine Tenart		reg = <0>;
19172af17b9SAntoine Tenart	};
19272af17b9SAntoine Tenart
19372af17b9SAntoine Tenart	phy8: ethernet-phy@8 {
19472af17b9SAntoine Tenart		compatible = "ethernet-phy-ieee802.3-c45";
19572af17b9SAntoine Tenart		reg = <8>;
19672af17b9SAntoine Tenart	};
19772af17b9SAntoine Tenart};
19872af17b9SAntoine Tenart
19991f1be92SThomas Petazzoni&cp0_ethernet {
20072af17b9SAntoine Tenart	status = "okay";
20172af17b9SAntoine Tenart};
20272af17b9SAntoine Tenart
20391f1be92SThomas Petazzoni&cp0_eth0 {
20472af17b9SAntoine Tenart	status = "okay";
205760b3843SAntoine Tenart	/* Network PHY */
20672af17b9SAntoine Tenart	phy = <&phy0>;
20772af17b9SAntoine Tenart	phy-mode = "10gbase-kr";
208760b3843SAntoine Tenart	/* Generic PHY, providing serdes lanes */
20991f1be92SThomas Petazzoni	phys = <&cp0_comphy4 0>;
21072af17b9SAntoine Tenart};
21172af17b9SAntoine Tenart
21291f1be92SThomas Petazzoni&cp0_sata0 {
213d3f4759bSRussell King	/* CPM Lane 0 - U29 */
214d3f4759bSRussell King	status = "okay";
215d3f4759bSRussell King};
216d3f4759bSRussell King
21791f1be92SThomas Petazzoni&cp0_sdhci0 {
21852983041SRussell King	/* U6 */
21952983041SRussell King	broken-cd;
22052983041SRussell King	bus-width = <4>;
22131ec18e0SRussell King	pinctrl-names = "default";
22291f1be92SThomas Petazzoni	pinctrl-0 = <&cp0_sdhci_pins>;
22352983041SRussell King	status = "okay";
22452983041SRussell King	vqmmc-supply = <&v_3_3>;
22552983041SRussell King};
22652983041SRussell King
22791f1be92SThomas Petazzoni&cp0_usb3_0 {
228d3f4759bSRussell King	/* J38? - USB2.0 only */
229d3f4759bSRussell King	status = "okay";
230d3f4759bSRussell King};
231d3f4759bSRussell King
23291f1be92SThomas Petazzoni&cp0_usb3_1 {
233d3f4759bSRussell King	/* J38? - USB2.0 only */
234d3f4759bSRussell King	status = "okay";
235d3f4759bSRussell King};
236d3f4759bSRussell King
23791f1be92SThomas Petazzoni&cp1_ethernet {
2382a324659SMarc Zyngier	status = "okay";
2392a324659SMarc Zyngier};
2402a324659SMarc Zyngier
24191f1be92SThomas Petazzoni&cp1_eth0 {
24272af17b9SAntoine Tenart	status = "okay";
243760b3843SAntoine Tenart	/* Network PHY */
24472af17b9SAntoine Tenart	phy = <&phy8>;
24572af17b9SAntoine Tenart	phy-mode = "10gbase-kr";
246760b3843SAntoine Tenart	/* Generic PHY, providing serdes lanes */
24791f1be92SThomas Petazzoni	phys = <&cp1_comphy4 0>;
24872af17b9SAntoine Tenart};
24972af17b9SAntoine Tenart
25091f1be92SThomas Petazzoni&cp1_eth1 {
2512a324659SMarc Zyngier	/* CPS Lane 0 - J5 (Gigabit RJ45) */
2522a324659SMarc Zyngier	status = "okay";
253760b3843SAntoine Tenart	/* Network PHY */
2542a324659SMarc Zyngier	phy = <&ge_phy>;
2552a324659SMarc Zyngier	phy-mode = "sgmii";
256760b3843SAntoine Tenart	/* Generic PHY, providing serdes lanes */
25791f1be92SThomas Petazzoni	phys = <&cp1_comphy0 1>;
2582a324659SMarc Zyngier};
2592a324659SMarc Zyngier
26091f1be92SThomas Petazzoni&cp1_pinctrl {
26191f1be92SThomas Petazzoni	cp1_spi1_pins: spi1-pins {
26231ec18e0SRussell King		marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", "mpp16";
26331ec18e0SRussell King		marvell,function = "spi1";
26431ec18e0SRussell King	};
2654d5a1249SBaruch Siach	cp1_uart0_pins: uart0-pins {
2664d5a1249SBaruch Siach		marvell,pins = "mpp6", "mpp7";
2674d5a1249SBaruch Siach		marvell,function = "uart0";
2684d5a1249SBaruch Siach	};
2694d5a1249SBaruch Siach};
2704d5a1249SBaruch Siach
2714d5a1249SBaruch Siach/* J27 UART header */
2724d5a1249SBaruch Siach&cp1_uart0 {
2734d5a1249SBaruch Siach	pinctrl-names = "default";
2744d5a1249SBaruch Siach	pinctrl-0 = <&cp1_uart0_pins>;
2754d5a1249SBaruch Siach	status = "okay";
27631ec18e0SRussell King};
27731ec18e0SRussell King
27891f1be92SThomas Petazzoni&cp1_sata0 {
279d3f4759bSRussell King	/* CPS Lane 1 - U32 */
280d3f4759bSRussell King	/* CPS Lane 3 - U31 */
281d3f4759bSRussell King	status = "okay";
282d3f4759bSRussell King};
283d3f4759bSRussell King
28491f1be92SThomas Petazzoni&cp1_spi1 {
28531ec18e0SRussell King	pinctrl-names = "default";
28691f1be92SThomas Petazzoni	pinctrl-0 = <&cp1_spi1_pins>;
287d3f4759bSRussell King	status = "okay";
288d3f4759bSRussell King
289d3f4759bSRussell King	spi-flash@0 {
290d3f4759bSRussell King		compatible = "st,w25q32";
291d3f4759bSRussell King		spi-max-frequency = <50000000>;
292d3f4759bSRussell King		reg = <0>;
293d3f4759bSRussell King	};
294d3f4759bSRussell King};
295d3f4759bSRussell King
29691f1be92SThomas Petazzoni&cp1_usb3_0 {
297d3f4759bSRussell King	/* CPS Lane 2 - CON7 */
298d3f4759bSRussell King	usb-phy = <&usb3h0_phy>;
299d3f4759bSRussell King	status = "okay";
300d3f4759bSRussell King};
301