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