xref: /freebsd/sys/contrib/device-tree/src/arm/marvell/kirkwood-dnskw.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
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	model = "D-Link DNS NASes (kirkwood-based)";
7f126890aSEmmanuel Vadot	compatible = "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8f126890aSEmmanuel Vadot
9f126890aSEmmanuel Vadot	gpio_keys {
10f126890aSEmmanuel Vadot		compatible = "gpio-keys";
11f126890aSEmmanuel Vadot		#address-cells = <1>;
12f126890aSEmmanuel Vadot		#size-cells = <0>;
13f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_button_power &pmx_button_unmount
14f126890aSEmmanuel Vadot			     &pmx_button_reset>;
15f126890aSEmmanuel Vadot		pinctrl-names = "default";
16f126890aSEmmanuel Vadot
17f126890aSEmmanuel Vadot		power {
18f126890aSEmmanuel Vadot			label = "Power button";
19f126890aSEmmanuel Vadot			linux,code = <KEY_POWER>;
20f126890aSEmmanuel Vadot			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
21f126890aSEmmanuel Vadot		};
22f126890aSEmmanuel Vadot		eject {
23f126890aSEmmanuel Vadot			label = "USB unmount button";
24f126890aSEmmanuel Vadot			linux,code = <KEY_EJECTCD>;
25f126890aSEmmanuel Vadot			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
26f126890aSEmmanuel Vadot		};
27f126890aSEmmanuel Vadot		reset {
28f126890aSEmmanuel Vadot			label = "Reset button";
29f126890aSEmmanuel Vadot			linux,code = <KEY_RESTART>;
30f126890aSEmmanuel Vadot			gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
31f126890aSEmmanuel Vadot		};
32f126890aSEmmanuel Vadot	};
33f126890aSEmmanuel Vadot
34f126890aSEmmanuel Vadot	gpio_fan {
35f126890aSEmmanuel Vadot		/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
36f126890aSEmmanuel Vadot		compatible = "gpio-fan";
37f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>;
38f126890aSEmmanuel Vadot		pinctrl-names = "default";
39f126890aSEmmanuel Vadot		gpios = <&gpio1 14 GPIO_ACTIVE_HIGH
40f126890aSEmmanuel Vadot			 &gpio1 13 GPIO_ACTIVE_HIGH>;
41*8d13bc63SEmmanuel Vadot		gpio-fan,speed-map = <0    0>,
42*8d13bc63SEmmanuel Vadot				     <3000 1>,
43*8d13bc63SEmmanuel Vadot				     <6000 2>;
44f126890aSEmmanuel Vadot	};
45f126890aSEmmanuel Vadot
46f126890aSEmmanuel Vadot	gpio_poweroff {
47f126890aSEmmanuel Vadot		compatible = "gpio-poweroff";
48f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_power_off>;
49f126890aSEmmanuel Vadot		pinctrl-names = "default";
50f126890aSEmmanuel Vadot		gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
51f126890aSEmmanuel Vadot	};
52f126890aSEmmanuel Vadot
53f126890aSEmmanuel Vadot	ocp@f1000000 {
54f126890aSEmmanuel Vadot		pinctrl: pin-controller@10000 {
55f126890aSEmmanuel Vadot
56f126890aSEmmanuel Vadot			pinctrl-0 = <&pmx_power_back_on &pmx_present_sata0
57f126890aSEmmanuel Vadot				     &pmx_present_sata1 &pmx_fan_tacho
58f126890aSEmmanuel Vadot				     &pmx_temp_alarm>;
59f126890aSEmmanuel Vadot			pinctrl-names = "default";
60f126890aSEmmanuel Vadot
61f126890aSEmmanuel Vadot			pmx_sata0: pmx-sata0 {
62f126890aSEmmanuel Vadot				marvell,pins = "mpp20";
63f126890aSEmmanuel Vadot				marvell,function = "sata1";
64f126890aSEmmanuel Vadot			};
65f126890aSEmmanuel Vadot			pmx_sata1: pmx-sata1 {
66f126890aSEmmanuel Vadot				marvell,pins = "mpp21";
67f126890aSEmmanuel Vadot				marvell,function = "sata0";
68f126890aSEmmanuel Vadot			};
69f126890aSEmmanuel Vadot			pmx_led_power: pmx-led-power {
70f126890aSEmmanuel Vadot				marvell,pins = "mpp26";
71f126890aSEmmanuel Vadot				marvell,function = "gpio";
72f126890aSEmmanuel Vadot			};
73f126890aSEmmanuel Vadot			pmx_led_red_right_hdd: pmx-led-red-right-hdd {
74f126890aSEmmanuel Vadot				marvell,pins = "mpp27";
75f126890aSEmmanuel Vadot				marvell,function = "gpio";
76f126890aSEmmanuel Vadot			};
77f126890aSEmmanuel Vadot			pmx_led_red_left_hdd: pmx-led-red-left-hdd {
78f126890aSEmmanuel Vadot				marvell,pins = "mpp28";
79f126890aSEmmanuel Vadot				marvell,function = "gpio";
80f126890aSEmmanuel Vadot			};
81f126890aSEmmanuel Vadot			pmx_led_red_usb_325: pmx-led-red-usb-325 {
82f126890aSEmmanuel Vadot				marvell,pins = "mpp29";
83f126890aSEmmanuel Vadot				marvell,function = "gpio";
84f126890aSEmmanuel Vadot			};
85f126890aSEmmanuel Vadot			pmx_button_power: pmx-button-power {
86f126890aSEmmanuel Vadot				marvell,pins = "mpp34";
87f126890aSEmmanuel Vadot				marvell,function = "gpio";
88f126890aSEmmanuel Vadot			};
89f126890aSEmmanuel Vadot			pmx_led_red_usb_320: pmx-led-red-usb-320 {
90f126890aSEmmanuel Vadot				marvell,pins = "mpp35";
91f126890aSEmmanuel Vadot				marvell,function = "gpio";
92f126890aSEmmanuel Vadot			};
93f126890aSEmmanuel Vadot			pmx_power_off: pmx-power-off {
94f126890aSEmmanuel Vadot				marvell,pins = "mpp36";
95f126890aSEmmanuel Vadot				marvell,function = "gpio";
96f126890aSEmmanuel Vadot			};
97f126890aSEmmanuel Vadot			pmx_power_back_on: pmx-power-back-on {
98f126890aSEmmanuel Vadot				marvell,pins = "mpp37";
99f126890aSEmmanuel Vadot				marvell,function = "gpio";
100f126890aSEmmanuel Vadot			};
101f126890aSEmmanuel Vadot			pmx_power_sata0: pmx-power-sata0 {
102f126890aSEmmanuel Vadot				marvell,pins = "mpp39";
103f126890aSEmmanuel Vadot				marvell,function = "gpio";
104f126890aSEmmanuel Vadot			};
105f126890aSEmmanuel Vadot			pmx_power_sata1: pmx-power-sata1 {
106f126890aSEmmanuel Vadot				marvell,pins = "mpp40";
107f126890aSEmmanuel Vadot				marvell,function = "gpio";
108f126890aSEmmanuel Vadot			};
109f126890aSEmmanuel Vadot			pmx_present_sata0: pmx-present-sata0 {
110f126890aSEmmanuel Vadot				marvell,pins = "mpp41";
111f126890aSEmmanuel Vadot				marvell,function = "gpio";
112f126890aSEmmanuel Vadot			};
113f126890aSEmmanuel Vadot			pmx_present_sata1: pmx-present-sata1 {
114f126890aSEmmanuel Vadot				marvell,pins = "mpp42";
115f126890aSEmmanuel Vadot				marvell,function = "gpio";
116f126890aSEmmanuel Vadot			};
117f126890aSEmmanuel Vadot			pmx_led_white_usb: pmx-led-white-usb {
118f126890aSEmmanuel Vadot				marvell,pins = "mpp43";
119f126890aSEmmanuel Vadot				marvell,function = "gpio";
120f126890aSEmmanuel Vadot			};
121f126890aSEmmanuel Vadot			pmx_fan_tacho: pmx-fan-tacho {
122f126890aSEmmanuel Vadot				marvell,pins = "mpp44";
123f126890aSEmmanuel Vadot				marvell,function = "gpio";
124f126890aSEmmanuel Vadot			};
125f126890aSEmmanuel Vadot			pmx_fan_high_speed: pmx-fan-high-speed {
126f126890aSEmmanuel Vadot				marvell,pins = "mpp45";
127f126890aSEmmanuel Vadot				marvell,function = "gpio";
128f126890aSEmmanuel Vadot			};
129f126890aSEmmanuel Vadot			pmx_fan_low_speed: pmx-fan-low-speed {
130f126890aSEmmanuel Vadot				marvell,pins = "mpp46";
131f126890aSEmmanuel Vadot				marvell,function = "gpio";
132f126890aSEmmanuel Vadot			};
133f126890aSEmmanuel Vadot			pmx_button_unmount: pmx-button-unmount {
134f126890aSEmmanuel Vadot				marvell,pins = "mpp47";
135f126890aSEmmanuel Vadot				marvell,function = "gpio";
136f126890aSEmmanuel Vadot			};
137f126890aSEmmanuel Vadot			pmx_button_reset: pmx-button-reset {
138f126890aSEmmanuel Vadot				marvell,pins = "mpp48";
139f126890aSEmmanuel Vadot				marvell,function = "gpio";
140f126890aSEmmanuel Vadot			};
141f126890aSEmmanuel Vadot			pmx_temp_alarm: pmx-temp-alarm {
142f126890aSEmmanuel Vadot				marvell,pins = "mpp49";
143f126890aSEmmanuel Vadot				marvell,function = "gpio";
144f126890aSEmmanuel Vadot			};
145f126890aSEmmanuel Vadot		};
146f126890aSEmmanuel Vadot		sata@80000 {
147f126890aSEmmanuel Vadot			pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
148f126890aSEmmanuel Vadot			pinctrl-names = "default";
149f126890aSEmmanuel Vadot			status = "okay";
150f126890aSEmmanuel Vadot			nr-ports = <2>;
151f126890aSEmmanuel Vadot		};
152f126890aSEmmanuel Vadot	};
153f126890aSEmmanuel Vadot
154f126890aSEmmanuel Vadot	regulators {
155f126890aSEmmanuel Vadot		compatible = "simple-bus";
156f126890aSEmmanuel Vadot		#address-cells = <1>;
157f126890aSEmmanuel Vadot		#size-cells = <0>;
158f126890aSEmmanuel Vadot		pinctrl-0 = <&pmx_power_sata0 &pmx_power_sata1>;
159f126890aSEmmanuel Vadot		pinctrl-names = "default";
160f126890aSEmmanuel Vadot
161f126890aSEmmanuel Vadot		sata0_power: regulator@1 {
162f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
163f126890aSEmmanuel Vadot			reg = <1>;
164f126890aSEmmanuel Vadot			regulator-name = "SATA0 Power";
165f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
166f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
167f126890aSEmmanuel Vadot			enable-active-high;
168f126890aSEmmanuel Vadot			regulator-always-on;
169f126890aSEmmanuel Vadot			regulator-boot-on;
170f126890aSEmmanuel Vadot			gpio = <&gpio1 7 0>;
171f126890aSEmmanuel Vadot		};
172f126890aSEmmanuel Vadot		sata1_power: regulator@2 {
173f126890aSEmmanuel Vadot			compatible = "regulator-fixed";
174f126890aSEmmanuel Vadot			reg = <2>;
175f126890aSEmmanuel Vadot			regulator-name = "SATA1 Power";
176f126890aSEmmanuel Vadot			regulator-min-microvolt = <5000000>;
177f126890aSEmmanuel Vadot			regulator-max-microvolt = <5000000>;
178f126890aSEmmanuel Vadot			enable-active-high;
179f126890aSEmmanuel Vadot			regulator-always-on;
180f126890aSEmmanuel Vadot			regulator-boot-on;
181f126890aSEmmanuel Vadot			gpio = <&gpio1 8 0>;
182f126890aSEmmanuel Vadot		};
183f126890aSEmmanuel Vadot	};
184f126890aSEmmanuel Vadot};
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot&nand {
187f126890aSEmmanuel Vadot	status = "okay";
188f126890aSEmmanuel Vadot	chip-delay = <35>;
189f126890aSEmmanuel Vadot
190f126890aSEmmanuel Vadot	partition@0 {
191f126890aSEmmanuel Vadot		label = "u-boot";
192f126890aSEmmanuel Vadot		reg = <0x0000000 0x100000>;
193f126890aSEmmanuel Vadot		read-only;
194f126890aSEmmanuel Vadot	};
195f126890aSEmmanuel Vadot
196f126890aSEmmanuel Vadot	partition@100000 {
197f126890aSEmmanuel Vadot		label = "uImage";
198f126890aSEmmanuel Vadot		reg = <0x0100000 0x500000>;
199f126890aSEmmanuel Vadot	};
200f126890aSEmmanuel Vadot
201f126890aSEmmanuel Vadot	partition@600000 {
202f126890aSEmmanuel Vadot		label = "ramdisk";
203f126890aSEmmanuel Vadot		reg = <0x0600000 0x500000>;
204f126890aSEmmanuel Vadot	};
205f126890aSEmmanuel Vadot
206f126890aSEmmanuel Vadot	partition@b00000 {
207f126890aSEmmanuel Vadot		label = "image";
208f126890aSEmmanuel Vadot		reg = <0x0b00000 0x6600000>;
209f126890aSEmmanuel Vadot	};
210f126890aSEmmanuel Vadot
211f126890aSEmmanuel Vadot	partition@7100000 {
212f126890aSEmmanuel Vadot		label = "mini firmware";
213f126890aSEmmanuel Vadot		reg = <0x7100000 0xa00000>;
214f126890aSEmmanuel Vadot	};
215f126890aSEmmanuel Vadot
216f126890aSEmmanuel Vadot	partition@7b00000 {
217f126890aSEmmanuel Vadot		label = "config";
218f126890aSEmmanuel Vadot		reg = <0x7b00000 0x500000>;
219f126890aSEmmanuel Vadot	};
220f126890aSEmmanuel Vadot};
221f126890aSEmmanuel Vadot
222f126890aSEmmanuel Vadot&mdio {
223f126890aSEmmanuel Vadot	status = "okay";
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot	ethphy0: ethernet-phy@8 {
226f126890aSEmmanuel Vadot		reg = <8>;
227f126890aSEmmanuel Vadot	};
228f126890aSEmmanuel Vadot};
229f126890aSEmmanuel Vadot
230f126890aSEmmanuel Vadot&eth0 {
231f126890aSEmmanuel Vadot	status = "okay";
232f126890aSEmmanuel Vadot	ethernet0-port@0 {
233f126890aSEmmanuel Vadot		phy-handle = <&ethphy0>;
234f126890aSEmmanuel Vadot	};
235f126890aSEmmanuel Vadot};
236