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