From patchwork Wed Nov 4 22:25:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Perkov X-Patchwork-Id: 7555451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91430BEEA4 for ; Wed, 4 Nov 2015 22:27:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75C30206BE for ; Wed, 4 Nov 2015 22:27:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F033120691 for ; Wed, 4 Nov 2015 22:27:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zu6VH-00044m-9d; Wed, 04 Nov 2015 22:26:03 +0000 Received: from a8-82.smtp-out.amazonses.com ([54.240.8.82]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zu6Uo-0003uH-TE for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2015 22:25:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1446675912; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=hP7g0XEgr1SeGFBzw5nk1F6tdlJ8+kBWnodsncv/J3A=; b=rP6cexy3JYF7X6ZEYRMaLrvJdh/MJFzFBn/VN3aJBmtBOfzjN5WYKZiC6a0cufBX FxQDvJmCzaWRBgsWIh4coI2sB9EurHB6vDxDfECmZ8f/oCgBf9NmBVQkcf2EzFPmifA 1rqrZi7jYFQcUwS0xyP6K0aOmkB4xV5UeOelzlhc= From: Luka Perkov To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 4/4] ARM: dts: kirkwood: add ZyXEL NSA310s Date: Wed, 4 Nov 2015 22:25:12 +0000 Message-ID: <00000150d49a979a-b2d6164f-f16d-4f1d-aaa5-008f46776e82-000000@email.amazonses.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1446675888-24495-1-git-send-email-luka.perkov@sartura.hr> References: <1446675888-24495-1-git-send-email-luka.perkov@sartura.hr> X-SES-Outgoing: 2015.11.04-54.240.8.82 Feedback-ID: 1.us-east-1.LFTh9l1AeB8dLHpJScYuoOtH5la+pCpNwQRcSZa6G+s=:AmazonSES X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151104_142535_224511_8F85BB2C X-CRM114-Status: GOOD ( 13.15 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregory.clement@free-electrons.com, andrew@lunn.ch, Luka Perkov , jason@lakedaemon.net, Tony Dinh MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Based on dts files from OpenWrt. Signed-off-by: Luka Perkov Signed-off-by: Tony Dinh --- .../devicetree/bindings/arm/marvell,kirkwood.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/kirkwood-nsa310s.dts | 282 +++++++++++++++++++++ 3 files changed, 284 insertions(+) create mode 100644 arch/arm/boot/dts/kirkwood-nsa310s.dts diff --git a/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt index 37bd190..8a1a7f7 100644 --- a/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt +++ b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt @@ -101,3 +101,4 @@ board. Currently known boards are: "usi,topkick-1281P2" "zyxel,nsa310" "zyxel,nsa310a" +"zyxel,nsa310s" diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 1d6fb0d..b2ea55f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -196,6 +196,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \ kirkwood-ns2mini.dtb \ kirkwood-nsa310.dtb \ kirkwood-nsa310a.dtb \ + kirkwood-nsa310s.dtb \ kirkwood-openblocks_a6.dtb \ kirkwood-openblocks_a7.dtb \ kirkwood-openrd-base.dtb \ diff --git a/arch/arm/boot/dts/kirkwood-nsa310s.dts b/arch/arm/boot/dts/kirkwood-nsa310s.dts new file mode 100644 index 0000000..afc8ecf --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts @@ -0,0 +1,282 @@ +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-6281.dtsi" + +/ { + model = "ZyXEL NSA310S"; + compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + stdout-path = &uart0; + }; + + mbus { + pcie-controller { + status = "okay"; + + pcie@1,0 { + status = "okay"; + }; + }; + }; + + 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 = "okay"; + }; + + sata@80000 { + status = "okay"; + nr-ports = <2>; + }; + + rtc@10300 { + status = "disabled"; + }; + + i2c@11000 { + status = "okay"; + }; + }; + + 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_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 = "timer"; + }; + 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>; + }; + }; + + gpio_poweroff { + compatible = "gpio-poweroff"; + pinctrl-0 = <&pmx_pwr_off>; + pinctrl-names = "default"; + gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; + }; +}; + +&nand { + status = "okay"; + chip-delay = <35>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0xe0000>; + }; + + partition@e0000 { + label = "u-boot environment"; + reg = <0xe0000 0x100000>; + }; + + partition@100000 { + label = "second stage u-boot"; + reg = <0x100000 0x200000>; + }; + + partition@200000 { + label = "root"; + reg = <0x200000 0xfe00000>; + }; +}; + +&mdio { + status = "okay"; + ethphy0: ethernet-phy@1 { + reg = <1>; + marvell,reg-init = <0x1 0x16 0x0 0x3>, + <0x1 0x10 0x0 0x1017>, + <0x1 0x11 0x0 0x4408>, + <0x1 0x16 0x0 0x0>, + <0x1 0x4 0x0 0x1e1>, + <0x1 0x9 0x0 0x300>, + <0x1 0x10 0x0 0x3860>, + <0x1 0x0 0x0 0x9140>; + }; +}; + +ð0 { + status = "okay"; + + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +};