From patchwork Tue Oct 22 18:56:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3084481 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DA939BF924 for ; Tue, 22 Oct 2013 18:57:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B02882046F for ; Tue, 22 Oct 2013 18:57:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2BA822046B for ; Tue, 22 Oct 2013 18:57:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYh8n-0005dO-IR; Tue, 22 Oct 2013 18:57:17 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYh8k-0002lN-NF; Tue, 22 Oct 2013 18:57:14 +0000 Received: from [2a01:e35:139b:9f90:221:70ff:fe55:8f78] (helo=smtp.natisbad.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYh8g-0002jz-Ta for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2013 18:57:12 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id E4BB42C073A; Tue, 22 Oct 2013 20:56:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1382468205; bh=R43PJXsIDdpl7Fjiqe378neOAgRaH8SAmt5b8JHmfbw=; h=From:To:Cc:Subject:Date; b=Ux5r9Ba/fDW29LYkGORcOpPd7GrqsUAsXTvUZ5IET0EsvWOezKKJEZrwWJ9mKUvBo WNM7gzo/WM80bkOX6D0P53rlg2r0zlh37EelA3HtNM/owu0tKc5FRo7Tdp4XwEHNbZ YrjWF1rHlIwFXRiyoXXbQKEPb9/0UfeEO1PVj454= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from small (localhost [127.0.0.1]) by smtp.natisbad.org (Postfix) with ESMTP id B66512C05BF; Tue, 22 Oct 2013 20:56:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1382468174; bh=R43PJXsIDdpl7Fjiqe378neOAgRaH8SAmt5b8JHmfbw=; h=From:To:Cc:Subject:Date; b=z8tsCWjKy+gVS7MwAs3OeN96dm/sah6zVF3AOWT2H2IpQ+IaojQliCVk5rIyRTniQ Iwm78gt80PttkHR2f5pMLxovUQpsoX81+IWy6uzdRhA57fVPIE7R4D1WnRipseq+Nk X26YuEMhVJ7gt6Tdb/x8/1iF03WN5Gj8elJ20hf0= X-Hashcash: 1:20:131022:jason@lakedaemon.net::N5NtqylUpZ3vMpOw:000000000000000000000000000000000000000000osG X-Hashcash: 1:20:131022:andrew@lunn.ch::Da2s1p9kYo95KFQB:0009wmG X-Hashcash: 1:20:131022:gregory.clement@free-electrons.com::+FmJQx5NpeDBh3h2:0000000000000000000000000005gc4 X-Hashcash: 1:20:131022:sebastian.hesselbarth@gmail.com::63xi3SKkenbEGPAi:0000000000000000000000000000005YyD X-Hashcash: 1:20:131022:linux-arm-kernel@lists.infradead.org::N5hQpIw6Dmz0jzZJ:000000000000000000000000071yD X-Hashcash: 1:20:131022:rob.herring@calxeda.com::+v2cOdoJM9t2JSUX:000000000000000000000000000000000000001saw X-Hashcash: 1:20:131022:pawel.moll@arm.com::KwrIfY+/C3J2Uoah:000000000000000000000000000000000000000000018h4 X-Hashcash: 1:20:131022:mark.rutland@arm.com::gH3Y4nPveNjOlw7H:000000000000000000000000000000000000000001gmT X-Hashcash: 1:20:131022:swarren@wwwdotorg.org::BaLXg3DdF2mGw9ot:00000000000000000000000000000000000000004T4u X-Hashcash: 1:20:131022:ijc+devicetree@hellion.org.uk::EB2xYsWeropSQsX0:000000000000000000000000000000000rdD X-Hashcash: 1:20:131022:linux@arm.linux.org.uk::IbSIWScJ1iEqiQ/t:000000000000000000000000000000000000000ECjB X-Hashcash: 1:20:131022:devicetree@vger.kernel.org::HjXEuycxanx13aKV:000000000000000000000000000000000003+F8 From: arno@natisbad.org (Arnaud Ebalard) To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCHv1] ARM: mvebu: Add Netgear ReadyNAS 104 board X-PGP-Key-URL: http://natisbad.org/arno@natisbad.org.asc X-Fingerprint: D3A5 B68A 839B 38A5 815A 781B B77C 0748 A7AE 341B Date: Tue, 22 Oct 2013 20:56:13 +0200 Message-ID: <87fvrtqgmq.fsf@natisbad.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131022_145711_604387_0A983E2E X-CRM114-Status: GOOD ( 16.01 ) X-Spam-Score: -1.2 (-) Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Pawel Moll , Ian Campbell , Stephen Warren , Rob Herring , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Main hardware parts of the (Armada 370 based) NETGEAR ReadyNAS 104 are supported by mainline kernel (USB 3.0 rear ports, USB 2.0 front port, Gigabit controller and PHYs, serial port, LEDs, buttons, SATA ports, G762 fan controller) and referenced in provided .dts file. Some additonal work remains for: - Intersil ISL12057 I2C RTC and Alarm chip: working driver but needs to be splitted for submission of RTC part first; - Front LCD (Winstar 1602G): driver needs to be written - Armada NAND controller (to access onboard 128MB of NAND): support being pushed by @free-electrons people - 4 front SATA LEDs controlled via GPIO brought by NXP PCA9554: driver is available upstream. Not referenced/tested yet. but the device is usable w/o those. Signed-off-by: Arnaud Ebalard Acked-by: Andrew Lunn --- Changes since v0, based on comments from Andrew: - removed useless sata nodes w/ disabled status - changed power LED to default-state="keep" and backup LED to "off" arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-370-netgear-rn104.dts | 193 +++++++++++++++++++++++++ 2 files changed, 194 insertions(+) create mode 100644 arch/arm/boot/dts/armada-370-netgear-rn104.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 802720e..be682cb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -108,6 +108,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ armada-370-mirabox.dtb \ armada-370-netgear-rn102.dtb \ + armada-370-netgear-rn104.dtb \ armada-370-rd.dtb \ armada-xp-axpwifiap.dtb \ armada-xp-db.dtb \ diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts new file mode 100644 index 0000000..2eb855f --- /dev/null +++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts @@ -0,0 +1,193 @@ +/* + * Device Tree file for NETGEAR ReadyNAS 104 + * + * Copyright (C) 2013, Arnaud EBALARD + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +/dts-v1/; + +#include "armada-370.dtsi" + +/ { + model = "NETGEAR ReadyNAS 104"; + compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp"; + + chosen { + bootargs = "console=ttyS0,115200 earlyprintk"; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; /* 512 MB */ + }; + + soc { + ranges = ; + + pcie-controller { + status = "okay"; + + /* Connected to FL1009 USB 3.0 controller */ + pcie@1,0 { + /* Port 0, Lane 0 */ + status = "okay"; + }; + + /* Connected to Marvell 88SE9215 SATA controller */ + pcie@2,0 { + /* Port 1, Lane 0 */ + status = "okay"; + }; + }; + + internal-regs { + serial@12000 { + clock-frequency = <200000000>; + status = "okay"; + }; + + pinctrl { + poweroff: poweroff { + marvell,pins = "mpp60"; + marvell,function = "gpio"; + }; + + backup_key_pin: backup-key-pin { + marvell,pins = "mpp52"; + marvell,function = "gpio"; + }; + + power_key_pin: power-key-pin { + marvell,pins = "mpp62"; + marvell,function = "gpio"; + }; + + backup_led_pin: backup-led-pin { + marvell,pins = "mpp63"; + marvell,function = "gpo"; + }; + + power_led_pin: power-led-pin { + marvell,pins = "mpp64"; + marvell,function = "gpio"; + }; + + reset_key_pin: reset-key-pin { + marvell,pins = "mpp65"; + marvell,function = "gpio"; + }; + }; + + mdio { + phy0: ethernet-phy@0 { + reg = <0>; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + + ethernet@70000 { + status = "okay"; + phy = <&phy0>; + phy-mode = "rgmii-id"; + }; + + ethernet@74000 { + status = "okay"; + phy = <&phy1>; + phy-mode = "rgmii-id"; + }; + + usb@50000 { + status = "okay"; + }; + + i2c@11000 { + compatible = "marvell,mv64xxx-i2c"; + clock-frequency = <100000>; + status = "okay"; + + g762: g762@3e { + compatible = "gmt,g762"; + reg = <0x3e>; + clocks = <&g762_clk>; /* input clock */ + fan_gear_mode = <0>; + fan_startv = <1>; + pwm_polarity = <0>; + }; + }; + }; + }; + + clocks { + #address-cells = <1>; + #size-cells = <0>; + + g762_clk: fixedclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <8192>; + }; + }; + + gpio_leds { + compatible = "gpio-leds"; + pinctrl-0 = <&backup_led_pin &power_led_pin>; + pinctrl-names = "default"; + + blue_backup_led { + label = "rn104:blue:backup"; + gpios = <&gpio1 31 0>; /* GPIO 63 Active High */ + default-state = "off"; + }; + + blue_power_led { + label = "rn104:blue:pwr"; + gpios = <&gpio2 0 1>; /* GPIO 64 Active Low */ + linux,default-trigger = "keep"; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&backup_key_pin + &power_key_pin + &reset_key_pin>; + pinctrl-names = "default"; + + button@1 { + label = "Backup Button"; + linux,code = <133>; /* KEY_COPY */ + gpios = <&gpio1 20 1>; + }; + + button@2 { + label = "Power Button"; + linux,code = <116>; /* KEY_POWER */ + gpios = <&gpio1 30 0>; + }; + + button@3 { + label = "Reset Button"; + linux,code = <0x198>; /* KEY_RESTART */ + gpios = <&gpio2 1 1>; + }; + }; + + gpio_poweroff { + compatible = "gpio-poweroff"; + pinctrl-0 = <&poweroff>; + pinctrl-names = "default"; + gpios = <&gpio1 28 1>; + }; +};