// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Device Tree file for Buffalo LinkStation LS421DE * * Copyright (C) 2020 Daniel González Cabanelas */ /dts-v1/; #include "armada-370.dtsi" #include "mvebu-linkstation-fan.dtsi" #include #include / { model = "Buffalo LinkStation LS421DE"; compatible = "buffalo,ls421de", "marvell,armada370", "marvell,armada-370-xp"; aliases { led-boot = &led_boot; led-failsafe = &led_failsafe; led-running = &led_power; led-upgrade = &led_upgrade; }; chosen { bootargs = "console=ttyS0,115200 earlyprintk noinitrd rootfstype=squashfs"; stdout-path = "serial0:115200n8"; append-rootblock = "nullparameter="; /* override the bootloader args */ }; memory { device_type = "memory"; reg = <0x00000000 0x20000000>; /* 512 MB */ }; soc { ranges = ; }; gpio_fan { gpios = <&gpio0 13 GPIO_ACTIVE_HIGH &gpio0 14 GPIO_ACTIVE_HIGH>; alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; }; gpio_keys { compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&pmx_buttons>; pinctrl-names = "default"; power { label = "Power Switch"; linux,code = ; linux,input-type = ; gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; }; function { label = "Function Button"; linux,code = ; gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; }; }; gpio_leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&pmx_leds1 &pmx_leds2>; system_red { label = "ls421de:red:system"; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; led_power: power_white { label = "ls421de:white:power"; gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_failsafe: power_red { label = "ls421de:red:power"; gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; }; led_upgrade: power_orange { label = "ls421de:orange:power"; gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; }; led_boot: system_white { label = "ls421de:white:system"; gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; }; hdd1_red { label = "ls421de:red:hdd1"; gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; default-state = "off"; linux,default-trigger = "disk-activity"; }; hdd2_red { label = "ls421de:red:hdd2"; gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; default-state = "off"; linux,default-trigger = "disk-activity"; }; }; regulators { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <0>; pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>; pinctrl-names = "default"; usb_power: regulator@0 { compatible = "regulator-fixed"; reg = <0>; regulator-name = "USB"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; regulator-always-on; regulator-boot-on; gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>; }; sata1_power: regulator@1 { compatible = "regulator-fixed"; reg = <1>; regulator-name = "HDD1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; startup-delay-us = <2000000>; enable-active-high; regulator-always-on; regulator-boot-on; gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; sata2_power: regulator@2 { compatible = "regulator-fixed"; reg = <2>; regulator-name = "HDD2"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; startup-delay-us = <4000000>; enable-active-high; regulator-always-on; regulator-boot-on; gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; }; /* FIXME: this driver needs to be aware of the LED2 eth phy use, which must be set to off state before shutting down the machine */ restart_poweroff { compatible = "restart-poweroff"; }; }; ð1 { pinctrl-0 = <&ge1_rgmii_pins>; pinctrl-names = "default"; status = "okay"; phy-handle = <ðphy0>; phy-connection-type = "rgmii-id"; }; &i2c0 { pinctrl-0 = <&i2c0_pins>; pinctrl-names = "default"; clock-frequency = <100000>; status = "okay"; rs5c372a: rs5c372a@32 { compatible = "ricoh,rs5c372a"; reg = <0x32>; }; }; &mdio { pinctrl-0 = <&mdio_pins>; pinctrl-names = "default"; ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */ reg = <0>; /* * LED2 is used to inform, at restart time, if the power * switch was slided to the "off" position. * Page 0x3, Register 0x10, bits 8-11: * 0x800: LED2 off, power off the machine * 0x900: LED2 on, boot the machine */ marvell,reg-init = <0x3 0x10 0x1 0x1991>, /* LED function */ <0x3 0x11 0x1 0x4401>, /* LED polarity */ <0x3 0x12 0x1 0x4905>; /* LED timer */ }; }; &pciec { status = "okay"; /* Connected to uPD720202 USB 3.0 Host */ pcie@1,0 { status = "okay"; }; }; &pmsu { pinctrl-0 = <&pmx_power_cpu>; pinctrl-names = "default"; }; &rtc { status = "disabled"; }; &sata { nr-ports = <2>; status = "okay"; }; &sdio { pinctrl-0 = <&sdio_pins2>; pinctrl-names = "default"; status = "okay"; /* No CD or WP GPIOs */ broken-cd; }; &uart0 { status = "okay"; }; &usb0 { status = "okay"; }; &nand_controller { status = "okay"; nand@0 { reg = <0>; label = "pxa3xx_nand-0"; nand-rb = <0>; marvell,nand-keep-config; nand-on-flash-bbt; nand-ecc-strength = <4>; nand-ecc-step-size = <512>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "kernel"; reg = <0x00000000 0x02000000>; /* 32 MiB */ }; partition@2000000 { label = "ubi"; reg = <0x02000000 0x1e000000>; /* 480 MiB */ }; }; }; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_pins2>; pinctrl-names = "default"; spi-flash@0 { #address-cells = <1>; #size-cells = <1>; compatible = "mxicy,mx25l8005", "jedec,spi-nor"; reg = <0>; /* Chip select 0 */ spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { reg = <0x00000 0xf0000>; /* 960 KiB*/ label = "u-boot"; read-only; }; partition@f0000 { reg = <0xf0000 0x10000>; /* 64 KiB */ label = "u-boot-env"; }; }; }; }; &pinctrl { pmx_power_cpu: pmx-power-cpu { marvell,pins = "mpp4"; marvell,function = "vdd"; }; pmx_power_usb: pmx-power-usb { marvell,pins = "mpp5"; marvell,function = "gpo"; }; pmx_power_hdd1: pmx-power-hdd1 { marvell,pins = "mpp8"; marvell,function = "gpio"; }; pmx_power_hdd2: pmx-power-hdd2 { marvell,pins = "mpp9"; marvell,function = "gpo"; }; pmx_fan_lock: pmx-fan-lock { marvell,pins = "mpp10"; marvell,function = "gpio"; }; pmx_hdd_present: pmx-hdd-present { marvell,pins = "mpp11", "mpp12"; marvell,function = "gpio"; }; pmx_fan_high: pmx-fan-high { marvell,pins = "mpp13"; marvell,function = "gpio"; }; pmx_fan_low: pmx-fan-low { marvell,pins = "mpp14"; marvell,function = "gpio"; }; pmx_buttons: pmx-buttons { marvell,pins = "mpp15", "mpp16"; marvell,function = "gpio"; }; pmx_leds1: pmx-leds { marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61"; marvell,function = "gpo"; }; pmx_leds2: pmx-leds { marvell,pins = "mpp55", "mpp57", "mpp62"; marvell,function = "gpio"; }; };