xref: /linux/scripts/dtc/include-prefixes/arm/marvell/kirkwood-netxbig.dtsi (revision b98a91911d24babe20600ad19697570ea335356f)
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		#address-cells = <1>;
57724ba675SRob Herring		#size-cells = <0>;
58724ba675SRob Herring
59724ba675SRob Herring		/*
60724ba675SRob Herring		 * esc and power represent a three position rocker
61724ba675SRob Herring		 * switch. Thus the conventional KEY_POWER does not fit
62724ba675SRob Herring		 */
63*b98a9191SKrzysztof Kozlowski		button-exc {
64724ba675SRob Herring			label = "Back power switch (on|auto)";
65724ba675SRob Herring			linux,code = <KEY_ESC>;
66724ba675SRob Herring			linux,input-type = <5>;
67724ba675SRob Herring			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68724ba675SRob Herring		};
69*b98a9191SKrzysztof Kozlowski		button-power {
70724ba675SRob Herring			label = "Back power switch (auto|off)";
71724ba675SRob Herring			linux,code = <KEY_1>;
72724ba675SRob Herring			linux,input-type = <5>;
73724ba675SRob Herring			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
74724ba675SRob Herring		};
75*b98a9191SKrzysztof Kozlowski		button-option {
76724ba675SRob Herring			label = "Function button";
77724ba675SRob Herring			linux,code = <KEY_OPTION>;
78724ba675SRob Herring			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
79724ba675SRob Herring		};
80724ba675SRob Herring
81724ba675SRob Herring	};
82724ba675SRob Herring
83724ba675SRob Herring	gpio-poweroff {
84724ba675SRob Herring		compatible = "gpio-poweroff";
85724ba675SRob Herring		gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
86724ba675SRob Herring	};
87724ba675SRob Herring
88724ba675SRob Herring	regulators: regulators {
89724ba675SRob Herring		status = "okay";
90724ba675SRob Herring		compatible = "simple-bus";
91724ba675SRob Herring		#address-cells = <1>;
92724ba675SRob Herring		#size-cells = <0>;
93724ba675SRob Herring		pinctrl-names = "default";
94724ba675SRob Herring
95724ba675SRob Herring		regulator@1 {
96724ba675SRob Herring			compatible = "regulator-fixed";
97724ba675SRob Herring			reg = <1>;
98724ba675SRob Herring			regulator-name = "hdd0power";
99724ba675SRob Herring			regulator-min-microvolt = <5000000>;
100724ba675SRob Herring			regulator-max-microvolt = <5000000>;
101724ba675SRob Herring			enable-active-high;
102724ba675SRob Herring			regulator-always-on;
103724ba675SRob Herring			regulator-boot-on;
104724ba675SRob Herring			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
105724ba675SRob Herring		};
106724ba675SRob Herring	};
107724ba675SRob Herring
108724ba675SRob Herring	netxbig_gpio_ext: netxbig-gpio-ext {
109724ba675SRob Herring		compatible = "lacie,netxbig-gpio-ext";
110724ba675SRob Herring
111724ba675SRob Herring		addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
112724ba675SRob Herring			      &gpio1 16 GPIO_ACTIVE_HIGH
113724ba675SRob Herring			      &gpio1 17 GPIO_ACTIVE_HIGH>;
114724ba675SRob Herring		data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
115724ba675SRob Herring			      &gpio1 13 GPIO_ACTIVE_HIGH
116724ba675SRob Herring			      &gpio1 14 GPIO_ACTIVE_HIGH>;
117724ba675SRob Herring		enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
118724ba675SRob Herring	};
119724ba675SRob Herring
120724ba675SRob Herring	netxbig-leds {
121724ba675SRob Herring		compatible = "lacie,netxbig-leds";
122724ba675SRob Herring
123724ba675SRob Herring		gpio-ext = <&netxbig_gpio_ext>;
124724ba675SRob Herring
125724ba675SRob Herring		timers = <NETXBIG_LED_TIMER1 500 500
126724ba675SRob Herring			  NETXBIG_LED_TIMER2 500 1000>;
127724ba675SRob Herring
128724ba675SRob Herring		blue-power {
129724ba675SRob Herring			label = "netxbig:blue:power";
130724ba675SRob Herring			mode-addr = <0>;
131724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
132724ba675SRob Herring				    NETXBIG_LED_ON 1
133724ba675SRob Herring				    NETXBIG_LED_TIMER1 3
134724ba675SRob Herring				    NETXBIG_LED_TIMER2 7>;
135724ba675SRob Herring			bright-addr = <1>;
136724ba675SRob Herring			max-brightness = <7>;
137724ba675SRob Herring		};
138724ba675SRob Herring		red-power {
139724ba675SRob Herring			label = "netxbig:red:power";
140724ba675SRob Herring			mode-addr = <0>;
141724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
142724ba675SRob Herring				    NETXBIG_LED_ON 2
143724ba675SRob Herring				    NETXBIG_LED_TIMER1 4>;
144724ba675SRob Herring			bright-addr = <1>;
145724ba675SRob Herring			max-brightness = <7>;
146724ba675SRob Herring		};
147724ba675SRob Herring		blue-sata0 {
148724ba675SRob Herring			label = "netxbig:blue:sata0";
149724ba675SRob Herring			mode-addr = <3>;
150724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
151724ba675SRob Herring				    NETXBIG_LED_ON 7
152724ba675SRob Herring				    NETXBIG_LED_SATA 1
153724ba675SRob Herring				    NETXBIG_LED_TIMER1 3>;
154724ba675SRob Herring			bright-addr = <2>;
155724ba675SRob Herring			max-brightness = <7>;
156724ba675SRob Herring		};
157724ba675SRob Herring		red-sata0 {
158724ba675SRob Herring			label = "netxbig:red:sata0";
159724ba675SRob Herring			mode-addr = <3>;
160724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
161724ba675SRob Herring				    NETXBIG_LED_ON 2
162724ba675SRob Herring				    NETXBIG_LED_TIMER1 4>;
163724ba675SRob Herring			bright-addr = <2>;
164724ba675SRob Herring			max-brightness = <7>;
165724ba675SRob Herring		};
166724ba675SRob Herring		blue-sata1 {
167724ba675SRob Herring			label = "netxbig:blue:sata1";
168724ba675SRob Herring			mode-addr = <4>;
169724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
170724ba675SRob Herring				    NETXBIG_LED_ON 7
171724ba675SRob Herring				    NETXBIG_LED_SATA 1
172724ba675SRob Herring				    NETXBIG_LED_TIMER1 3>;
173724ba675SRob Herring			bright-addr = <2>;
174724ba675SRob Herring			max-brightness = <7>;
175724ba675SRob Herring		};
176724ba675SRob Herring		red-sata1 {
177724ba675SRob Herring			label = "netxbig:red:sata1";
178724ba675SRob Herring			mode-addr = <4>;
179724ba675SRob Herring			mode-val = <NETXBIG_LED_OFF 0
180724ba675SRob Herring				    NETXBIG_LED_ON 2
181724ba675SRob Herring				    NETXBIG_LED_TIMER1 4>;
182724ba675SRob Herring			bright-addr = <2>;
183724ba675SRob Herring			max-brightness = <7>;
184724ba675SRob Herring		};
185724ba675SRob Herring	};
186724ba675SRob Herring};
187724ba675SRob Herring
188724ba675SRob Herring&mdio {
189724ba675SRob Herring	status = "okay";
190724ba675SRob Herring
191724ba675SRob Herring	ethphy0: ethernet-phy@0 {
192724ba675SRob Herring		reg = <8>;
193724ba675SRob Herring	};
194724ba675SRob Herring
195724ba675SRob Herring	ethphy1: ethernet-phy@1 {
196724ba675SRob Herring		reg = <0>;
197724ba675SRob Herring	};
198724ba675SRob Herring};
199724ba675SRob Herring
200724ba675SRob Herring&eth0 {
201724ba675SRob Herring	status = "okay";
202724ba675SRob Herring	ethernet0-port@0 {
203724ba675SRob Herring		phy-handle = <&ethphy0>;
204724ba675SRob Herring	};
205724ba675SRob Herring};
206724ba675SRob Herring
207724ba675SRob Herring&pinctrl {
208724ba675SRob Herring	pinctrl-names = "default";
209724ba675SRob Herring
210724ba675SRob Herring	pmx_button_function: pmx-button-function {
211724ba675SRob Herring		marvell,pins = "mpp34";
212724ba675SRob Herring		marvell,function = "gpio";
213724ba675SRob Herring	};
214724ba675SRob Herring	pmx_button_power_off: pmx-button-power-off {
215724ba675SRob Herring		marvell,pins = "mpp15";
216724ba675SRob Herring		marvell,function = "gpio";
217724ba675SRob Herring	};
218724ba675SRob Herring	pmx_button_power_on: pmx-button-power-on {
219724ba675SRob Herring		marvell,pins = "mpp13";
220724ba675SRob Herring		marvell,function = "gpio";
221724ba675SRob Herring	};
222724ba675SRob Herring};
223724ba675SRob Herring
224724ba675SRob Herring&i2c0 {
225724ba675SRob Herring	status = "okay";
226724ba675SRob Herring
227724ba675SRob Herring	eeprom@50 {
228724ba675SRob Herring		compatible = "atmel,24c04";
229724ba675SRob Herring		pagesize = <16>;
230724ba675SRob Herring		reg = <0x50>;
231724ba675SRob Herring	};
232724ba675SRob Herring};
233