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