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