xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/kirkwood-lsxl.dtsi (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2f126890aSEmmanuel Vadot#include "kirkwood.dtsi"
3f126890aSEmmanuel Vadot#include "kirkwood-6281.dtsi"
4f126890aSEmmanuel Vadot
5f126890aSEmmanuel Vadot/ {
6f126890aSEmmanuel Vadot	chosen {
7f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8 earlyprintk";
8f126890aSEmmanuel Vadot		stdout-path = &uart0;
9f126890aSEmmanuel Vadot	};
10f126890aSEmmanuel Vadot
11f126890aSEmmanuel Vadot	ocp@f1000000 {
12f126890aSEmmanuel Vadot		pinctrl: pin-controller@10000 {
13f126890aSEmmanuel Vadot			/* Non-default UART pins */
14f126890aSEmmanuel Vadot			pmx_uart0: pmx-uart0 {
15f126890aSEmmanuel Vadot				marvell,pins = "mpp4", "mpp5";
16f126890aSEmmanuel Vadot			};
17f126890aSEmmanuel Vadot
18f126890aSEmmanuel Vadot			pmx_power_hdd: pmx-power-hdd {
19f126890aSEmmanuel Vadot				marvell,pins = "mpp10";
20f126890aSEmmanuel Vadot				marvell,function = "gpo";
21f126890aSEmmanuel Vadot			};
22f126890aSEmmanuel Vadot			pmx_usb_vbus: pmx-usb-vbus {
23f126890aSEmmanuel Vadot				marvell,pins = "mpp11";
24f126890aSEmmanuel Vadot				marvell,function = "gpio";
25f126890aSEmmanuel Vadot			};
26f126890aSEmmanuel Vadot			pmx_fan_high: pmx-fan-high {
27f126890aSEmmanuel Vadot				marvell,pins = "mpp18";
28f126890aSEmmanuel Vadot				marvell,function = "gpo";
29f126890aSEmmanuel Vadot			};
30f126890aSEmmanuel Vadot			pmx_fan_low: pmx-fan-low {
31f126890aSEmmanuel Vadot				marvell,pins = "mpp19";
32f126890aSEmmanuel Vadot				marvell,function = "gpo";
33f126890aSEmmanuel Vadot			};
34f126890aSEmmanuel Vadot			pmx_led_function_blue: pmx-led-function-blue {
35f126890aSEmmanuel Vadot				marvell,pins = "mpp36";
36f126890aSEmmanuel Vadot				marvell,function = "gpio";
37f126890aSEmmanuel Vadot			};
38f126890aSEmmanuel Vadot			pmx_led_alarm: pmx-led-alarm {
39f126890aSEmmanuel Vadot				marvell,pins = "mpp37";
40f126890aSEmmanuel Vadot				marvell,function = "gpio";
41f126890aSEmmanuel Vadot			};
42f126890aSEmmanuel Vadot			pmx_led_info: pmx-led-info {
43f126890aSEmmanuel Vadot				marvell,pins = "mpp38";
44f126890aSEmmanuel Vadot				marvell,function = "gpio";
45f126890aSEmmanuel Vadot			};
46f126890aSEmmanuel Vadot			pmx_led_power: pmx-led-power {
47f126890aSEmmanuel Vadot				marvell,pins = "mpp39";
48f126890aSEmmanuel Vadot				marvell,function = "gpio";
49f126890aSEmmanuel Vadot			};
50f126890aSEmmanuel Vadot			pmx_fan_lock: pmx-fan-lock {
51f126890aSEmmanuel Vadot				marvell,pins = "mpp40";
52f126890aSEmmanuel Vadot				marvell,function = "gpio";
53f126890aSEmmanuel Vadot			};
54f126890aSEmmanuel Vadot			pmx_button_function: pmx-button-function {
55f126890aSEmmanuel Vadot				marvell,pins = "mpp41";
56f126890aSEmmanuel Vadot				marvell,function = "gpio";
57f126890aSEmmanuel Vadot			};
58f126890aSEmmanuel Vadot			pmx_power_switch: pmx-power-switch {
59f126890aSEmmanuel Vadot				marvell,pins = "mpp42";
60f126890aSEmmanuel Vadot				marvell,function = "gpio";
61f126890aSEmmanuel Vadot			};
62f126890aSEmmanuel Vadot			pmx_power_auto_switch: pmx-power-auto-switch {
63f126890aSEmmanuel Vadot				marvell,pins = "mpp43";
64f126890aSEmmanuel Vadot				marvell,function = "gpio";
65f126890aSEmmanuel Vadot			};
66f126890aSEmmanuel Vadot			pmx_led_function_red: pmx-led-function_red {
67f126890aSEmmanuel Vadot				marvell,pins = "mpp48";
68f126890aSEmmanuel Vadot				marvell,function = "gpio";
69f126890aSEmmanuel Vadot			};
70f126890aSEmmanuel Vadot
71f126890aSEmmanuel Vadot		};
72f126890aSEmmanuel Vadot		sata@80000 {
73f126890aSEmmanuel Vadot			status = "okay";
74f126890aSEmmanuel Vadot			nr-ports = <1>;
75f126890aSEmmanuel Vadot		};
76f126890aSEmmanuel Vadot
77f126890aSEmmanuel Vadot		spi@10600 {
78f126890aSEmmanuel Vadot			status = "okay";
79f126890aSEmmanuel Vadot
80f126890aSEmmanuel Vadot			m25p40@0 {
81f126890aSEmmanuel Vadot				#address-cells = <1>;
82f126890aSEmmanuel Vadot				#size-cells = <1>;
83f126890aSEmmanuel Vadot				compatible = "m25p40", "jedec,spi-nor";
84f126890aSEmmanuel Vadot				reg = <0>;
85f126890aSEmmanuel Vadot				spi-max-frequency = <25000000>;
86f126890aSEmmanuel Vadot				mode = <0>;
87f126890aSEmmanuel Vadot
88f126890aSEmmanuel Vadot				partition@0 {
89f126890aSEmmanuel Vadot					reg = <0x0 0x60000>;
90f126890aSEmmanuel Vadot					label = "uboot";
91f126890aSEmmanuel Vadot					read-only;
92f126890aSEmmanuel Vadot				};
93f126890aSEmmanuel Vadot
94f126890aSEmmanuel Vadot				partition@60000 {
95f126890aSEmmanuel Vadot					reg = <0x60000 0x10000>;
96f126890aSEmmanuel Vadot					label = "dtb";
97f126890aSEmmanuel Vadot					read-only;
98f126890aSEmmanuel Vadot				};
99f126890aSEmmanuel Vadot
100f126890aSEmmanuel Vadot				partition@70000 {
101f126890aSEmmanuel Vadot					reg = <0x70000 0x10000>;
102f126890aSEmmanuel Vadot					label = "uboot_env";
103f126890aSEmmanuel Vadot				};
104f126890aSEmmanuel Vadot			};
105f126890aSEmmanuel Vadot		};
106f126890aSEmmanuel Vadot	};
107f126890aSEmmanuel Vadot
108f126890aSEmmanuel Vadot	gpio_keys {
109f126890aSEmmanuel Vadot		compatible = "gpio-keys";
110f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_button_function &pmx_power_switch
111f126890aSEmmanuel Vadot			     &pmx_power_auto_switch>;
112f126890aSEmmanuel Vadot		pinctrl-names = "default";
113f126890aSEmmanuel Vadot
114*0e8011faSEmmanuel Vadot		button-option {
115f126890aSEmmanuel Vadot			label = "Function Button";
116f126890aSEmmanuel Vadot			linux,code = <KEY_OPTION>;
117f126890aSEmmanuel Vadot			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
118f126890aSEmmanuel Vadot		};
119*0e8011faSEmmanuel Vadot		button-reserved {
120f126890aSEmmanuel Vadot			label = "Power-on Switch";
121f126890aSEmmanuel Vadot			linux,code = <KEY_RESERVED>;
122f126890aSEmmanuel Vadot			linux,input-type = <5>;
123f126890aSEmmanuel Vadot			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
124f126890aSEmmanuel Vadot		};
125*0e8011faSEmmanuel Vadot		button-power {
126f126890aSEmmanuel Vadot			label = "Power-auto Switch";
127f126890aSEmmanuel Vadot			linux,code = <KEY_ESC>;
128f126890aSEmmanuel Vadot			linux,input-type = <5>;
129f126890aSEmmanuel Vadot			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
130f126890aSEmmanuel Vadot		};
131f126890aSEmmanuel Vadot	};
132f126890aSEmmanuel Vadot
133f126890aSEmmanuel Vadot	gpio_leds {
134f126890aSEmmanuel Vadot		compatible = "gpio-leds";
135f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
136f126890aSEmmanuel Vadot			     &pmx_led_info &pmx_led_power
137f126890aSEmmanuel Vadot			     &pmx_led_function_blue>;
138f126890aSEmmanuel Vadot		pinctrl-names = "default";
139f126890aSEmmanuel Vadot
140*0e8011faSEmmanuel Vadot		led-func-blue {
141f126890aSEmmanuel Vadot			label = "lsxl:blue:func";
142f126890aSEmmanuel Vadot			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
143f126890aSEmmanuel Vadot		};
144f126890aSEmmanuel Vadot
145*0e8011faSEmmanuel Vadot		led-alarm {
146f126890aSEmmanuel Vadot			label = "lsxl:red:alarm";
147f126890aSEmmanuel Vadot			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
148f126890aSEmmanuel Vadot		};
149f126890aSEmmanuel Vadot
150*0e8011faSEmmanuel Vadot		led-info {
151f126890aSEmmanuel Vadot			label = "lsxl:amber:info";
152f126890aSEmmanuel Vadot			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
153f126890aSEmmanuel Vadot		};
154f126890aSEmmanuel Vadot
155*0e8011faSEmmanuel Vadot		led-power {
156f126890aSEmmanuel Vadot			label = "lsxl:blue:power";
157f126890aSEmmanuel Vadot			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
158f126890aSEmmanuel Vadot			default-state = "keep";
159f126890aSEmmanuel Vadot		};
160f126890aSEmmanuel Vadot
161*0e8011faSEmmanuel Vadot		led-func-red {
162f126890aSEmmanuel Vadot			label = "lsxl:red:func";
163f126890aSEmmanuel Vadot			gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
164f126890aSEmmanuel Vadot		};
165f126890aSEmmanuel Vadot	};
166f126890aSEmmanuel Vadot
167f126890aSEmmanuel Vadot	gpio_fan {
168f126890aSEmmanuel Vadot		compatible = "gpio-fan";
169f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
170f126890aSEmmanuel Vadot		pinctrl-names = "default";
171f126890aSEmmanuel Vadot		gpios = <&gpio0 19 GPIO_ACTIVE_LOW
172f126890aSEmmanuel Vadot		         &gpio0 18 GPIO_ACTIVE_LOW>;
1738d13bc63SEmmanuel Vadot		gpio-fan,speed-map =
1748d13bc63SEmmanuel Vadot				<0    3>,
1758d13bc63SEmmanuel Vadot				<1500 2>,
1768d13bc63SEmmanuel Vadot				<3250 1>,
1778d13bc63SEmmanuel Vadot				<5000 0>;
178f126890aSEmmanuel Vadot		alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
179f126890aSEmmanuel Vadot	};
180f126890aSEmmanuel Vadot
181f126890aSEmmanuel Vadot	restart_poweroff {
182f126890aSEmmanuel Vadot		compatible = "restart-poweroff";
183f126890aSEmmanuel Vadot	};
184f126890aSEmmanuel Vadot
185f126890aSEmmanuel Vadot	regulators {
186f126890aSEmmanuel Vadot		compatible = "simple-bus";
187f126890aSEmmanuel Vadot		#address-cells = <1>;
188f126890aSEmmanuel Vadot		#size-cells = <0>;
189f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>;
190f126890aSEmmanuel Vadot		pinctrl-names = "default";
191f126890aSEmmanuel Vadot
192f126890aSEmmanuel Vadot		usb_power: regulator@1 {
193f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
194f126890aSEmmanuel Vadot			reg = <1>;
195f126890aSEmmanuel Vadot			regulator-name = "USB Power";
196f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
197f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
198f126890aSEmmanuel Vadot			enable-active-high;
199f126890aSEmmanuel Vadot			regulator-always-on;
200f126890aSEmmanuel Vadot			regulator-boot-on;
201f126890aSEmmanuel Vadot			gpio = <&gpio0 11 0>;
202f126890aSEmmanuel Vadot		};
203f126890aSEmmanuel Vadot		hdd_power: regulator@2 {
204f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
205f126890aSEmmanuel Vadot			reg = <2>;
206f126890aSEmmanuel Vadot			regulator-name = "HDD Power";
207f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
208f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
209f126890aSEmmanuel Vadot			enable-active-high;
210f126890aSEmmanuel Vadot			regulator-always-on;
211f126890aSEmmanuel Vadot			regulator-boot-on;
212f126890aSEmmanuel Vadot			gpio = <&gpio0 10 0>;
213f126890aSEmmanuel Vadot		};
214f126890aSEmmanuel Vadot	};
215f126890aSEmmanuel Vadot};
216f126890aSEmmanuel Vadot
217f126890aSEmmanuel Vadot&mdio {
218f126890aSEmmanuel Vadot	status = "okay";
219f126890aSEmmanuel Vadot
220f126890aSEmmanuel Vadot	ethphy1: ethernet-phy@8 {
221f126890aSEmmanuel Vadot		reg = <8>;
222f126890aSEmmanuel Vadot	};
223f126890aSEmmanuel Vadot};
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot&eth1 {
226f126890aSEmmanuel Vadot	status = "okay";
227f126890aSEmmanuel Vadot	ethernet1-port@0 {
228f126890aSEmmanuel Vadot		phy-handle = <&ethphy1>;
229f126890aSEmmanuel Vadot	};
230f126890aSEmmanuel Vadot};
231