1 // SPDX-License-Identifier: (GPL-2.0-only OR MIT)
3 * Device Tree file for ipTIME NAS1dual
5 * Copyright (C) 2020 Sungbo Eo <mans0n@gorani.run>
7 * Based on armada-385-linksys.dtsi
8 * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/leds/common.h>
16 #include "armada-385.dtsi"
19 model = "ipTIME NAS1dual";
20 compatible = "iptime,nas1dual", "marvell,armada385", "marvell,armada380";
23 led-boot = &led_ready;
24 led-failsafe = &led_ready;
25 led-running = &led_ready;
26 led-upgrade = &led_ready;
27 label-mac-device = ð0;
31 bootargs = "console=ttyS0,115200n8";
32 stdout-path = "serial0:115200n8";
36 device_type = "memory";
37 reg = <0x00000000 0x80000000>; /* 2GB */
41 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
42 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
43 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
44 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
45 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
49 compatible = "gpio-keys";
50 pinctrl-names = "default";
51 pinctrl-0 = <&gpio_keys_pins>;
54 label = "Power Button";
55 linux,input-type = <EV_SW>;
56 linux,code = <KEY_POWER>;
57 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
61 label = "Reset Button";
62 linux,code = <KEY_RESTART>;
63 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
67 label = "USB Copy Button";
68 linux,code = <KEY_COPY>;
69 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
74 compatible = "gpio-leds";
75 pinctrl-names = "default";
76 pinctrl-0 = <&gpio_leds_pins>;
80 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
85 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
86 linux,default-trigger = "disk-activity";
90 function = LED_FUNCTION_USB;
91 color = <LED_COLOR_ID_BLUE>;
92 gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
93 trigger-sources = <&usb3_0_port1 &usb3_0_port2>;
94 linux,default-trigger = "usbport";
99 compatible = "gpio-fan";
100 pinctrl-names = "default";
101 pinctrl-0 = <&gpio_fan_pins>;
102 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>,
103 <&gpio1 18 GPIO_ACTIVE_HIGH>;
104 /* We don't know the exact rpm, just use dummy values here. */
105 gpio-fan,speed-map = <0 0>, <1 1>, <2 2>;
106 #cooling-cells = <2>;
110 compatible = "gpio-poweroff";
111 gpios = <&pca9536 1 GPIO_ACTIVE_LOW>;
115 compatible = "simple-bus";
116 #address-cells = <1>;
118 pinctrl-names = "default";
119 pinctrl-0 = <&sata_power_pins>;
121 reg_sata_power: regulator@1 {
122 compatible = "regulator-fixed";
124 regulator-name = "sata-power";
125 regulator-min-microvolt = <12000000>;
126 regulator-max-microvolt = <12000000>;
127 gpio = <&gpio1 20 GPIO_ACTIVE_LOW>;
135 #address-cells = <1>;
140 target-supply = <®_sata_power>;
141 #thermal-sensor-cells = <0>;
154 pinctrl-names = "default";
155 pinctrl-0 = <&ge0_rgmii_pins>;
157 phy-handle = <ðphy1>;
158 phy-connection-type = "rgmii-id";
159 buffer-manager = <&bm>;
162 nvmem-cells = <&macaddr_uboot_fffa8>;
163 nvmem-cell-names = "mac-address";
167 pinctrl-names = "default";
168 pinctrl-0 = <&ge1_rgmii_pins>;
170 phy-handle = <ðphy0>;
171 phy-connection-type = "rgmii-id";
172 buffer-manager = <&bm>;
175 nvmem-cells = <&macaddr_uboot_fffa8>;
176 nvmem-cell-names = "mac-address";
180 pinctrl-names = "default";
181 pinctrl-0 = <&i2c0_pins>;
185 compatible = "nxp,pca9536";
189 gpio-line-names = "power-led", "power-board";
194 pinctrl-names = "default";
195 pinctrl-0 = <&mdio_pins>;
197 /* LED1: On - Link, Blink - Activity, Off - No Link */
199 ethphy0: ethernet-phy@0 {
201 marvell,reg-init = <3 16 0 0x1017>;
204 ethphy1: ethernet-phy@1 {
206 marvell,reg-init = <3 16 0 0x1017>;
211 gpio_keys_pins: gpio-keys-pins {
212 marvell,pins = "mpp24", "mpp26", "mpp48";
213 marvell,function = "gpio";
216 gpio_leds_pins: gpio-leds-pins {
217 marvell,pins = "mpp18", "mpp20", "mpp51";
218 marvell,function = "gpio";
221 gpio_fan_pins: gpio-fan-pins {
222 marvell,pins = "mpp25", "mpp50";
223 marvell,function = "gpio";
226 sata_power_pins: sata-power-pins {
227 marvell,pins = "mpp52";
228 marvell,function = "gpio";
231 uart1_pins_alt: uart-pins-1-alt {
232 marvell,pins = "mpp45", "mpp46";
233 marvell,function = "ua1";
238 pinctrl-names = "default";
239 pinctrl-0 = <&spi1_pins>;
243 compatible = "jedec,spi-nor";
245 spi-max-frequency = <40000000>;
248 compatible = "fixed-partitions";
249 #address-cells = <1>;
253 reg = <0x00000000 0x00100000>;
258 compatible = "fixed-layout";
259 #address-cells = <1>;
262 macaddr_uboot_fffa8: macaddr@fffa8 {
269 reg = <0x00100000 0x03ec0000>;
272 compatible = "fixed-partitions";
273 #address-cells = <1>;
277 reg = <0x00000000 0x00600000>;
282 reg = <0x00600000 0x038c0000>;
288 reg = <0x03fc0000 0x00040000>;
297 pinctrl-names = "default";
298 pinctrl-0 = <&uart0_pins>;
303 pinctrl-names = "default";
304 pinctrl-0 = <&uart1_pins_alt>;
310 #address-cells = <1>;
313 usb3_0_port1: port@1 {
315 #trigger-source-cells = <0>;
318 usb3_0_port2: port@2 {
320 #trigger-source-cells = <0>;