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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 40889C11F64 for ; Thu, 1 Jul 2021 04:27:31 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EADF61480 for ; Thu, 1 Jul 2021 04:27:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EADF61480 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA161831BB; Thu, 1 Jul 2021 06:27:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Va6NuDfv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF681831EA; Thu, 1 Jul 2021 06:27:27 +0200 (CEST) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 717558314D for ; Thu, 1 Jul 2021 06:27:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-qv1-xf36.google.com with SMTP id f5so2316906qvu.8 for ; Wed, 30 Jun 2021 21:27:24 -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=xArCwl9ZTVONXHetdYDMgG1K/mA2x/Vi1iA7eefVrIY=; b=Va6NuDfvdQT8R02gSultAwV2ozbF1W4Nyoz8Df8K5BLpvKpNat0gVQCpvde7ZT8TIA 9bnC3bUgOyQfyv0lywMRort7sJnu7Sks67EEQOFNx8g9dnNGdrnU+1CA21dKZ2hHCbnf buLuYQlaQx7GPfh9SI1HWiT5GRvSxcGhsR4mIP6ZrPBI0DwKnbh6HbPyV8+NoVWAgKZV YXpJEWGm0OP3NlRwb8rMWkt8xMhB1eh95wvQHHs42zWL36hxNaTMaOw5kt8Fni2IjpfV +kdoWJyy2fEugmliplykFWFT1FVZHKjxQdgLFXy6LhcjYwBx5FXMsK5+rJqKSFIr15Y4 en6w== 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=xArCwl9ZTVONXHetdYDMgG1K/mA2x/Vi1iA7eefVrIY=; b=ONhZRuWg/F574G30v7f3oDm5Woh2TfW5Au6L9+OZ48cQB15wAsKnq0oqYmowtvCMs0 8d9h09HymQqO6L8uZghufbeDsywfp/Ej3UcQPA98WTPg61zWkNXdNepmMIrdiGWydgYO 0FiCK8z8Lr9W9kCDTKyfj8aUPV0YTkiyioXFSDlw/Pqlv/l6Bf2i6JPfl0cRS2KE7/cp xHl+hQrU4iFf8ZX2pdAgwqkibP5jms3CvkRfhfhIEyXEK/frVPUXgPQ4IPw1O4hPzrqv en8ImelsReUWKk4QDvFCSineC1hLU3GtCzI16NFKlNASpgPnrBvD3plJOwbwMShf3ydO +0Yw== X-Gm-Message-State: AOAM532kIh+zfuTB6ajTh9YPGW30uohfl7eBjILcZjHLBdZfskRyGrrY OQ5DlWsdjqtNmpBIgIFtwUg= X-Google-Smtp-Source: ABdhPJyTuS9Bhw8+2p8GiAbXvHexSiyon9maFH2RoPzHJzevoKtvOuQpDSWQtGC3Vdidcjj4xa8stA== X-Received: by 2002:a0c:be85:: with SMTP id n5mr25907796qvi.59.1625113643252; Wed, 30 Jun 2021 21:27:23 -0700 (PDT) Received: from localhost.localdomain ([66.218.48.116]) by smtp.gmail.com with ESMTPSA id o123sm14540537qkd.6.2021.06.30.21.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 21:27:23 -0700 (PDT) From: Tony Dinh To: Stefan Roese , U-Boot Mailing List Cc: Tom Rini , Chris Packham , Tony Dinh Subject: [PATCH 1/4] NSA310S : Add device tree DTS for Zyxel NSA310S board Date: Wed, 30 Jun 2021 21:26:22 -0700 Message-Id: <20210701042625.18815-2-mibodhi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210701042625.18815-1-mibodhi@gmail.com> References: <20210701042625.18815-1-mibodhi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Add device tree kirkwood-nsa310s.dts for Zyxel NSA310S board to convert to Driver Model. Signed-off-by: Tony Dinh --- arch/arm/dts/Makefile | 1 + arch/arm/dts/kirkwood-nsa310s.dts | 318 ++++++++++++++++++++++++++++++ 2 files changed, 319 insertions(+) create mode 100644 arch/arm/dts/kirkwood-nsa310s.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 096068261d..0ff77c8b3d 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -56,6 +56,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += \ kirkwood-ns2lite.dtb \ kirkwood-ns2max.dtb \ kirkwood-ns2mini.dtb \ + kirkwood-nsa310s.dtb \ kirkwood-openrd-base.dtb \ kirkwood-openrd-client.dtb \ kirkwood-openrd-ultimate.dtb \ diff --git a/arch/arm/dts/kirkwood-nsa310s.dts b/arch/arm/dts/kirkwood-nsa310s.dts new file mode 100644 index 0000000000..e1c9c9080c --- /dev/null +++ b/arch/arm/dts/kirkwood-nsa310s.dts @@ -0,0 +1,318 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device tree file for the Zyxel NSA 310S NAS box. + * + * Copyright (c) 2015-2021, Tony Dinh + * + * Based on + * Copyright (c) 2014, Adam Baker + * Based upon the board setup file created by Peter Schildmann + */ +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-6281.dtsi" + +/ { + model = "Zyxel NSA310S"; + compatible = "zyxel,nsa320s", "marvell,kirkwood-88f6702", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + stdout-path = &uart0; + }; + + ocp@f1000000 { + pinctrl: pin-controller@10000 { + pinctrl-names = "default"; + + pmx_sata0: pmx-sata0 { + marvell,pins ; + marvell,function = "sata0"; + }; + + pmx_sata1: pmx-sata1 { + marvell,pins ; + marvell,function = "sata1"; + }; + + pmx_usb_power: pmx-usb-power { + marvell,pins = "mpp21"; + marvell,function = "gpio"; + }; + + pmx_pwr_off: pmx-pwr-off { + marvell,pins = "mpp27"; + marvell,function = "gpio"; + }; + + pmx_btn_reset: pmx-btn-reset { + marvell,pins = "mpp24"; + marvell,function = "gpio"; + }; + + pmx_btn_copy: pmx-btn-copy { + marvell,pins = "mpp25"; + marvell,function = "gpio"; + }; + + pmx_btn_power: pmx-btn-power { + marvell,pins = "mpp26"; + marvell,function = "gpio"; + }; + + pmx_led_hdd2_green: pmx-led-hdd2-green { + marvell,pins = "mpp34"; + marvell,function = "gpio"; + }; + + pmx_led_hdd2_red: pmx-led-hdd2-red { + marvell,pins = "mpp12"; + marvell,function = "gpio"; + }; + + pmx_led_usb_green: pmx-led-usb-green { + marvell,pins = "mpp15"; + marvell,function = "gpio"; + }; + + pmx_led_copy_green: pmx-led-copy-green { + marvell,pins = "mpp22"; + marvell,function = "gpio"; + }; + + pmx_led_copy_red: pmx-led-copy-red { + marvell,pins = "mpp23"; + marvell,function = "gpio"; + }; + + pmx_led_sys_green: pmx-led-sys-green { + marvell,pins = "mpp28"; + marvell,function = "gpio"; + }; + + pmx_led_sys_orange: pmx-led-sys-orange { + marvell,pins = "mpp29"; + marvell,function = "gpio"; + }; + + pmx_led_hdd1_green: pmx-led-hdd1-green { + marvell,pins = "mpp16"; + marvell,function = "gpio"; + }; + + pmx_led_hdd1_red: pmx-led-hdd1-red { + marvell,pins = "mpp13"; + marvell,function = "gpio"; + }; + + pmx_pwr_sata1: pmx-pwr-sata1 { + marvell,pins = "mpp33"; + marvell,function = "gpio"; + }; + }; + + serial@12000 { + status = "ok"; + }; + + sata@80000 { + status = "okay"; + nr-ports = <1>; + }; + + rtc@10300 { + status = "disabled"; + }; + + i2c@11000 { + status = "okay"; + ht1382: rtc@68 { + compatible = "htk,ht1382"; + reg = <0x68>; + }; + }; + }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_usb_power &pmx_pwr_sata1>; + + usb0_power: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "USB Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>; + }; + + sata1_power: regulator@2 { + compatible = "regulator-fixed"; + reg = <2>; + regulator-name = "SATA1 Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio_poweroff { + compatible = "gpio-poweroff"; + pinctrl-0 = <&pmx_pwr_off>; + pinctrl-names = "default"; + gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>; + pinctrl-names = "default"; + + button@1 { + label = "Power Button"; + linux,code = ; + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; + }; + button@2 { + label = "Copy Button"; + linux,code = ; + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + }; + button@3 { + label = "Reset Button"; + linux,code = ; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red + &pmx_led_usb_green + &pmx_led_sys_green &pmx_led_sys_orange + &pmx_led_copy_green &pmx_led_copy_red + &pmx_led_hdd1_green &pmx_led_hdd1_red>; + pinctrl-names = "default"; + + green-sys { + label = "nsa310s:green:sys"; + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-on"; + }; + orange-sys { + label = "nsa310s:orange:sys"; + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; + }; + green-hdd1 { + label = "nsa310s:green:hdd1"; + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + }; + red-hdd1 { + label = "nsa310s:red:hdd1"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + green-hdd2 { + label = "nsa310s:green:hdd2"; + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + }; + red-hdd2 { + label = "nsa310s:red:hdd2"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + green-usb { + label = "nsa310s:green:usb"; + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + }; + green-copy { + label = "nsa310s:green:copy"; + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "ide-disk"; + }; + red-copy { + label = "nsa310s:red:copy"; + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&nand { + status = "okay"; + chip-delay = <35>; + + partition@0 { + label = "uboot"; + reg = <0x0000000 0x0100000>; + }; + partition@100000 { + label = "stock_uboot_env"; + reg = <0x0100000 0x0080000>; + }; + partition@180000 { + label = "key_store"; + reg = <0x0180000 0x0080000>; + }; + partition@200000 { + label = "info"; + reg = <0x0200000 0x0080000>; + }; + partition@280000 { + label = "etc"; + reg = <0x0280000 0x0a00000>; + }; + partition@c80000 { + label = "kernel_1"; + reg = <0x0c80000 0x0a00000>; + }; + partition@1680000 { + label = "rootfs1"; + reg = <0x1680000 0x2fc0000>; + }; + partition@4640000 { + label = "kernel_2"; + reg = <0x4640000 0x0a00000>; + }; + partition@5040000 { + label = "rootfs2"; + reg = <0x5040000 0x2fc0000>; + }; +}; + +&mdio { + status = "okay"; + ethphy0: ethernet-phy@1 { + compatible = "marvell,88e1510"; + reg = <1>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +&pciec { + status = "okay"; +}; + +&pcie0 { + status = "okay"; +}; -- 2.20.1