xref: /freebsd-src/sys/contrib/device-tree/src/arm/marvell/armada-388-clearfog.dts (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree file for SolidRun Clearfog Pro revision A1 rev 2.0 (88F6828)
4f126890aSEmmanuel Vadot *
5f126890aSEmmanuel Vadot *  Copyright (C) 2015 Russell King
6f126890aSEmmanuel Vadot */
7f126890aSEmmanuel Vadot
8f126890aSEmmanuel Vadot/dts-v1/;
9f126890aSEmmanuel Vadot#include "armada-388-clearfog.dtsi"
10f126890aSEmmanuel Vadot
11f126890aSEmmanuel Vadot/ {
12f126890aSEmmanuel Vadot	model = "SolidRun Clearfog A1";
13*01950c46SEmmanuel Vadot	compatible = "solidrun,clearfog-pro-a1", "solidrun,clearfog-a1",
14*01950c46SEmmanuel Vadot		     "marvell,armada388", "marvell,armada385",
15*01950c46SEmmanuel Vadot		     "marvell,armada380";
16f126890aSEmmanuel Vadot
17f126890aSEmmanuel Vadot	soc {
18f126890aSEmmanuel Vadot		internal-regs {
19f126890aSEmmanuel Vadot			usb3@f0000 {
20f126890aSEmmanuel Vadot				/* CON2, nearest CPU, USB2 only. */
21f126890aSEmmanuel Vadot				status = "okay";
22f126890aSEmmanuel Vadot			};
23f126890aSEmmanuel Vadot		};
24f126890aSEmmanuel Vadot
25f126890aSEmmanuel Vadot		pcie {
26f126890aSEmmanuel Vadot			pcie@3,0 {
27f126890aSEmmanuel Vadot				/* Port 2, Lane 0. CON2, nearest CPU. */
28f126890aSEmmanuel Vadot				reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>;
29f126890aSEmmanuel Vadot				status = "okay";
30f126890aSEmmanuel Vadot			};
31f126890aSEmmanuel Vadot		};
32f126890aSEmmanuel Vadot	};
33f126890aSEmmanuel Vadot
34f126890aSEmmanuel Vadot	gpio-keys {
35f126890aSEmmanuel Vadot		compatible = "gpio-keys";
36f126890aSEmmanuel Vadot		pinctrl-0 = <&rear_button_pins>;
37f126890aSEmmanuel Vadot		pinctrl-names = "default";
38f126890aSEmmanuel Vadot
39f126890aSEmmanuel Vadot		button-0 {
40f126890aSEmmanuel Vadot			/* The rear SW3 button */
41f126890aSEmmanuel Vadot			label = "Rear Button";
42f126890aSEmmanuel Vadot			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
43f126890aSEmmanuel Vadot			linux,can-disable;
44f126890aSEmmanuel Vadot			linux,code = <BTN_0>;
45f126890aSEmmanuel Vadot		};
46f126890aSEmmanuel Vadot	};
47f126890aSEmmanuel Vadot};
48f126890aSEmmanuel Vadot
49f126890aSEmmanuel Vadot&eth1 {
50f126890aSEmmanuel Vadot	/* ethernet@30000 */
51f126890aSEmmanuel Vadot	phy-mode = "1000base-x";
52f126890aSEmmanuel Vadot
53f126890aSEmmanuel Vadot	fixed-link {
54f126890aSEmmanuel Vadot		speed = <1000>;
55f126890aSEmmanuel Vadot		full-duplex;
56f126890aSEmmanuel Vadot	};
57f126890aSEmmanuel Vadot};
58f126890aSEmmanuel Vadot
59f126890aSEmmanuel Vadot&expander0 {
60f126890aSEmmanuel Vadot	/*
61f126890aSEmmanuel Vadot	 * PCA9655 GPIO expander:
62f126890aSEmmanuel Vadot	 *  0-CON3 CLKREQ#
63f126890aSEmmanuel Vadot	 *  1-CON3 PERST#
64f126890aSEmmanuel Vadot	 *  2-CON2 PERST#
65f126890aSEmmanuel Vadot	 *  3-CON3 W_DISABLE
66f126890aSEmmanuel Vadot	 *  4-CON2 CLKREQ#
67f126890aSEmmanuel Vadot	 *  5-USB3 overcurrent
68f126890aSEmmanuel Vadot	 *  6-USB3 power
69f126890aSEmmanuel Vadot	 *  7-CON2 W_DISABLE
70f126890aSEmmanuel Vadot	 *  8-JP4 P1
71f126890aSEmmanuel Vadot	 *  9-JP4 P4
72f126890aSEmmanuel Vadot	 * 10-JP4 P5
73f126890aSEmmanuel Vadot	 * 11-m.2 DEVSLP
74f126890aSEmmanuel Vadot	 * 12-SFP_LOS
75f126890aSEmmanuel Vadot	 * 13-SFP_TX_FAULT
76f126890aSEmmanuel Vadot	 * 14-SFP_TX_DISABLE
77f126890aSEmmanuel Vadot	 * 15-SFP_MOD_DEF0
78f126890aSEmmanuel Vadot	 */
79f126890aSEmmanuel Vadot	pcie2-0-clkreq-hog {
80f126890aSEmmanuel Vadot		gpio-hog;
81f126890aSEmmanuel Vadot		gpios = <4 GPIO_ACTIVE_LOW>;
82f126890aSEmmanuel Vadot		input;
83f126890aSEmmanuel Vadot		line-name = "pcie2.0-clkreq";
84f126890aSEmmanuel Vadot	};
85f126890aSEmmanuel Vadot	pcie2-0-w-disable-hog {
86f126890aSEmmanuel Vadot		gpio-hog;
87f126890aSEmmanuel Vadot		gpios = <7 GPIO_ACTIVE_LOW>;
88f126890aSEmmanuel Vadot		output-low;
89f126890aSEmmanuel Vadot		line-name = "pcie2.0-w-disable";
90f126890aSEmmanuel Vadot	};
91f126890aSEmmanuel Vadot};
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot&mdio {
94f126890aSEmmanuel Vadot	status = "okay";
95f126890aSEmmanuel Vadot
968d13bc63SEmmanuel Vadot	ethernet-switch@4 {
97f126890aSEmmanuel Vadot		compatible = "marvell,mv88e6085";
98f126890aSEmmanuel Vadot		reg = <4>;
99f126890aSEmmanuel Vadot		pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
100f126890aSEmmanuel Vadot		pinctrl-names = "default";
101f126890aSEmmanuel Vadot
1028d13bc63SEmmanuel Vadot		ethernet-ports {
103f126890aSEmmanuel Vadot			#address-cells = <1>;
104f126890aSEmmanuel Vadot			#size-cells = <0>;
105f126890aSEmmanuel Vadot
1068d13bc63SEmmanuel Vadot			ethernet-port@0 {
107f126890aSEmmanuel Vadot				reg = <0>;
108f126890aSEmmanuel Vadot				label = "lan5";
109f126890aSEmmanuel Vadot			};
110f126890aSEmmanuel Vadot
1118d13bc63SEmmanuel Vadot			ethernet-port@1 {
112f126890aSEmmanuel Vadot				reg = <1>;
113f126890aSEmmanuel Vadot				label = "lan4";
114f126890aSEmmanuel Vadot			};
115f126890aSEmmanuel Vadot
1168d13bc63SEmmanuel Vadot			ethernet-port@2 {
117f126890aSEmmanuel Vadot				reg = <2>;
118f126890aSEmmanuel Vadot				label = "lan3";
119f126890aSEmmanuel Vadot			};
120f126890aSEmmanuel Vadot
1218d13bc63SEmmanuel Vadot			ethernet-port@3 {
122f126890aSEmmanuel Vadot				reg = <3>;
123f126890aSEmmanuel Vadot				label = "lan2";
124f126890aSEmmanuel Vadot			};
125f126890aSEmmanuel Vadot
1268d13bc63SEmmanuel Vadot			ethernet-port@4 {
127f126890aSEmmanuel Vadot				reg = <4>;
128f126890aSEmmanuel Vadot				label = "lan1";
129f126890aSEmmanuel Vadot			};
130f126890aSEmmanuel Vadot
1318d13bc63SEmmanuel Vadot			ethernet-port@5 {
132f126890aSEmmanuel Vadot				reg = <5>;
133f126890aSEmmanuel Vadot				ethernet = <&eth1>;
134f126890aSEmmanuel Vadot				phy-mode = "1000base-x";
135f126890aSEmmanuel Vadot
136f126890aSEmmanuel Vadot				fixed-link {
137f126890aSEmmanuel Vadot					speed = <1000>;
138f126890aSEmmanuel Vadot					full-duplex;
139f126890aSEmmanuel Vadot				};
140f126890aSEmmanuel Vadot			};
141f126890aSEmmanuel Vadot
1428d13bc63SEmmanuel Vadot			ethernet-port@6 {
143f126890aSEmmanuel Vadot				/* 88E1512 external phy */
144f126890aSEmmanuel Vadot				reg = <6>;
145f126890aSEmmanuel Vadot				label = "lan6";
146f126890aSEmmanuel Vadot				phy-mode = "rgmii-id";
147f126890aSEmmanuel Vadot
148f126890aSEmmanuel Vadot				fixed-link {
149f126890aSEmmanuel Vadot					speed = <1000>;
150f126890aSEmmanuel Vadot					full-duplex;
151f126890aSEmmanuel Vadot				};
152f126890aSEmmanuel Vadot			};
153f126890aSEmmanuel Vadot		};
154f126890aSEmmanuel Vadot	};
155f126890aSEmmanuel Vadot};
156f126890aSEmmanuel Vadot
157f126890aSEmmanuel Vadot&pinctrl {
158f126890aSEmmanuel Vadot	clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins {
159f126890aSEmmanuel Vadot		marvell,pins = "mpp46";
160f126890aSEmmanuel Vadot		marvell,function = "ref";
161f126890aSEmmanuel Vadot	};
162f126890aSEmmanuel Vadot	clearfog_dsa0_pins: clearfog-dsa0-pins {
163f126890aSEmmanuel Vadot		marvell,pins = "mpp23", "mpp41";
164f126890aSEmmanuel Vadot		marvell,function = "gpio";
165f126890aSEmmanuel Vadot	};
166f126890aSEmmanuel Vadot	clearfog_spi1_cs_pins: spi1-cs-pins {
167f126890aSEmmanuel Vadot		marvell,pins = "mpp55";
168f126890aSEmmanuel Vadot		marvell,function = "spi1";
169f126890aSEmmanuel Vadot	};
170f126890aSEmmanuel Vadot	rear_button_pins: rear-button-pins {
171f126890aSEmmanuel Vadot		marvell,pins = "mpp34";
172f126890aSEmmanuel Vadot		marvell,function = "gpio";
173f126890aSEmmanuel Vadot	};
174f126890aSEmmanuel Vadot};
175f126890aSEmmanuel Vadot
176f126890aSEmmanuel Vadot&spi1 {
177f126890aSEmmanuel Vadot	/*
178f126890aSEmmanuel Vadot	 * Add SPI CS pins for clearfog:
179f126890aSEmmanuel Vadot	 * CS0: W25Q32
180f126890aSEmmanuel Vadot	 * CS1:
181f126890aSEmmanuel Vadot	 * CS2: mikrobus
182f126890aSEmmanuel Vadot	 */
183f126890aSEmmanuel Vadot	pinctrl-0 = <&spi1_pins &clearfog_spi1_cs_pins &mikro_spi_pins>;
184f126890aSEmmanuel Vadot};
185