xref: /linux/arch/arm/boot/dts/marvell/orion5x-lacie-d2-network.dts (revision 66e72a01b60ae6950ddbb3585fdc1424d303e14b)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4 * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12#include "orion5x-mv88f5182.dtsi"
13
14/ {
15	model = "LaCie d2 Network";
16	compatible = "lacie,d2-network", "marvell,orion5x-88f5182", "marvell,orion5x";
17
18	memory {
19		device_type = "memory";
20		reg = <0x00000000 0x4000000>; /* 64 MB */
21	};
22
23	chosen {
24		bootargs = "console=ttyS0,115200n8 earlyprintk";
25		stdout-path = &uart0;
26	};
27
28	soc {
29		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
30			 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
31			 <MBUS_ID(0x01, 0x0f) 0 0xfff80000 0x80000>;
32	};
33
34	gpio-keys {
35		compatible = "gpio-keys";
36		pinctrl-0 = <&pmx_buttons>;
37		pinctrl-names = "default";
38
39		button-front {
40			label = "Front Push Button";
41			linux,code = <KEY_POWER>;
42			gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
43		};
44
45		switch-power-rocker-sw-on {
46			label = "Power rocker switch (on|auto)";
47			linux,input-type = <5>; /* EV_SW */
48			linux,code = <1>; /* D2NET_SWITCH_POWER_ON */
49			gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
50		};
51
52		switch-power-rocker-sw-off {
53			label = "Power rocker switch (auto|off)";
54			linux,input-type = <5>; /* EV_SW */
55			linux,code = <2>; /* D2NET_SWITCH_POWER_OFF */
56			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
57		};
58	};
59
60	regulators {
61		compatible = "simple-bus";
62		#address-cells = <1>;
63		#size-cells = <0>;
64		pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power>;
65		pinctrl-names = "default";
66
67		sata0_power: regulator@0 {
68			compatible = "regulator-fixed";
69			reg = <0>;
70			regulator-name = "SATA0 Power";
71			regulator-min-microvolt = <5000000>;
72			regulator-max-microvolt = <5000000>;
73			enable-active-high;
74			regulator-always-on;
75			regulator-boot-on;
76			gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
77		};
78
79		sata1_power: regulator@1 {
80			compatible = "regulator-fixed";
81			reg = <1>;
82			regulator-name = "SATA1 Power";
83			regulator-min-microvolt = <5000000>;
84			regulator-max-microvolt = <5000000>;
85			enable-active-high;
86			regulator-always-on;
87			regulator-boot-on;
88			gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
89		};
90	};
91};
92
93&devbus_bootcs {
94	status = "okay";
95
96	devbus,keep-config;
97
98	/*
99	 * Currently the MTD code does not recognize the MX29LV400CBCT
100	 * as a bottom-type device. This could cause risks of
101	 * accidentally erasing critical flash sectors. We thus define
102	 * a single, write-protected partition covering the whole
103	 * flash.  TODO: once the flash part TOP/BOTTOM detection
104	 * issue is sorted out in the MTD code, break this into at
105	 * least three partitions: 'u-boot code', 'u-boot environment'
106	 * and 'whatever is left'.
107	 */
108	flash@0 {
109		compatible = "cfi-flash";
110		reg = <0 0x80000>;
111		bank-width = <1>;
112                #address-cells = <1>;
113		#size-cells = <1>;
114
115		partition@0 {
116			label = "Full512Kb";
117			reg = <0 0x80000>;
118			read-only;
119		};
120	};
121};
122
123&mdio {
124	status = "okay";
125
126	ethphy: ethernet-phy {
127		reg = <8>;
128	};
129};
130
131&ehci0 {
132	status = "okay";
133};
134
135&eth {
136	status = "okay";
137
138	ethernet-port@0 {
139		phy-handle = <&ethphy>;
140	};
141};
142
143&i2c {
144	status = "okay";
145	clock-frequency = <100000>;
146	#address-cells = <1>;
147
148	rtc@32 {
149		compatible = "ricoh,rs5c372b";
150		reg = <0x32>;
151	};
152
153	fan@3e {
154		compatible = "gmt,g762";
155		reg = <0x3e>;
156
157		/* Not enough HW info */
158		status = "disabled";
159	};
160
161	eeprom@50 {
162		compatible = "atmel,24c08";
163		reg = <0x50>;
164	};
165};
166
167&pinctrl {
168	pinctrl-0 = <&pmx_leds &pmx_board_id &pmx_fan_fail>;
169	pinctrl-names = "default";
170
171	pmx_board_id: pmx-board-id {
172		marvell,pins = "mpp0", "mpp1", "mpp2";
173		marvell,function = "gpio";
174	};
175
176	pmx_buttons: pmx-buttons {
177		marvell,pins = "mpp8", "mpp9", "mpp18";
178		marvell,function = "gpio";
179	};
180
181	pmx_fan_fail: pmx-fan-fail {
182		marvell,pins = "mpp5";
183		marvell,function = "gpio";
184	};
185
186	/*
187	 * MPP6: Red front LED
188	 * MPP16: Blue front LED blink control
189	 */
190	pmx_leds: pmx-leds {
191		marvell,pins = "mpp6", "mpp16";
192		marvell,function = "gpio";
193	};
194
195	pmx_sata0_led_active: pmx-sata0-led-active {
196		marvell,pins = "mpp14";
197		marvell,function = "sata0";
198	};
199
200	pmx_sata0_power: pmx-sata0-power {
201		marvell,pins = "mpp3";
202		marvell,function = "gpio";
203	};
204
205	pmx_sata1_led_active: pmx-sata1-led-active {
206		marvell,pins = "mpp15";
207		marvell,function = "sata1";
208	};
209
210	pmx_sata1_power: pmx-sata1-power {
211		marvell,pins = "mpp12";
212		marvell,function = "gpio";
213	};
214
215	/*
216	 * Non MPP GPIOs:
217	 *  GPIO 22: USB port 1 fuse (0 = Fail, 1 = Ok)
218	 *  GPIO 23: Blue front LED off
219	 *  GPIO 24: Inhibit board power off (0 = Disabled, 1 = Enabled)
220	 */
221};
222
223&sata {
224	pinctrl-0 = <&pmx_sata0_led_active
225		     &pmx_sata1_led_active>;
226	pinctrl-names = "default";
227	status = "okay";
228	nr-ports = <2>;
229};
230
231&uart0 {
232	status = "okay";
233};
234