xref: /linux/scripts/dtc/include-prefixes/arm/marvell/kirkwood-netxbig.dtsi (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0
2724ba675SRob Herring/*
3724ba675SRob Herring * Device Tree common file for LaCie 2Big and 5Big Network v2
4724ba675SRob Herring *
5724ba675SRob Herring * Copyright (C) 2014
6724ba675SRob Herring *
7724ba675SRob Herring * Andrew Lunn <andrew@lunn.ch>
8724ba675SRob Herring *
9724ba675SRob Herring * Based on netxbig_v2-setup.c,
10724ba675SRob Herring * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
11724ba675SRob Herring *
12724ba675SRob Herring*/
13724ba675SRob Herring
14724ba675SRob Herring#include <dt-bindings/leds/leds-netxbig.h>
15724ba675SRob Herring#include "kirkwood.dtsi"
16724ba675SRob Herring#include "kirkwood-6281.dtsi"
17724ba675SRob Herring
18724ba675SRob Herring/ {
19724ba675SRob Herring	chosen {
20724ba675SRob Herring		bootargs = "console=ttyS0,115200n8";
21724ba675SRob Herring		stdout-path = &uart0;
22724ba675SRob Herring	};
23724ba675SRob Herring
24724ba675SRob Herring	ocp@f1000000 {
25724ba675SRob Herring		serial@12000 {
26724ba675SRob Herring			status = "okay";
27724ba675SRob Herring		};
28724ba675SRob Herring
29724ba675SRob Herring		spi@10600 {
30724ba675SRob Herring			status = "okay";
31724ba675SRob Herring
32724ba675SRob Herring			flash@0 {
33724ba675SRob Herring				#address-cells = <1>;
34724ba675SRob Herring				#size-cells = <1>;
35724ba675SRob Herring				compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
36724ba675SRob Herring				reg = <0>;
37724ba675SRob Herring				spi-max-frequency = <20000000>;
38724ba675SRob Herring				mode = <0>;
39724ba675SRob Herring
40724ba675SRob Herring				partition@0 {
41724ba675SRob Herring					reg = <0x0 0x80000>;
42724ba675SRob Herring					label = "u-boot";
43724ba675SRob Herring				};
44724ba675SRob Herring			};
45724ba675SRob Herring		};
46724ba675SRob Herring
47724ba675SRob Herring		sata@80000 {
48724ba675SRob Herring			status = "okay";
49724ba675SRob Herring			nr-ports = <2>;
50724ba675SRob Herring		};
51724ba675SRob Herring
52724ba675SRob Herring	};
53724ba675SRob Herring
54724ba675SRob Herring	gpio-keys {
55724ba675SRob Herring		compatible = "gpio-keys";
56724ba675SRob Herring
57724ba675SRob Herring		/*
58724ba675SRob Herring		 * esc and power represent a three position rocker
59724ba675SRob Herring		 * switch. Thus the conventional KEY_POWER does not fit
60724ba675SRob Herring		 */
61*b98a9191SKrzysztof Kozlowski		button-exc {
62724ba675SRob Herring			label = "Back power switch (on|auto)";
63724ba675SRob Herring			linux,code = <KEY_ESC>;
64724ba675SRob Herring			linux,input-type = <5>;
65724ba675SRob Herring			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
66724ba675SRob Herring		};
67*b98a9191SKrzysztof Kozlowski		button-power {
68724ba675SRob Herring			label = "Back power switch (auto|off)";
69724ba675SRob Herring			linux,code = <KEY_1>;
70724ba675SRob Herring			linux,input-type = <5>;
71724ba675SRob Herring			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
72724ba675SRob Herring		};
73*b98a9191SKrzysztof Kozlowski		button-option {
74724ba675SRob Herring			label = "Function button";
75724ba675SRob Herring			linux,code = <KEY_OPTION>;
76724ba675SRob Herring			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
77724ba675SRob Herring		};
78724ba675SRob Herring
79724ba675SRob Herring	};
80724ba675SRob Herring
81724ba675SRob Herring	gpio-poweroff {
82724ba675SRob Herring		compatible = "gpio-poweroff";
83724ba675SRob Herring		gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
84724ba675SRob Herring	};
85724ba675SRob Herring
86724ba675SRob Herring	regulators: regulators {
87724ba675SRob Herring		status = "okay";
88724ba675SRob Herring		compatible = "simple-bus";
89724ba675SRob Herring		#address-cells = <1>;
90724ba675SRob Herring		#size-cells = <0>;
91724ba675SRob Herring		pinctrl-names = "default";
92724ba675SRob Herring
93724ba675SRob Herring		regulator@1 {
94724ba675SRob Herring			compatible = "regulator-fixed";
95724ba675SRob Herring			reg = <1>;
96724ba675SRob Herring			regulator-name = "hdd0power";
97724ba675SRob Herring			regulator-min-microvolt = <5000000>;
98724ba675SRob Herring			regulator-max-microvolt = <5000000>;
99724ba675SRob Herring			enable-active-high;
100724ba675SRob Herring			regulator-always-on;
101724ba675SRob Herring			regulator-boot-on;
102724ba675SRob Herring			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
103724ba675SRob Herring		};
104724ba675SRob Herring	};
105724ba675SRob Herring
106724ba675SRob Herring	netxbig_gpio_ext: netxbig-gpio-ext {
107724ba675SRob Herring		compatible = "lacie,netxbig-gpio-ext";
108724ba675SRob Herring
109724ba675SRob Herring		addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
110724ba675SRob Herring			      &gpio1 16 GPIO_ACTIVE_HIGH
111724ba675SRob Herring			      &gpio1 17 GPIO_ACTIVE_HIGH>;
112724ba675SRob Herring		data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
113724ba675SRob Herring			      &gpio1 13 GPIO_ACTIVE_HIGH
114724ba675SRob Herring			      &gpio1 14 GPIO_ACTIVE_HIGH>;
115724ba675SRob Herring		enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
116724ba675SRob Herring	};
117724ba675SRob Herring
118724ba675SRob Herring	netxbig-leds {
119724ba675SRob Herring		compatible = "lacie,netxbig-leds";
120724ba675SRob Herring
121724ba675SRob Herring		gpio-ext = <&netxbig_gpio_ext>;
122724ba675SRob Herring
123724ba675SRob Herring		timers = <NETXBIG_LED_TIMER1 500 500
124724ba675SRob Herring			  NETXBIG_LED_TIMER2 500 1000>;
125724ba675SRob Herring
126724ba675SRob Herring		blue-power {
127724ba675SRob Herring			label = "netxbig:blue:power";
128724ba675SRob Herring			mode-addr = <0>;
129724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
130724ba675SRob Herring				    NETXBIG_LED_ON 1
131724ba675SRob Herring				    NETXBIG_LED_TIMER1 3
132724ba675SRob Herring				    NETXBIG_LED_TIMER2 7>;
133724ba675SRob Herring			bright-addr = <1>;
134724ba675SRob Herring			max-brightness = <7>;
135724ba675SRob Herring		};
136724ba675SRob Herring		red-power {
137724ba675SRob Herring			label = "netxbig:red:power";
138724ba675SRob Herring			mode-addr = <0>;
139724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
140724ba675SRob Herring				    NETXBIG_LED_ON 2
141724ba675SRob Herring				    NETXBIG_LED_TIMER1 4>;
142724ba675SRob Herring			bright-addr = <1>;
143724ba675SRob Herring			max-brightness = <7>;
144724ba675SRob Herring		};
145724ba675SRob Herring		blue-sata0 {
146724ba675SRob Herring			label = "netxbig:blue:sata0";
147724ba675SRob Herring			mode-addr = <3>;
148724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
149724ba675SRob Herring				    NETXBIG_LED_ON 7
150724ba675SRob Herring				    NETXBIG_LED_SATA 1
151724ba675SRob Herring				    NETXBIG_LED_TIMER1 3>;
152724ba675SRob Herring			bright-addr = <2>;
153724ba675SRob Herring			max-brightness = <7>;
154724ba675SRob Herring		};
155724ba675SRob Herring		red-sata0 {
156724ba675SRob Herring			label = "netxbig:red:sata0";
157724ba675SRob Herring			mode-addr = <3>;
158724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
159724ba675SRob Herring				    NETXBIG_LED_ON 2
160724ba675SRob Herring				    NETXBIG_LED_TIMER1 4>;
161724ba675SRob Herring			bright-addr = <2>;
162724ba675SRob Herring			max-brightness = <7>;
163724ba675SRob Herring		};
164724ba675SRob Herring		blue-sata1 {
165724ba675SRob Herring			label = "netxbig:blue:sata1";
166724ba675SRob Herring			mode-addr = <4>;
167724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
168724ba675SRob Herring				    NETXBIG_LED_ON 7
169724ba675SRob Herring				    NETXBIG_LED_SATA 1
170724ba675SRob Herring				    NETXBIG_LED_TIMER1 3>;
171724ba675SRob Herring			bright-addr = <2>;
172724ba675SRob Herring			max-brightness = <7>;
173724ba675SRob Herring		};
174724ba675SRob Herring		red-sata1 {
175724ba675SRob Herring			label = "netxbig:red:sata1";
176724ba675SRob Herring			mode-addr = <4>;
177724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
178724ba675SRob Herring				    NETXBIG_LED_ON 2
179724ba675SRob Herring				    NETXBIG_LED_TIMER1 4>;
180724ba675SRob Herring			bright-addr = <2>;
181724ba675SRob Herring			max-brightness = <7>;
182724ba675SRob Herring		};
183724ba675SRob Herring	};
184724ba675SRob Herring};
185724ba675SRob Herring
186724ba675SRob Herring&mdio {
187724ba675SRob Herring	status = "okay";
188724ba675SRob Herring
189724ba675SRob Herring	ethphy0: ethernet-phy@0 {
190724ba675SRob Herring		reg = <8>;
191724ba675SRob Herring	};
192724ba675SRob Herring
193724ba675SRob Herring	ethphy1: ethernet-phy@1 {
194724ba675SRob Herring		reg = <0>;
195724ba675SRob Herring	};
196724ba675SRob Herring};
197724ba675SRob Herring
198724ba675SRob Herring&eth0 {
199724ba675SRob Herring	status = "okay";
200724ba675SRob Herring	ethernet0-port@0 {
201724ba675SRob Herring		phy-handle = <&ethphy0>;
202724ba675SRob Herring	};
203724ba675SRob Herring};
204724ba675SRob Herring
205724ba675SRob Herring&pinctrl {
206724ba675SRob Herring	pinctrl-names = "default";
207724ba675SRob Herring
208724ba675SRob Herring	pmx_button_function: pmx-button-function {
209724ba675SRob Herring		marvell,pins = "mpp34";
210724ba675SRob Herring		marvell,function = "gpio";
211724ba675SRob Herring	};
212724ba675SRob Herring	pmx_button_power_off: pmx-button-power-off {
213724ba675SRob Herring		marvell,pins = "mpp15";
214724ba675SRob Herring		marvell,function = "gpio";
215724ba675SRob Herring	};
216724ba675SRob Herring	pmx_button_power_on: pmx-button-power-on {
217724ba675SRob Herring		marvell,pins = "mpp13";
218724ba675SRob Herring		marvell,function = "gpio";
219724ba675SRob Herring	};
220724ba675SRob Herring};
221724ba675SRob Herring
222724ba675SRob Herring&i2c0 {
223724ba675SRob Herring	status = "okay";
224724ba675SRob Herring
225724ba675SRob Herring	eeprom@50 {
226724ba675SRob Herring		compatible = "atmel,24c04";
227724ba675SRob Herring		pagesize = <16>;
228724ba675SRob Herring		reg = <0x50>;
229724ba675SRob Herring	};
230724ba675SRob Herring};
231