From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AEA1C76194 for ; Mon, 22 Jul 2019 19:53:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5617421985 for ; Mon, 22 Jul 2019 19:53:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M+YlBCa7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732411AbfGVTxi (ORCPT ); Mon, 22 Jul 2019 15:53:38 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40110 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732390AbfGVTxe (ORCPT ); Mon, 22 Jul 2019 15:53:34 -0400 Received: by mail-wr1-f65.google.com with SMTP id r1so40654272wrl.7; Mon, 22 Jul 2019 12:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IX8qAPZ5ga7jjpfsQbccNQpSlMQzcP4rHdYTapv0mIc=; b=M+YlBCa7A8B8GaqJ4NYdHnOtuHzpjNo4WuNL/EroG4kVslfTkKmaCoovF0W1jCCIt4 BS3W+NkIjcdwIbrMYSyCfBjZ1+hv6PgwvELhEakF8b0GwUTIILmaEutRD1MKxAX7du1v rLq4fouat5b53q8AaX/AEcZAl5Ey4nYxk3XdXQJ4RQLOlaaOBgObgFiJIk41XdOuS+at jLcQ6U+HpvIvZvUSq5MdHH9Sp5qSJ5UShDqKM13Dnruq4qj2sRjpEs0mWBAycbVjVB9D caOIo5wA/OCVJAfE9lMBZMRpE2SxeVTEc05aIe0W4ibcwZekzfasyXg8AuG9lQDcitbT aEtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IX8qAPZ5ga7jjpfsQbccNQpSlMQzcP4rHdYTapv0mIc=; b=dTf42ZwG0BG9h0Js6ZpkxJt3H96mYozQchK/LJastb4sVVlkl6VVEmAgMLvNWD9QBe H8iecRyrlB7qTWkuc8r7qpBf5V4Qj0p6kO3GiZ0Q07DFpsYuKNc4vTOZ/W0Mw3oJSZPU Au5Z/WTCnTxsiJV02Wj7M/011PPGurt9CKUZrOW2qYUtRdZ8V0S+zOYIPrS6ArR8nNU+ 2LjJihSPmB21g67KYKBai1ds0x9MLjAQ+rp1EyChr5eMsxyYcBYhHkWA9WNAjaMcoF57 JoYY4H69PiYKXgyCQuf2KlCIx9E1gMVufrPCwH0GsVMj3jsN7nhLGIG7lbJEa8DxGBRn kuiw== X-Gm-Message-State: APjAAAVlWlaMAQ1sNP+oFGDC0woFoVtnH8WNYxUwgvoVKfqPdfCP/ZyT dPPvZVDoAqHSIhzq07RCv7s= X-Google-Smtp-Source: APXvYqykdwrFiIPBMnWje+j85w+VcW3cLfV+djpTPk/RQoTUSiLvLyiyGnJYWtnDT9ipOdxoP5qfvA== X-Received: by 2002:adf:dcc2:: with SMTP id x2mr63805568wrm.55.1563825211750; Mon, 22 Jul 2019 12:53:31 -0700 (PDT) Received: from localhost.localdomain (nat-113.starnet.cz. [178.255.168.113]) by smtp.googlemail.com with ESMTPSA id c65sm37382975wma.44.2019.07.22.12.53.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 12:53:31 -0700 (PDT) From: Evgeny Kolesnikov Cc: Evgeny Kolesnikov , Sebastian Reichel , Rob Herring , Mark Rutland , Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] ARM: dts: armada385-wd-mcex2u: Add DTS file for WD My Cloud EX2 Ultra Date: Mon, 22 Jul 2019 21:53:05 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the DTS file to describe the Western Digital My Cloud EX2 Ultra NAS. Signed-off-by: Evgeny Kolesnikov --- arch/arm/boot/dts/armada-385-wd-mcex2u.dts | 313 +++++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 arch/arm/boot/dts/armada-385-wd-mcex2u.dts diff --git a/arch/arm/boot/dts/armada-385-wd-mcex2u.dts b/arch/arm/boot/dts/armada-385-wd-mcex2u.dts new file mode 100644 index 000000000000..018e66adbb93 --- /dev/null +++ b/arch/arm/boot/dts/armada-385-wd-mcex2u.dts @@ -0,0 +1,313 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Device Tree file for Western Digital My Cloud EX2 Ultra + * (BVBZ/Ranger Peak) + * + * Copyright (C) 2019 Evgeny Kolesnikov + * + * Based on the code from: + * + * Copyright (C) 2016 Martin Mueller + * Copyright (C) 2013 Gregory CLEMENT + * Copyright (C) 2013 Thomas Petazzoni + */ + +/dts-v1/; +#include +#include +#include "armada-385.dtsi" + +/ { + model = "WD My Cloud EX2 Ultra (BVBZ/Ranger Peak)"; + compatible = "wd,mcex2u", "marvell,armada385", "marvell,armada380"; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs = "console=ttyS0,115200"; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x40000000>; /* 1024 MB */ + }; + + soc { + ranges = ; + + internal-regs { + timer@c200 { + status = "disabled"; + }; + + i2c0: i2c@11000 { + status = "okay"; + clock-frequency = <100000>; + }; + + i2c1: i2c@11100 { + status = "okay"; + clock-frequency = <100000>; + }; + + serial@12000 { + status = "okay"; + }; + + /* Connected to Welltrend 6703F-OG240WT MCU + * which controls power, fan and other things + */ + serial@12100 { + status = "okay"; + }; + + poweroff@12100 { + compatible = "uart-poweroff"; + reg = <0x12100 0x100>; + clocks = <&coreclk 0>; + baud = <19200>; + cmd = [fa 03 03 01 00 00 fb]; + status = "okay"; + }; + + restart@12100 { + compatible = "uart-restart"; + reg = <0x12100 0x100>; + clocks = <&coreclk 0>; + baud = <19200>; + cmd = [fa 03 03 02 00 00 fb]; + override; + status = "okay"; + }; + + pinctrl@18000 { + uart1_pins: uart-pins-1 { + marvell,pins = "mpp19"; + marvell,function = "ua1"; + }; + + xhci0_vbus_pins: xhci0-vbus-pins { + marvell,pins = "mpp26"; + marvell,function = "gpio"; + }; + + xhci1_vbus_pins: xhci1-vbus-pins { + marvell,pins = "mpp27"; + marvell,function = "gpio"; + }; + + sata0_pins: sata-pins-0 { + marvell,pins = "mpp55"; + marvell,function = "sata0"; + }; + + sata1_pins: sata-pins-1 { + marvell,pins = "mpp56"; + marvell,function = "sata1"; + }; + + sata_leds: sata-leds { + marvell,pins = "mpp43", "mpp52", + "mpp53", "mpp54"; + marvell,function = "gpio"; + }; + + btn_pins: btn-pins { + marvell,pins = "mpp50"; + marvell,function = "gpio"; + }; + }; + + ethernet@34000 { + phy = <&phy0>; + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; + status = "okay"; + }; + + usb@58000 { + status = "okay"; + }; + + mdio@72004 { + phy0: ethernet-phy@0 { + /* Init ETH LEDs */ + marvell,reg-init = <3 16 0 0x101e>; + reg = <0>; + }; + }; + + crypto@9d000 { + status = "okay"; + }; + + rtc@a3800 { + status = "okay"; + }; + + sata@a8000 { + status = "okay"; + }; + + bm@c8000 { + status = "okay"; + }; + + nand-controller@d0000 { + status = "okay"; + + nand: nand@0 { + reg = <0>; + label = "pxa3xx_nand-0"; + marvell,nand-keep-config; + nand-rb = <0>; + nand-on-flash-bbt; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0000000 { + label = "U-Boot"; + reg = <0x00000000 0x00500000>; + read-only; + }; + partition@0500000 { + label = "kernel"; + reg = <0x00500000 0x00500000>; + }; + partition@0a00000 { + label = "uRamdisk"; + reg = <0x00a00000 0x00500000>; + read-only; + }; + partition@0f00000 { + label = "ubi"; + reg = <0x00f00000 0x0b900000>; + }; + partition@c800000 { + label = "Recovery"; + reg = <0x0c800000 0x00f00000>; + read-only; + }; + partition@d700000 { + label = "config"; + reg = <0x0d700000 0x01400000>; + }; + partition@eb00000 { + label = "reserve1"; + reg = <0x0eb00000 0x00a00000>; + read-only; + }; + partition@f500000 { + label = "reserve2"; + reg = <0x0f500000 0x00a00000>; + read-only; + }; + }; + }; + }; + + sdhci@d8000 { + status = "disabled"; + }; + + usb3@f0000 { + usb-phy = <&usb3_0_phy>; + status = "okay"; + }; + + usb3@f8000 { + usb-phy = <&usb3_1_phy>; + status = "okay"; + }; + }; + + bm-bppi { + status = "okay"; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&sata_leds>; + + sata1-red-led { + label = "wdmcex2u:red:hdd1"; + gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; + }; + sata2-red-led { + label = "wdmcex2u:red:hdd2"; + gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>; + }; + sata1-blue-led { + label = "wdmcex2u:blue:hdd1"; + gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on"; + }; + sata2-blue-led { + label = "wdmcex2u:blue:hdd2"; + gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&btn_pins>; + #address-cells = <1>; + #size-cells = <0>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio1 18 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + wakeup-source; + }; + }; + + usb3_0_phy: usb3_0_phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <®_usb3_0_vbus>; + }; + + usb3_1_phy: usb3_1_phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <®_usb3_1_vbus>; + }; + + reg_usb3_0_vbus: usb3-vbus0 { + compatible = "regulator-fixed"; + regulator-name = "usb3-vbus0"; + pinctrl-names = "default"; + pinctrl-0 = <&xhci0_vbus_pins>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>; + }; + + reg_usb3_1_vbus: usb3-vbus1 { + compatible = "regulator-fixed"; + regulator-name = "usb3-vbus1"; + pinctrl-names = "default"; + pinctrl-0 = <&xhci1_vbus_pins>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; + }; +}; -- 2.21.0