0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Device Tree file for D-Link DNS-327L
0004 *
0005 * Copyright (C) 2015, Andrew Andrianov <andrew@ncrmnt.org>
0006 */
0007
0008 /* Remaining unsolved:
0009 * There's still some unknown device on i2c address 0x13
0010 */
0011
0012 /dts-v1/;
0013
0014 #include <dt-bindings/input/input.h>
0015 #include <dt-bindings/gpio/gpio.h>
0016 #include "armada-370.dtsi"
0017
0018 / {
0019 model = "D-Link DNS-327L";
0020 compatible = "dlink,dns327l",
0021 "marvell,armada370",
0022 "marvell,armada-370-xp";
0023
0024 chosen {
0025 stdout-path = &uart0;
0026 };
0027
0028 memory@0 {
0029 device_type = "memory";
0030 reg = <0x00000000 0x20000000>; /* 512 MiB */
0031 };
0032
0033 soc {
0034 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
0035 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
0036 MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
0037
0038 internal-regs {
0039 sata@a0000 {
0040 nr-ports = <2>;
0041 status = "okay";
0042 };
0043
0044 usb@50000 {
0045 status = "okay";
0046 };
0047 };
0048 };
0049
0050 gpio-keys {
0051 compatible = "gpio-keys";
0052 pinctrl-0 = <
0053 &backup_button_pin
0054 &power_button_pin
0055 &reset_button_pin>;
0056 pinctrl-names = "default";
0057
0058 power-button {
0059 label = "Power Button";
0060 linux,code = <KEY_POWER>;
0061 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
0062 };
0063
0064 backup-button {
0065 label = "Backup Button";
0066 linux,code = <KEY_COPY>;
0067 gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
0068 };
0069
0070 reset-button {
0071 label = "Reset Button";
0072 linux,code = <KEY_RESTART>;
0073 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
0074 };
0075 };
0076
0077 gpio-leds {
0078 compatible = "gpio-leds";
0079 pinctrl-0 = <
0080 &sata_l_amber_pin
0081 &sata_r_amber_pin
0082 &backup_led_pin
0083 /* Ensure these are managed by hardware */
0084 &sata_l_white_pin
0085 &sata_r_white_pin>;
0086
0087 pinctrl-names = "default";
0088
0089 sata-r-amber-pin {
0090 label = "dns327l:amber:sata-r";
0091 gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
0092 default-state = "keep";
0093 };
0094
0095 sata-l-amber-pin {
0096 label = "dns327l:amber:sata-l";
0097 gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
0098 default-state = "keep";
0099 };
0100
0101 backup-led-pin {
0102 label = "dns327l:white:usb";
0103 gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
0104 default-state = "keep";
0105 };
0106 };
0107
0108 regulators {
0109 compatible = "simple-bus";
0110 #address-cells = <1>;
0111 #size-cells = <0>;
0112
0113 usb_power: regulator@1 {
0114 compatible = "regulator-fixed";
0115 reg = <1>;
0116 pinctrl-0 = <&xhci_pwr_pin>;
0117 pinctrl-names = "default";
0118 regulator-name = "USB3.0 Port Power";
0119 regulator-min-microvolt = <5000000>;
0120 regulator-max-microvolt = <5000000>;
0121 enable-active-high;
0122 regulator-boot-on;
0123 regulator-always-on;
0124 gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
0125 };
0126
0127 sata_r_power: regulator@2 {
0128 compatible = "regulator-fixed";
0129 reg = <2>;
0130 pinctrl-0 = <&sata_r_pwr_pin>;
0131 pinctrl-names = "default";
0132 regulator-name = "SATA-R Power";
0133 regulator-min-microvolt = <5000000>;
0134 regulator-max-microvolt = <5000000>;
0135 startup-delay-us = <2000000>;
0136 enable-active-high;
0137 regulator-always-on;
0138 regulator-boot-on;
0139 gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
0140 };
0141
0142 sata_l_power: regulator@3 {
0143 compatible = "regulator-fixed";
0144 reg = <3>;
0145 pinctrl-0 = <&sata_l_pwr_pin>;
0146 pinctrl-names = "default";
0147 regulator-name = "SATA-L Power";
0148 regulator-min-microvolt = <5000000>;
0149 regulator-max-microvolt = <5000000>;
0150 startup-delay-us = <4000000>;
0151 enable-active-high;
0152 regulator-always-on;
0153 regulator-boot-on;
0154 gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
0155 };
0156 };
0157 };
0158
0159 &pciec {
0160 status = "okay";
0161
0162 pcie@1,0 {
0163 /* Port 0, Lane 0 */
0164 status = "okay";
0165 };
0166
0167 pcie@2,0 {
0168 /* Port 1, Lane 0 */
0169 status = "okay";
0170 };
0171 };
0172
0173 &pinctrl {
0174 sata_l_white_pin: sata-l-white-pin {
0175 marvell,pins = "mpp57";
0176 marvell,function = "sata0";
0177 };
0178
0179 sata_r_white_pin: sata-r-white-pin {
0180 marvell,pins = "mpp55";
0181 marvell,function = "sata1";
0182 };
0183
0184 sata_r_amber_pin: sata-r-amber-pin {
0185 marvell,pins = "mpp52";
0186 marvell,function = "gpio";
0187 };
0188
0189 sata_l_amber_pin: sata-l-amber-pin {
0190 marvell,pins = "mpp53";
0191 marvell,function = "gpio";
0192 };
0193
0194 backup_led_pin: backup-led-pin {
0195 marvell,pins = "mpp61";
0196 marvell,function = "gpo";
0197 };
0198
0199 xhci_pwr_pin: xhci-pwr-pin {
0200 marvell,pins = "mpp13";
0201 marvell,function = "gpio";
0202 };
0203
0204 sata_r_pwr_pin: sata-r-pwr-pin {
0205 marvell,pins = "mpp54";
0206 marvell,function = "gpio";
0207 };
0208
0209 sata_l_pwr_pin: sata-l-pwr-pin {
0210 marvell,pins = "mpp56";
0211 marvell,function = "gpio";
0212 };
0213
0214 uart1_pins: uart1-pins {
0215 marvell,pins = "mpp60", "mpp61";
0216 marvell,function = "uart1";
0217 };
0218
0219 power_button_pin: power-button-pin {
0220 marvell,pins = "mpp65";
0221 marvell,function = "gpio";
0222 };
0223
0224 backup_button_pin: backup-button-pin {
0225 marvell,pins = "mpp63";
0226 marvell,function = "gpio";
0227 };
0228
0229 reset_button_pin: reset-button-pin {
0230 marvell,pins = "mpp64";
0231 marvell,function = "gpio";
0232 };
0233 };
0234
0235 /* Serial console */
0236 &uart0 {
0237 status = "okay";
0238 };
0239
0240 /* Connected to Weltrend MCU */
0241 &uart1 {
0242 pinctrl-0 = <&uart1_pins>;
0243 pinctrl-names = "default";
0244 status = "okay";
0245 };
0246
0247 &mdio {
0248 phy0: ethernet-phy@0 { /* Marvell 88E1318 */
0249 reg = <0>;
0250 marvell,reg-init = <0x2 0x19 0x0 0x0077>,
0251 <0x2 0x18 0x0 0x5747>;
0252 };
0253 };
0254
0255 ð1 {
0256 phy = <&phy0>;
0257 phy-mode = "rgmii-id";
0258 status = "okay";
0259 };
0260
0261 &i2c0 {
0262 compatible = "marvell,mv64xxx-i2c";
0263 clock-frequency = <100000>;
0264 status = "okay";
0265 };
0266
0267 &nand_controller {
0268 status = "okay";
0269
0270 nand@0 {
0271 reg = <0>;
0272 label = "pxa3xx_nand-0";
0273 nand-rb = <0>;
0274 marvell,nand-keep-config;
0275 nand-on-flash-bbt;
0276 nand-ecc-strength = <4>;
0277 nand-ecc-step-size = <512>;
0278
0279 partitions {
0280 compatible = "fixed-partitions";
0281 #address-cells = <1>;
0282 #size-cells = <1>;
0283
0284 partition@0 {
0285 label = "u-boot";
0286 /* 1.0 MiB */
0287 reg = <0x0000000 0x100000>;
0288 read-only;
0289 };
0290
0291 partition@100000 {
0292 label = "u-boot-env";
0293 /* 128 KiB */
0294 reg = <0x100000 0x20000>;
0295 read-only;
0296 };
0297
0298 partition@120000 {
0299 label = "uImage";
0300 /* 7 MiB */
0301 reg = <0x120000 0x700000>;
0302 };
0303
0304 partition@820000 {
0305 label = "ubifs";
0306 /* ~ 84 MiB */
0307 reg = <0x820000 0x54e0000>;
0308 };
0309
0310 /* Hardcoded into stock bootloader */
0311 partition@5d00000 {
0312 label = "failsafe-uImage";
0313 /* 5 MiB */
0314 reg = <0x5d00000 0x500000>;
0315 };
0316
0317 partition@6200000 {
0318 label = "failsafe-fs";
0319 /* 29 MiB */
0320 reg = <0x6200000 0x1d00000>;
0321 };
0322
0323 partition@7f00000 {
0324 label = "bbt";
0325 /* 1 MiB for BBT */
0326 reg = <0x7f00000 0x100000>;
0327 };
0328 };
0329 };
0330 };