xref: /freebsd-src/sys/contrib/device-tree/src/arm/marvell/kirkwood-netxbig.dtsi (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Device Tree common file for LaCie 2Big and 5Big Network v2
4f126890aSEmmanuel Vadot *
5f126890aSEmmanuel Vadot * Copyright (C) 2014
6f126890aSEmmanuel Vadot *
7f126890aSEmmanuel Vadot * Andrew Lunn <andrew@lunn.ch>
8f126890aSEmmanuel Vadot *
9f126890aSEmmanuel Vadot * Based on netxbig_v2-setup.c,
10f126890aSEmmanuel Vadot * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
11f126890aSEmmanuel Vadot *
12f126890aSEmmanuel Vadot*/
13f126890aSEmmanuel Vadot
14f126890aSEmmanuel Vadot#include <dt-bindings/leds/leds-netxbig.h>
15f126890aSEmmanuel Vadot#include "kirkwood.dtsi"
16f126890aSEmmanuel Vadot#include "kirkwood-6281.dtsi"
17f126890aSEmmanuel Vadot
18f126890aSEmmanuel Vadot/ {
19f126890aSEmmanuel Vadot	chosen {
20f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8";
21f126890aSEmmanuel Vadot		stdout-path = &uart0;
22f126890aSEmmanuel Vadot	};
23f126890aSEmmanuel Vadot
24f126890aSEmmanuel Vadot	ocp@f1000000 {
25f126890aSEmmanuel Vadot		serial@12000 {
26f126890aSEmmanuel Vadot			status = "okay";
27f126890aSEmmanuel Vadot		};
28f126890aSEmmanuel Vadot
29f126890aSEmmanuel Vadot		spi@10600 {
30f126890aSEmmanuel Vadot			status = "okay";
31f126890aSEmmanuel Vadot
32f126890aSEmmanuel Vadot			flash@0 {
33f126890aSEmmanuel Vadot				#address-cells = <1>;
34f126890aSEmmanuel Vadot				#size-cells = <1>;
35f126890aSEmmanuel Vadot				compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
36f126890aSEmmanuel Vadot				reg = <0>;
37f126890aSEmmanuel Vadot				spi-max-frequency = <20000000>;
38f126890aSEmmanuel Vadot				mode = <0>;
39f126890aSEmmanuel Vadot
40f126890aSEmmanuel Vadot				partition@0 {
41f126890aSEmmanuel Vadot					reg = <0x0 0x80000>;
42f126890aSEmmanuel Vadot					label = "u-boot";
43f126890aSEmmanuel Vadot				};
44f126890aSEmmanuel Vadot			};
45f126890aSEmmanuel Vadot		};
46f126890aSEmmanuel Vadot
47f126890aSEmmanuel Vadot		sata@80000 {
48f126890aSEmmanuel Vadot			status = "okay";
49f126890aSEmmanuel Vadot			nr-ports = <2>;
50f126890aSEmmanuel Vadot		};
51f126890aSEmmanuel Vadot
52f126890aSEmmanuel Vadot	};
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot	gpio-keys {
55f126890aSEmmanuel Vadot		compatible = "gpio-keys";
56f126890aSEmmanuel Vadot
57f126890aSEmmanuel Vadot		/*
58f126890aSEmmanuel Vadot		 * esc and power represent a three position rocker
59f126890aSEmmanuel Vadot		 * switch. Thus the conventional KEY_POWER does not fit
60f126890aSEmmanuel Vadot		 */
61*0e8011faSEmmanuel Vadot		button-exc {
62f126890aSEmmanuel Vadot			label = "Back power switch (on|auto)";
63f126890aSEmmanuel Vadot			linux,code = <KEY_ESC>;
64f126890aSEmmanuel Vadot			linux,input-type = <5>;
65f126890aSEmmanuel Vadot			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
66f126890aSEmmanuel Vadot		};
67*0e8011faSEmmanuel Vadot		button-power {
68f126890aSEmmanuel Vadot			label = "Back power switch (auto|off)";
69f126890aSEmmanuel Vadot			linux,code = <KEY_1>;
70f126890aSEmmanuel Vadot			linux,input-type = <5>;
71f126890aSEmmanuel Vadot			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
72f126890aSEmmanuel Vadot		};
73*0e8011faSEmmanuel Vadot		button-option {
74f126890aSEmmanuel Vadot			label = "Function button";
75f126890aSEmmanuel Vadot			linux,code = <KEY_OPTION>;
76f126890aSEmmanuel Vadot			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
77f126890aSEmmanuel Vadot		};
78f126890aSEmmanuel Vadot
79f126890aSEmmanuel Vadot	};
80f126890aSEmmanuel Vadot
81f126890aSEmmanuel Vadot	gpio-poweroff {
82f126890aSEmmanuel Vadot		compatible = "gpio-poweroff";
83f126890aSEmmanuel Vadot		gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
84f126890aSEmmanuel Vadot	};
85f126890aSEmmanuel Vadot
86f126890aSEmmanuel Vadot	regulators: regulators {
87f126890aSEmmanuel Vadot		status = "okay";
88f126890aSEmmanuel Vadot		compatible = "simple-bus";
89f126890aSEmmanuel Vadot		#address-cells = <1>;
90f126890aSEmmanuel Vadot		#size-cells = <0>;
91f126890aSEmmanuel Vadot		pinctrl-names = "default";
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot		regulator@1 {
94f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
95f126890aSEmmanuel Vadot			reg = <1>;
96f126890aSEmmanuel Vadot			regulator-name = "hdd0power";
97f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
98f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
99f126890aSEmmanuel Vadot			enable-active-high;
100f126890aSEmmanuel Vadot			regulator-always-on;
101f126890aSEmmanuel Vadot			regulator-boot-on;
102f126890aSEmmanuel Vadot			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
103f126890aSEmmanuel Vadot		};
104f126890aSEmmanuel Vadot	};
105f126890aSEmmanuel Vadot
106f126890aSEmmanuel Vadot	netxbig_gpio_ext: netxbig-gpio-ext {
107f126890aSEmmanuel Vadot		compatible = "lacie,netxbig-gpio-ext";
108f126890aSEmmanuel Vadot
109f126890aSEmmanuel Vadot		addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
110f126890aSEmmanuel Vadot			      &gpio1 16 GPIO_ACTIVE_HIGH
111f126890aSEmmanuel Vadot			      &gpio1 17 GPIO_ACTIVE_HIGH>;
112f126890aSEmmanuel Vadot		data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
113f126890aSEmmanuel Vadot			      &gpio1 13 GPIO_ACTIVE_HIGH
114f126890aSEmmanuel Vadot			      &gpio1 14 GPIO_ACTIVE_HIGH>;
115f126890aSEmmanuel Vadot		enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
116f126890aSEmmanuel Vadot	};
117f126890aSEmmanuel Vadot
118f126890aSEmmanuel Vadot	netxbig-leds {
119f126890aSEmmanuel Vadot		compatible = "lacie,netxbig-leds";
120f126890aSEmmanuel Vadot
121f126890aSEmmanuel Vadot		gpio-ext = <&netxbig_gpio_ext>;
122f126890aSEmmanuel Vadot
123f126890aSEmmanuel Vadot		timers = <NETXBIG_LED_TIMER1 500 500
124f126890aSEmmanuel Vadot			  NETXBIG_LED_TIMER2 500 1000>;
125f126890aSEmmanuel Vadot
126f126890aSEmmanuel Vadot		blue-power {
127f126890aSEmmanuel Vadot			label = "netxbig:blue:power";
128f126890aSEmmanuel Vadot			mode-addr = <0>;
129f126890aSEmmanuel Vadot			mode-val = <NETXBIG_LED_OFF 0
130f126890aSEmmanuel Vadot				    NETXBIG_LED_ON 1
131f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER1 3
132f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER2 7>;
133f126890aSEmmanuel Vadot			bright-addr = <1>;
134f126890aSEmmanuel Vadot			max-brightness = <7>;
135f126890aSEmmanuel Vadot		};
136f126890aSEmmanuel Vadot		red-power {
137f126890aSEmmanuel Vadot			label = "netxbig:red:power";
138f126890aSEmmanuel Vadot			mode-addr = <0>;
139f126890aSEmmanuel Vadot			mode-val = <NETXBIG_LED_OFF 0
140f126890aSEmmanuel Vadot				    NETXBIG_LED_ON 2
141f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER1 4>;
142f126890aSEmmanuel Vadot			bright-addr = <1>;
143f126890aSEmmanuel Vadot			max-brightness = <7>;
144f126890aSEmmanuel Vadot		};
145f126890aSEmmanuel Vadot		blue-sata0 {
146f126890aSEmmanuel Vadot			label = "netxbig:blue:sata0";
147f126890aSEmmanuel Vadot			mode-addr = <3>;
148f126890aSEmmanuel Vadot			mode-val = <NETXBIG_LED_OFF 0
149f126890aSEmmanuel Vadot				    NETXBIG_LED_ON 7
150f126890aSEmmanuel Vadot				    NETXBIG_LED_SATA 1
151f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER1 3>;
152f126890aSEmmanuel Vadot			bright-addr = <2>;
153f126890aSEmmanuel Vadot			max-brightness = <7>;
154f126890aSEmmanuel Vadot		};
155f126890aSEmmanuel Vadot		red-sata0 {
156f126890aSEmmanuel Vadot			label = "netxbig:red:sata0";
157f126890aSEmmanuel Vadot			mode-addr = <3>;
158f126890aSEmmanuel Vadot			mode-val = <NETXBIG_LED_OFF 0
159f126890aSEmmanuel Vadot				    NETXBIG_LED_ON 2
160f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER1 4>;
161f126890aSEmmanuel Vadot			bright-addr = <2>;
162f126890aSEmmanuel Vadot			max-brightness = <7>;
163f126890aSEmmanuel Vadot		};
164f126890aSEmmanuel Vadot		blue-sata1 {
165f126890aSEmmanuel Vadot			label = "netxbig:blue:sata1";
166f126890aSEmmanuel Vadot			mode-addr = <4>;
167f126890aSEmmanuel Vadot			mode-val = <NETXBIG_LED_OFF 0
168f126890aSEmmanuel Vadot				    NETXBIG_LED_ON 7
169f126890aSEmmanuel Vadot				    NETXBIG_LED_SATA 1
170f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER1 3>;
171f126890aSEmmanuel Vadot			bright-addr = <2>;
172f126890aSEmmanuel Vadot			max-brightness = <7>;
173f126890aSEmmanuel Vadot		};
174f126890aSEmmanuel Vadot		red-sata1 {
175f126890aSEmmanuel Vadot			label = "netxbig:red:sata1";
176f126890aSEmmanuel Vadot			mode-addr = <4>;
177f126890aSEmmanuel Vadot			mode-val = <NETXBIG_LED_OFF 0
178f126890aSEmmanuel Vadot				    NETXBIG_LED_ON 2
179f126890aSEmmanuel Vadot				    NETXBIG_LED_TIMER1 4>;
180f126890aSEmmanuel Vadot			bright-addr = <2>;
181f126890aSEmmanuel Vadot			max-brightness = <7>;
182f126890aSEmmanuel Vadot		};
183f126890aSEmmanuel Vadot	};
184f126890aSEmmanuel Vadot};
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot&mdio {
187f126890aSEmmanuel Vadot	status = "okay";
188f126890aSEmmanuel Vadot
189f126890aSEmmanuel Vadot	ethphy0: ethernet-phy@0 {
190f126890aSEmmanuel Vadot		reg = <8>;
191f126890aSEmmanuel Vadot	};
192f126890aSEmmanuel Vadot
193f126890aSEmmanuel Vadot	ethphy1: ethernet-phy@1 {
194f126890aSEmmanuel Vadot		reg = <0>;
195f126890aSEmmanuel Vadot	};
196f126890aSEmmanuel Vadot};
197f126890aSEmmanuel Vadot
198f126890aSEmmanuel Vadot&eth0 {
199f126890aSEmmanuel Vadot	status = "okay";
200f126890aSEmmanuel Vadot	ethernet0-port@0 {
201f126890aSEmmanuel Vadot		phy-handle = <&ethphy0>;
202f126890aSEmmanuel Vadot	};
203f126890aSEmmanuel Vadot};
204f126890aSEmmanuel Vadot
205f126890aSEmmanuel Vadot&pinctrl {
206f126890aSEmmanuel Vadot	pinctrl-names = "default";
207f126890aSEmmanuel Vadot
208f126890aSEmmanuel Vadot	pmx_button_function: pmx-button-function {
209f126890aSEmmanuel Vadot		marvell,pins = "mpp34";
210f126890aSEmmanuel Vadot		marvell,function = "gpio";
211f126890aSEmmanuel Vadot	};
212f126890aSEmmanuel Vadot	pmx_button_power_off: pmx-button-power-off {
213f126890aSEmmanuel Vadot		marvell,pins = "mpp15";
214f126890aSEmmanuel Vadot		marvell,function = "gpio";
215f126890aSEmmanuel Vadot	};
216f126890aSEmmanuel Vadot	pmx_button_power_on: pmx-button-power-on {
217f126890aSEmmanuel Vadot		marvell,pins = "mpp13";
218f126890aSEmmanuel Vadot		marvell,function = "gpio";
219f126890aSEmmanuel Vadot	};
220f126890aSEmmanuel Vadot};
221f126890aSEmmanuel Vadot
222f126890aSEmmanuel Vadot&i2c0 {
223f126890aSEmmanuel Vadot	status = "okay";
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot	eeprom@50 {
226f126890aSEmmanuel Vadot		compatible = "atmel,24c04";
227f126890aSEmmanuel Vadot		pagesize = <16>;
228f126890aSEmmanuel Vadot		reg = <0x50>;
229f126890aSEmmanuel Vadot	};
230f126890aSEmmanuel Vadot};
231