From patchwork Thu Nov 21 23:00:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3220821 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 E92EDC045B for ; Thu, 21 Nov 2013 23:01:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DACC32076C for ; Thu, 21 Nov 2013 23:01:09 +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 20BF6206C7 for ; Thu, 21 Nov 2013 23:01:05 +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 1VjdF5-0008SE-77; Thu, 21 Nov 2013 23:00:59 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjdF2-0000ng-NI; Thu, 21 Nov 2013 23:00:56 +0000 Received: from mic92-1-81-57-185-249.fbx.proxad.net ([81.57.185.249] helo=smtp.natisbad.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjdF0-0000n0-CO for linux-arm-kernel@lists.infradead.org; Thu, 21 Nov 2013 23:00:55 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id B73F72C08BD; Fri, 22 Nov 2013 00:00:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385074829; bh=AV/LR7+cnEYgvwNr97m0qytEcthncrSZ2YzcBRCSHcI=; h=From:To:Cc:Subject:Date; b=UDz3PD+FwwOiirCqgk7lbJIDalohasc6xqrVq64WfCvth48oR9j3zu30PM1T9HL4n fZkOJu3acf0f1wZCD79QmqzL3MH/MmqZHHIF/3+W9canbWrLsdKHPmDonlCa8489CT vSdrpWgbE4HfseBcovVQyk4TVvL4mJvBg87agha4= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.6 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 429182C08AD; Fri, 22 Nov 2013 00:00:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385074814; bh=AV/LR7+cnEYgvwNr97m0qytEcthncrSZ2YzcBRCSHcI=; h=From:To:Cc:Subject:Date; b=rvUZLawgcjsNMn7mG8qNhxjQUPKBT3/I/OepvSvBcMB53TudTfLJVeQbBHwr2dLm9 dvc+zvXf7M1Hrx4fqqQ0wsFug8FTNRs57iY/KOlUDFsMcK0FzumXH+iQ1nZGiuQYqI BYBduPGO0YCtqstE6U0q+8jRQ4g0hI7ja+vlqby8= X-Hashcash: 1:20:131121:jason@lakedaemon.net::wgDcRDEw6jRdPsKO:000000000000000000000000000000000000000004kRr X-Hashcash: 1:20:131121:andrew@lunn.ch::CLcC1Nemnf4aNmcg:0000474 X-Hashcash: 1:20:131121:gregory.clement@free-electrons.com::sORbbHezXYzHxDrn:0000000000000000000000000005lMw X-Hashcash: 1:20:131121:sebastian.hesselbarth@gmail.com::kpGwDGULqnhN5vK7:00000000000000000000000000000017yS X-Hashcash: 1:20:131121:linux@arm.linux.org.uk::GodGrcMulHhkIR0w:0000000000000000000000000000000000000000t9K X-Hashcash: 1:20:131121:linux-arm-kernel@lists.infradead.org::jXSMaHvPnQ0BOVU1:00000000000000000000000004aGs X-Hashcash: 1:20:131121:rob.herring@calxeda.com::P2E71xSFJyRNCGXR:000000000000000000000000000000000000003hnq X-Hashcash: 1:20:131121:pawel.moll@arm.com::E0J4XE09ONDDOLDB:00000000000000000000000000000000000000000006YA1 X-Hashcash: 1:20:131121:mark.rutland@arm.com::vCGK6JlOHfNI1UY3:000000000000000000000000000000000000000000N/+ X-Hashcash: 1:20:131121:swarren@wwwdotorg.org::gRRaiRXM8qr+nJ2v:000000000000000000000000000000000000000027hM X-Hashcash: 1:20:131121:ijc+devicetree@hellion.org.uk::0n+PtcMswa3dK1GM:00000000000000000000000000000000AAdI X-Hashcash: 1:20:131121:devicetree@vger.kernel.org::HmZAtF2NWIiTPAlZ:000000000000000000000000000000000001KwQ From: arno@natisbad.org (Arnaud Ebalard) To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCHv2] ARM: mvebu: Add RN104 SATA LEDs driven via NXP PCA9554 I2C to GPIO muxer X-PGP-Key-URL: http://natisbad.org/arno@natisbad.org.asc X-Fingerprint: D3A5 B68A 839B 38A5 815A 781B B77C 0748 A7AE 341B Date: Fri, 22 Nov 2013 00:00:12 +0100 Message-ID: <87mwkx4ayr.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-20131121_180054_693836_E2AD814B X-CRM114-Status: GOOD ( 12.63 ) X-Spam-Score: -1.0 (-) Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Pawel Moll , Stephen Warren , Ian Campbell , 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 NETGEAR ReadyNAS 104 has a NXP PCA9554 I2C to GPIO chip. Among the 8 GPIO lines the chip makes available, four are used on the device to control the SATA LEDs (the four remaining ones are used for SATA disk presence). This patch adds DT entries for NXP PCA9554 and the four SATA GPIO LEDs. Signed-off-by: Arnaud Ebalard --- Hi Jason, For some reason, I have forgotten this one in my drafts folder and noticed that just now. It goes on top of 45e8815f (ARM: mvebu: Add Netgear ReadyNAS 104 board) which is now sitting in Linus tree. If you wonder why NETGEAR was short on GPIO lines from the Armada 370 SoC and had to add this, the answer is: the front Winstar WH1602 LCD consumes 7 lines. Changes since v1: Following comments from Sebastian: - Changed values for macros for GPIO voltage level Cheers, a+ arch/arm/boot/dts/armada-370-netgear-rn104.dts | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts index b0b32f5..e65c24c 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts @@ -12,6 +12,7 @@ /dts-v1/; #include "armada-370.dtsi" +#include / { model = "NETGEAR ReadyNAS 104"; @@ -123,6 +124,13 @@ fan_startv = <1>; pwm_polarity = <0>; }; + + pca9554: pca9554@23 { + compatible = "nxp,pca9554"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x23>; + }; }; }; }; @@ -154,6 +162,30 @@ gpios = <&gpio2 0 1>; /* GPIO 64 Active Low */ linux,default-trigger = "keep"; }; + + sata1_led { + label = "rn104:blue:sata1"; + gpios = <&pca9554 0 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + sata2_led { + label = "rn104:blue:sata2"; + gpios = <&pca9554 1 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + sata3_led { + label = "rn104:blue:sata3"; + gpios = <&pca9554 2 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + sata4_led { + label = "rn104:blue:sata4"; + gpios = <&pca9554 3 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; }; gpio_keys {