1354d7675SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2354d7675SEmmanuel Vadot/*
3354d7675SEmmanuel Vadot * Copyright (C) 2020 Marvell International Ltd.
4354d7675SEmmanuel Vadot *
5354d7675SEmmanuel Vadot * Device tree for the CN9132-DB board.
6354d7675SEmmanuel Vadot */
7354d7675SEmmanuel Vadot
8354d7675SEmmanuel Vadot#include "cn9131-db.dtsi"
9354d7675SEmmanuel Vadot
10354d7675SEmmanuel Vadot/ {
11354d7675SEmmanuel Vadot	compatible = "marvell,cn9132", "marvell,cn9131", "marvell,cn9130",
12354d7675SEmmanuel Vadot		     "marvell,armada-ap807-quad", "marvell,armada-ap807";
13354d7675SEmmanuel Vadot
14354d7675SEmmanuel Vadot	aliases {
15354d7675SEmmanuel Vadot		gpio5 = &cp2_gpio1;
16354d7675SEmmanuel Vadot		gpio6 = &cp2_gpio2;
17354d7675SEmmanuel Vadot		ethernet5 = &cp2_eth0;
18354d7675SEmmanuel Vadot	};
19354d7675SEmmanuel Vadot
20354d7675SEmmanuel Vadot	cp2_reg_usb3_vbus0: cp2_usb3_vbus@0 {
21354d7675SEmmanuel Vadot		compatible = "regulator-fixed";
22354d7675SEmmanuel Vadot		regulator-name = "cp2-xhci0-vbus";
23354d7675SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
24354d7675SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
25354d7675SEmmanuel Vadot		enable-active-high;
26354d7675SEmmanuel Vadot		gpio = <&cp2_gpio1 2 GPIO_ACTIVE_HIGH>;
27354d7675SEmmanuel Vadot	};
28354d7675SEmmanuel Vadot
29354d7675SEmmanuel Vadot	cp2_usb3_0_phy0: cp2_usb3_phy0 {
30354d7675SEmmanuel Vadot		compatible = "usb-nop-xceiv";
31354d7675SEmmanuel Vadot		vcc-supply = <&cp2_reg_usb3_vbus0>;
32354d7675SEmmanuel Vadot	};
33354d7675SEmmanuel Vadot
34354d7675SEmmanuel Vadot	cp2_reg_usb3_vbus1: cp2_usb3_vbus@1 {
35354d7675SEmmanuel Vadot		compatible = "regulator-fixed";
36354d7675SEmmanuel Vadot		regulator-name = "cp2-xhci1-vbus";
37354d7675SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
38354d7675SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
39354d7675SEmmanuel Vadot		enable-active-high;
40354d7675SEmmanuel Vadot		gpio = <&cp2_gpio1 3 GPIO_ACTIVE_HIGH>;
41354d7675SEmmanuel Vadot	};
42354d7675SEmmanuel Vadot
43354d7675SEmmanuel Vadot	cp2_usb3_0_phy1: cp2_usb3_phy1 {
44354d7675SEmmanuel Vadot		compatible = "usb-nop-xceiv";
45354d7675SEmmanuel Vadot		vcc-supply = <&cp2_reg_usb3_vbus1>;
46354d7675SEmmanuel Vadot	};
47354d7675SEmmanuel Vadot
48354d7675SEmmanuel Vadot	cp2_reg_sd_vccq: cp2_sd_vccq@0 {
49354d7675SEmmanuel Vadot		compatible = "regulator-gpio";
50354d7675SEmmanuel Vadot		regulator-name = "cp2_sd_vcc";
51354d7675SEmmanuel Vadot		regulator-min-microvolt = <1800000>;
52354d7675SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
53354d7675SEmmanuel Vadot		gpios = <&cp2_gpio2 17 GPIO_ACTIVE_HIGH>;
54354d7675SEmmanuel Vadot		states = <1800000 0x1 3300000 0x0>;
55354d7675SEmmanuel Vadot	};
56354d7675SEmmanuel Vadot
57354d7675SEmmanuel Vadot	cp2_sfp_eth0: sfp-eth0 {
58354d7675SEmmanuel Vadot		compatible = "sff,sfp";
59354d7675SEmmanuel Vadot		i2c-bus = <&cp2_sfpp0_i2c>;
60*b97ee269SEmmanuel Vadot		los-gpios = <&cp2_module_expander1 11 GPIO_ACTIVE_HIGH>;
61*b97ee269SEmmanuel Vadot		mod-def0-gpios = <&cp2_module_expander1 10 GPIO_ACTIVE_LOW>;
62*b97ee269SEmmanuel Vadot		tx-disable-gpios = <&cp2_module_expander1 9 GPIO_ACTIVE_HIGH>;
63*b97ee269SEmmanuel Vadot		tx-fault-gpios = <&cp2_module_expander1 8 GPIO_ACTIVE_HIGH>;
64354d7675SEmmanuel Vadot		/*
65354d7675SEmmanuel Vadot		 * SFP cages are unconnected on early PCBs because of an the I2C
66354d7675SEmmanuel Vadot		 * lanes not being connected. Prevent the port for being
67354d7675SEmmanuel Vadot		 * unusable by disabling the SFP node.
68354d7675SEmmanuel Vadot		 */
69354d7675SEmmanuel Vadot		status = "disabled";
70354d7675SEmmanuel Vadot	};
71354d7675SEmmanuel Vadot};
72354d7675SEmmanuel Vadot
73354d7675SEmmanuel Vadot/*
74354d7675SEmmanuel Vadot * Instantiate the second slave CP115
75354d7675SEmmanuel Vadot */
76354d7675SEmmanuel Vadot
77354d7675SEmmanuel Vadot#define CP11X_NAME		cp2
78354d7675SEmmanuel Vadot#define CP11X_BASE		f6000000
79354d7675SEmmanuel Vadot#define CP11X_PCIEx_MEM_BASE(iface) (0xe5000000 + (iface * 0x1000000))
80354d7675SEmmanuel Vadot#define CP11X_PCIEx_MEM_SIZE(iface) 0xf00000
81354d7675SEmmanuel Vadot#define CP11X_PCIE0_BASE	f6600000
82354d7675SEmmanuel Vadot#define CP11X_PCIE1_BASE	f6620000
83354d7675SEmmanuel Vadot#define CP11X_PCIE2_BASE	f6640000
84354d7675SEmmanuel Vadot
85354d7675SEmmanuel Vadot#include "armada-cp115.dtsi"
86354d7675SEmmanuel Vadot
87354d7675SEmmanuel Vadot#undef CP11X_NAME
88354d7675SEmmanuel Vadot#undef CP11X_BASE
89354d7675SEmmanuel Vadot#undef CP11X_PCIEx_MEM_BASE
90354d7675SEmmanuel Vadot#undef CP11X_PCIEx_MEM_SIZE
91354d7675SEmmanuel Vadot#undef CP11X_PCIE0_BASE
92354d7675SEmmanuel Vadot#undef CP11X_PCIE1_BASE
93354d7675SEmmanuel Vadot#undef CP11X_PCIE2_BASE
94354d7675SEmmanuel Vadot
95354d7675SEmmanuel Vadot&cp2_crypto {
96354d7675SEmmanuel Vadot	status = "disabled";
97354d7675SEmmanuel Vadot};
98354d7675SEmmanuel Vadot
99354d7675SEmmanuel Vadot&cp2_ethernet {
100354d7675SEmmanuel Vadot	status = "okay";
101354d7675SEmmanuel Vadot};
102354d7675SEmmanuel Vadot
103354d7675SEmmanuel Vadot/* SLM-1521-V2, CON9 */
104354d7675SEmmanuel Vadot&cp2_eth0 {
105354d7675SEmmanuel Vadot	status = "disabled";
106354d7675SEmmanuel Vadot	phy-mode = "10gbase-r";
107354d7675SEmmanuel Vadot	/* Generic PHY, providing serdes lanes */
108354d7675SEmmanuel Vadot	phys = <&cp2_comphy4 0>;
109354d7675SEmmanuel Vadot	managed = "in-band-status";
110354d7675SEmmanuel Vadot	sfp = <&cp2_sfp_eth0>;
111354d7675SEmmanuel Vadot};
112354d7675SEmmanuel Vadot
113354d7675SEmmanuel Vadot&cp2_gpio1 {
114354d7675SEmmanuel Vadot	status = "okay";
115354d7675SEmmanuel Vadot};
116354d7675SEmmanuel Vadot
117354d7675SEmmanuel Vadot&cp2_gpio2 {
118354d7675SEmmanuel Vadot	status = "okay";
119354d7675SEmmanuel Vadot};
120354d7675SEmmanuel Vadot
121354d7675SEmmanuel Vadot&cp2_i2c0 {
122354d7675SEmmanuel Vadot	clock-frequency = <100000>;
123354d7675SEmmanuel Vadot
124354d7675SEmmanuel Vadot	/* SLM-1521-V2 - U3 */
125354d7675SEmmanuel Vadot	i2c-mux@72 {
126354d7675SEmmanuel Vadot		compatible = "nxp,pca9544";
127354d7675SEmmanuel Vadot		#address-cells = <1>;
128354d7675SEmmanuel Vadot		#size-cells = <0>;
129354d7675SEmmanuel Vadot		reg = <0x72>;
130354d7675SEmmanuel Vadot		cp2_sfpp0_i2c: i2c@0 {
131354d7675SEmmanuel Vadot			#address-cells = <1>;
132354d7675SEmmanuel Vadot			#size-cells = <0>;
133354d7675SEmmanuel Vadot			reg = <0>;
134354d7675SEmmanuel Vadot		};
135354d7675SEmmanuel Vadot
136354d7675SEmmanuel Vadot		i2c@1 {
137354d7675SEmmanuel Vadot			#address-cells = <1>;
138354d7675SEmmanuel Vadot			#size-cells = <0>;
139354d7675SEmmanuel Vadot			reg = <1>;
140354d7675SEmmanuel Vadot			/* U12 */
141354d7675SEmmanuel Vadot			cp2_module_expander1: pca9555@21 {
142354d7675SEmmanuel Vadot				compatible = "nxp,pca9555";
143354d7675SEmmanuel Vadot				pinctrl-names = "default";
144354d7675SEmmanuel Vadot				gpio-controller;
145354d7675SEmmanuel Vadot				#gpio-cells = <2>;
146354d7675SEmmanuel Vadot				reg = <0x21>;
147354d7675SEmmanuel Vadot			};
148354d7675SEmmanuel Vadot		};
149354d7675SEmmanuel Vadot	};
150354d7675SEmmanuel Vadot};
151354d7675SEmmanuel Vadot
152354d7675SEmmanuel Vadot/* SLM-1521-V2, CON6 */
153354d7675SEmmanuel Vadot&cp2_pcie0 {
154354d7675SEmmanuel Vadot	status = "okay";
155354d7675SEmmanuel Vadot	num-lanes = <2>;
156354d7675SEmmanuel Vadot	num-viewport = <8>;
157354d7675SEmmanuel Vadot	/* Generic PHY, providing serdes lanes */
158354d7675SEmmanuel Vadot	phys = <&cp2_comphy0 0
159354d7675SEmmanuel Vadot		&cp2_comphy1 0>;
160354d7675SEmmanuel Vadot};
161354d7675SEmmanuel Vadot
162354d7675SEmmanuel Vadot/* SLM-1521-V2, CON8 */
163354d7675SEmmanuel Vadot&cp2_pcie2 {
164354d7675SEmmanuel Vadot	status = "okay";
165354d7675SEmmanuel Vadot	num-lanes = <1>;
166354d7675SEmmanuel Vadot	num-viewport = <8>;
167354d7675SEmmanuel Vadot	/* Generic PHY, providing serdes lanes */
168354d7675SEmmanuel Vadot	phys = <&cp2_comphy5 2>;
169354d7675SEmmanuel Vadot};
170354d7675SEmmanuel Vadot
171354d7675SEmmanuel Vadot&cp2_sata0 {
172354d7675SEmmanuel Vadot	status = "okay";
173354d7675SEmmanuel Vadot
174354d7675SEmmanuel Vadot	/* SLM-1521-V2, CON4 */
175354d7675SEmmanuel Vadot	sata-port@0 {
176354d7675SEmmanuel Vadot		/* Generic PHY, providing serdes lanes */
177354d7675SEmmanuel Vadot		phys = <&cp2_comphy2 0>;
178354d7675SEmmanuel Vadot	};
179354d7675SEmmanuel Vadot};
180354d7675SEmmanuel Vadot
181354d7675SEmmanuel Vadot/* CON 2 on SLM-1683 - microSD */
182354d7675SEmmanuel Vadot&cp2_sdhci0 {
183354d7675SEmmanuel Vadot	status = "okay";
184354d7675SEmmanuel Vadot	pinctrl-names = "default";
185354d7675SEmmanuel Vadot	pinctrl-0 = <&cp2_sdhci_pins>;
186354d7675SEmmanuel Vadot	bus-width = <4>;
187354d7675SEmmanuel Vadot	cd-gpios = <&cp2_gpio2 23 GPIO_ACTIVE_LOW>;
188354d7675SEmmanuel Vadot	vqmmc-supply = <&cp2_reg_sd_vccq>;
189354d7675SEmmanuel Vadot};
190354d7675SEmmanuel Vadot
191354d7675SEmmanuel Vadot&cp2_syscon0 {
192354d7675SEmmanuel Vadot	cp2_pinctrl: pinctrl {
193354d7675SEmmanuel Vadot		compatible = "marvell,cp115-standalone-pinctrl";
194354d7675SEmmanuel Vadot
195354d7675SEmmanuel Vadot		cp2_i2c0_pins: cp2-i2c-pins-0 {
196354d7675SEmmanuel Vadot			marvell,pins = "mpp37", "mpp38";
197354d7675SEmmanuel Vadot			marvell,function = "i2c0";
198354d7675SEmmanuel Vadot		};
199354d7675SEmmanuel Vadot		cp2_sdhci_pins: cp2-sdhi-pins-0 {
200354d7675SEmmanuel Vadot			marvell,pins = "mpp56", "mpp57", "mpp58",
201354d7675SEmmanuel Vadot				       "mpp59", "mpp60", "mpp61";
202354d7675SEmmanuel Vadot			marvell,function = "sdio";
203354d7675SEmmanuel Vadot		};
204354d7675SEmmanuel Vadot	};
205354d7675SEmmanuel Vadot};
206354d7675SEmmanuel Vadot
207354d7675SEmmanuel Vadot&cp2_utmi {
208354d7675SEmmanuel Vadot	status = "okay";
209354d7675SEmmanuel Vadot};
210354d7675SEmmanuel Vadot
211354d7675SEmmanuel Vadot&cp2_usb3_0 {
212354d7675SEmmanuel Vadot	status = "okay";
213354d7675SEmmanuel Vadot	usb-phy = <&cp2_usb3_0_phy0>;
214354d7675SEmmanuel Vadot	phys = <&cp2_utmi0>;
215354d7675SEmmanuel Vadot	phy-names = "usb";
216354d7675SEmmanuel Vadot	dr_mode = "host";
217354d7675SEmmanuel Vadot};
218354d7675SEmmanuel Vadot
219354d7675SEmmanuel Vadot/* SLM-1521-V2, CON11 */
220354d7675SEmmanuel Vadot&cp2_usb3_1 {
221354d7675SEmmanuel Vadot	status = "okay";
222354d7675SEmmanuel Vadot	usb-phy = <&cp2_usb3_0_phy1>;
223354d7675SEmmanuel Vadot	/* Generic PHY, providing serdes lanes */
224354d7675SEmmanuel Vadot	phys = <&cp2_comphy3 1>, <&cp2_utmi1>;
225354d7675SEmmanuel Vadot	phy-names = "usb", "utmi";
226354d7675SEmmanuel Vadot	dr_mode = "host";
227354d7675SEmmanuel Vadot};
228