1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Device Tree file for Helios4
4*724ba675SRob Herring * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828)
5*724ba675SRob Herring *
6*724ba675SRob Herring *  Copyright (C) 2017 Aditya Prayoga <aditya@kobol.io>
7*724ba675SRob Herring *
8*724ba675SRob Herring */
9*724ba675SRob Herring
10*724ba675SRob Herring/dts-v1/;
11*724ba675SRob Herring#include "armada-388.dtsi"
12*724ba675SRob Herring#include "armada-38x-solidrun-microsom.dtsi"
13*724ba675SRob Herring
14*724ba675SRob Herring/ {
15*724ba675SRob Herring	model = "Helios4";
16*724ba675SRob Herring	compatible = "kobol,helios4", "marvell,armada388",
17*724ba675SRob Herring		"marvell,armada385", "marvell,armada380";
18*724ba675SRob Herring
19*724ba675SRob Herring	memory {
20*724ba675SRob Herring		device_type = "memory";
21*724ba675SRob Herring		reg = <0x00000000 0x80000000>; /* 2 GB */
22*724ba675SRob Herring	};
23*724ba675SRob Herring
24*724ba675SRob Herring	aliases {
25*724ba675SRob Herring		/* So that mvebu u-boot can update the MAC addresses */
26*724ba675SRob Herring		ethernet1 = &eth0;
27*724ba675SRob Herring	};
28*724ba675SRob Herring
29*724ba675SRob Herring	chosen {
30*724ba675SRob Herring		stdout-path = "serial0:115200n8";
31*724ba675SRob Herring	};
32*724ba675SRob Herring
33*724ba675SRob Herring	reg_12v: regulator-12v {
34*724ba675SRob Herring		compatible = "regulator-fixed";
35*724ba675SRob Herring		regulator-name = "power_brick_12V";
36*724ba675SRob Herring		regulator-min-microvolt = <12000000>;
37*724ba675SRob Herring		regulator-max-microvolt = <12000000>;
38*724ba675SRob Herring		regulator-always-on;
39*724ba675SRob Herring	};
40*724ba675SRob Herring
41*724ba675SRob Herring	reg_3p3v: regulator-3p3v {
42*724ba675SRob Herring		compatible = "regulator-fixed";
43*724ba675SRob Herring		regulator-name = "3P3V";
44*724ba675SRob Herring		regulator-min-microvolt = <3300000>;
45*724ba675SRob Herring		regulator-max-microvolt = <3300000>;
46*724ba675SRob Herring		regulator-always-on;
47*724ba675SRob Herring		vin-supply = <&reg_12v>;
48*724ba675SRob Herring	};
49*724ba675SRob Herring
50*724ba675SRob Herring	reg_5p0v_hdd: regulator-5v-hdd {
51*724ba675SRob Herring		compatible = "regulator-fixed";
52*724ba675SRob Herring		regulator-name = "5V_HDD";
53*724ba675SRob Herring		regulator-min-microvolt = <5000000>;
54*724ba675SRob Herring		regulator-max-microvolt = <5000000>;
55*724ba675SRob Herring		regulator-always-on;
56*724ba675SRob Herring		vin-supply = <&reg_12v>;
57*724ba675SRob Herring	};
58*724ba675SRob Herring
59*724ba675SRob Herring	reg_5p0v_usb: regulator-5v-usb {
60*724ba675SRob Herring		compatible = "regulator-fixed";
61*724ba675SRob Herring		regulator-name = "USB-PWR";
62*724ba675SRob Herring		regulator-min-microvolt = <5000000>;
63*724ba675SRob Herring		regulator-max-microvolt = <5000000>;
64*724ba675SRob Herring		regulator-boot-on;
65*724ba675SRob Herring		regulator-always-on;
66*724ba675SRob Herring		enable-active-high;
67*724ba675SRob Herring		gpio = <&expander0 6 GPIO_ACTIVE_HIGH>;
68*724ba675SRob Herring		vin-supply = <&reg_12v>;
69*724ba675SRob Herring	};
70*724ba675SRob Herring
71*724ba675SRob Herring	system-leds {
72*724ba675SRob Herring		compatible = "gpio-leds";
73*724ba675SRob Herring		pinctrl-names = "default";
74*724ba675SRob Herring		pinctrl-0 = <&helios_system_led_pins>;
75*724ba675SRob Herring
76*724ba675SRob Herring		status-led {
77*724ba675SRob Herring			label = "helios4:green:status";
78*724ba675SRob Herring			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
79*724ba675SRob Herring			linux,default-trigger = "heartbeat";
80*724ba675SRob Herring			default-state = "on";
81*724ba675SRob Herring		};
82*724ba675SRob Herring
83*724ba675SRob Herring		fault-led {
84*724ba675SRob Herring			label = "helios4:red:fault";
85*724ba675SRob Herring			gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
86*724ba675SRob Herring			default-state = "keep";
87*724ba675SRob Herring		};
88*724ba675SRob Herring	};
89*724ba675SRob Herring
90*724ba675SRob Herring	io-leds {
91*724ba675SRob Herring		compatible = "gpio-leds";
92*724ba675SRob Herring		pinctrl-names = "default";
93*724ba675SRob Herring		pinctrl-0 = <&helios_io_led_pins>;
94*724ba675SRob Herring
95*724ba675SRob Herring		sata1-led {
96*724ba675SRob Herring			label = "helios4:green:ata1";
97*724ba675SRob Herring			gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
98*724ba675SRob Herring			linux,default-trigger = "ata1";
99*724ba675SRob Herring			default-state = "off";
100*724ba675SRob Herring		};
101*724ba675SRob Herring		sata2-led {
102*724ba675SRob Herring			label = "helios4:green:ata2";
103*724ba675SRob Herring			gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
104*724ba675SRob Herring			linux,default-trigger = "ata2";
105*724ba675SRob Herring			default-state = "off";
106*724ba675SRob Herring		};
107*724ba675SRob Herring		sata3-led {
108*724ba675SRob Herring			label = "helios4:green:ata3";
109*724ba675SRob Herring			gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
110*724ba675SRob Herring			linux,default-trigger = "ata3";
111*724ba675SRob Herring			default-state = "off";
112*724ba675SRob Herring		};
113*724ba675SRob Herring		sata4-led {
114*724ba675SRob Herring			label = "helios4:green:ata4";
115*724ba675SRob Herring			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
116*724ba675SRob Herring			linux,default-trigger = "ata4";
117*724ba675SRob Herring			default-state = "off";
118*724ba675SRob Herring		};
119*724ba675SRob Herring		usb-led {
120*724ba675SRob Herring			label = "helios4:green:usb";
121*724ba675SRob Herring			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
122*724ba675SRob Herring			linux,default-trigger = "usb-host";
123*724ba675SRob Herring			default-state = "off";
124*724ba675SRob Herring		};
125*724ba675SRob Herring	};
126*724ba675SRob Herring
127*724ba675SRob Herring	fan1: j10-pwm {
128*724ba675SRob Herring		compatible = "pwm-fan";
129*724ba675SRob Herring		pwms = <&gpio1 9 40000>;	/* Target freq:25 kHz */
130*724ba675SRob Herring		pinctrl-names = "default";
131*724ba675SRob Herring		pinctrl-0 = <&helios_fan1_pins>;
132*724ba675SRob Herring	};
133*724ba675SRob Herring
134*724ba675SRob Herring	fan2: j17-pwm {
135*724ba675SRob Herring		compatible = "pwm-fan";
136*724ba675SRob Herring		pwms = <&gpio1 23 40000>;	/* Target freq:25 kHz */
137*724ba675SRob Herring		pinctrl-names = "default";
138*724ba675SRob Herring		pinctrl-0 = <&helios_fan2_pins>;
139*724ba675SRob Herring	};
140*724ba675SRob Herring
141*724ba675SRob Herring	usb2_phy: usb2-phy {
142*724ba675SRob Herring		compatible = "usb-nop-xceiv";
143*724ba675SRob Herring		vbus-regulator = <&reg_5p0v_usb>;
144*724ba675SRob Herring	};
145*724ba675SRob Herring
146*724ba675SRob Herring	usb3_phy: usb3-phy {
147*724ba675SRob Herring		compatible = "usb-nop-xceiv";
148*724ba675SRob Herring	};
149*724ba675SRob Herring
150*724ba675SRob Herring	soc {
151*724ba675SRob Herring		internal-regs {
152*724ba675SRob Herring			i2c@11000 {
153*724ba675SRob Herring				/*
154*724ba675SRob Herring				 * PCA9655 GPIO expander, up to 1MHz clock.
155*724ba675SRob Herring				 *  0-Board Revision bit 0 #
156*724ba675SRob Herring				 *  1-Board Revision bit 1 #
157*724ba675SRob Herring				 *  5-USB3 overcurrent
158*724ba675SRob Herring				 *  6-USB3 power
159*724ba675SRob Herring				 */
160*724ba675SRob Herring				expander0: gpio-expander@20 {
161*724ba675SRob Herring					/*
162*724ba675SRob Herring					 * This is how it should be:
163*724ba675SRob Herring					 * compatible = "onnn,pca9655",
164*724ba675SRob Herring					 *	 "nxp,pca9555";
165*724ba675SRob Herring					 * but you can't do this because of
166*724ba675SRob Herring					 * the way I2C works.
167*724ba675SRob Herring					 */
168*724ba675SRob Herring					compatible = "nxp,pca9555";
169*724ba675SRob Herring					gpio-controller;
170*724ba675SRob Herring					#gpio-cells = <2>;
171*724ba675SRob Herring					reg = <0x20>;
172*724ba675SRob Herring					pinctrl-names = "default";
173*724ba675SRob Herring					pinctrl-0 = <&pca0_pins>;
174*724ba675SRob Herring					interrupt-parent = <&gpio0>;
175*724ba675SRob Herring					interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
176*724ba675SRob Herring					interrupt-controller;
177*724ba675SRob Herring					#interrupt-cells = <2>;
178*724ba675SRob Herring
179*724ba675SRob Herring					board-rev-bit-0-hog {
180*724ba675SRob Herring						gpio-hog;
181*724ba675SRob Herring						gpios = <0 GPIO_ACTIVE_LOW>;
182*724ba675SRob Herring						input;
183*724ba675SRob Herring						line-name = "board-rev-0";
184*724ba675SRob Herring					};
185*724ba675SRob Herring					board-rev-bit-1-hog {
186*724ba675SRob Herring						gpio-hog;
187*724ba675SRob Herring						gpios = <1 GPIO_ACTIVE_LOW>;
188*724ba675SRob Herring						input;
189*724ba675SRob Herring						line-name = "board-rev-1";
190*724ba675SRob Herring					};
191*724ba675SRob Herring					usb3-ilimit-hog {
192*724ba675SRob Herring						gpio-hog;
193*724ba675SRob Herring						gpios = <5 GPIO_ACTIVE_HIGH>;
194*724ba675SRob Herring						input;
195*724ba675SRob Herring						line-name = "usb-overcurrent-status";
196*724ba675SRob Herring					};
197*724ba675SRob Herring				};
198*724ba675SRob Herring
199*724ba675SRob Herring				temp_sensor: temp@4c {
200*724ba675SRob Herring					compatible = "ti,lm75";
201*724ba675SRob Herring					reg = <0x4c>;
202*724ba675SRob Herring					vcc-supply = <&reg_3p3v>;
203*724ba675SRob Herring				};
204*724ba675SRob Herring			};
205*724ba675SRob Herring
206*724ba675SRob Herring			i2c@11100 {
207*724ba675SRob Herring				/*
208*724ba675SRob Herring				 * External I2C Bus for user peripheral
209*724ba675SRob Herring				 */
210*724ba675SRob Herring				clock-frequency = <400000>;
211*724ba675SRob Herring				pinctrl-0 = <&helios_i2c1_pins>;
212*724ba675SRob Herring				pinctrl-names = "default";
213*724ba675SRob Herring				status = "okay";
214*724ba675SRob Herring			};
215*724ba675SRob Herring
216*724ba675SRob Herring			sata@a8000 {
217*724ba675SRob Herring				status = "okay";
218*724ba675SRob Herring				#address-cells = <1>;
219*724ba675SRob Herring				#size-cells = <0>;
220*724ba675SRob Herring
221*724ba675SRob Herring				sata0: sata-port@0 {
222*724ba675SRob Herring					reg = <0>;
223*724ba675SRob Herring				};
224*724ba675SRob Herring
225*724ba675SRob Herring				sata1: sata-port@1 {
226*724ba675SRob Herring					reg = <1>;
227*724ba675SRob Herring				};
228*724ba675SRob Herring			};
229*724ba675SRob Herring
230*724ba675SRob Herring			sata@e0000 {
231*724ba675SRob Herring				status = "okay";
232*724ba675SRob Herring				#address-cells = <1>;
233*724ba675SRob Herring				#size-cells = <0>;
234*724ba675SRob Herring
235*724ba675SRob Herring				sata2: sata-port@0 {
236*724ba675SRob Herring					reg = <0>;
237*724ba675SRob Herring				};
238*724ba675SRob Herring
239*724ba675SRob Herring				sata3: sata-port@1 {
240*724ba675SRob Herring					reg = <1>;
241*724ba675SRob Herring				};
242*724ba675SRob Herring			};
243*724ba675SRob Herring
244*724ba675SRob Herring			spi@10680 {
245*724ba675SRob Herring				pinctrl-0 = <&spi1_pins
246*724ba675SRob Herring					     &microsom_spi1_cs_pins>;
247*724ba675SRob Herring				pinctrl-names = "default";
248*724ba675SRob Herring				status = "okay";
249*724ba675SRob Herring			};
250*724ba675SRob Herring
251*724ba675SRob Herring			sdhci@d8000 {
252*724ba675SRob Herring				bus-width = <4>;
253*724ba675SRob Herring				cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
254*724ba675SRob Herring				no-1-8-v;
255*724ba675SRob Herring				pinctrl-0 = <&helios_sdhci_pins
256*724ba675SRob Herring					     &helios_sdhci_cd_pins>;
257*724ba675SRob Herring				pinctrl-names = "default";
258*724ba675SRob Herring				status = "okay";
259*724ba675SRob Herring				vmmc = <&reg_3p3v>;
260*724ba675SRob Herring				wp-inverted;
261*724ba675SRob Herring			};
262*724ba675SRob Herring
263*724ba675SRob Herring			usb@58000 {
264*724ba675SRob Herring				usb-phy = <&usb2_phy>;
265*724ba675SRob Herring				status = "okay";
266*724ba675SRob Herring			};
267*724ba675SRob Herring
268*724ba675SRob Herring			usb3@f0000 {
269*724ba675SRob Herring				status = "okay";
270*724ba675SRob Herring			};
271*724ba675SRob Herring
272*724ba675SRob Herring			usb3@f8000 {
273*724ba675SRob Herring				status = "okay";
274*724ba675SRob Herring			};
275*724ba675SRob Herring
276*724ba675SRob Herring			pinctrl@18000 {
277*724ba675SRob Herring				pca0_pins: pca0-pins {
278*724ba675SRob Herring					marvell,pins = "mpp23";
279*724ba675SRob Herring					marvell,function = "gpio";
280*724ba675SRob Herring				};
281*724ba675SRob Herring				microsom_phy0_int_pins: microsom-phy0-int-pins {
282*724ba675SRob Herring					marvell,pins = "mpp18";
283*724ba675SRob Herring					marvell,function = "gpio";
284*724ba675SRob Herring				};
285*724ba675SRob Herring				helios_i2c1_pins: i2c1-pins {
286*724ba675SRob Herring					marvell,pins = "mpp26", "mpp27";
287*724ba675SRob Herring					marvell,function = "i2c1";
288*724ba675SRob Herring				};
289*724ba675SRob Herring				helios_sdhci_cd_pins: helios-sdhci-cd-pins {
290*724ba675SRob Herring					marvell,pins = "mpp20";
291*724ba675SRob Herring					marvell,function = "gpio";
292*724ba675SRob Herring				};
293*724ba675SRob Herring				helios_sdhci_pins: helios-sdhci-pins {
294*724ba675SRob Herring					marvell,pins = "mpp21", "mpp28",
295*724ba675SRob Herring						       "mpp37", "mpp38",
296*724ba675SRob Herring						       "mpp39", "mpp40";
297*724ba675SRob Herring					marvell,function = "sd0";
298*724ba675SRob Herring				};
299*724ba675SRob Herring				helios_system_led_pins: helios-system-led-pins {
300*724ba675SRob Herring					marvell,pins = "mpp24", "mpp25";
301*724ba675SRob Herring					marvell,function = "gpio";
302*724ba675SRob Herring				};
303*724ba675SRob Herring				helios_io_led_pins: helios-io-led-pins {
304*724ba675SRob Herring					marvell,pins = "mpp49", "mpp50",
305*724ba675SRob Herring						       "mpp52", "mpp53",
306*724ba675SRob Herring						       "mpp54";
307*724ba675SRob Herring					marvell,function = "gpio";
308*724ba675SRob Herring				};
309*724ba675SRob Herring				helios_fan1_pins: helios_fan1_pins {
310*724ba675SRob Herring					marvell,pins = "mpp41", "mpp43";
311*724ba675SRob Herring					marvell,function = "gpio";
312*724ba675SRob Herring				};
313*724ba675SRob Herring				helios_fan2_pins: helios_fan2_pins {
314*724ba675SRob Herring					marvell,pins = "mpp48", "mpp55";
315*724ba675SRob Herring					marvell,function = "gpio";
316*724ba675SRob Herring				};
317*724ba675SRob Herring				microsom_spi1_cs_pins: spi1-cs-pins {
318*724ba675SRob Herring					marvell,pins = "mpp59";
319*724ba675SRob Herring					marvell,function = "spi1";
320*724ba675SRob Herring				};
321*724ba675SRob Herring			};
322*724ba675SRob Herring		};
323*724ba675SRob Herring	};
324*724ba675SRob Herring};
325