From patchwork Fri Nov 22 20:06:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3224121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 385B19F26C for ; Fri, 22 Nov 2013 20:07:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 539542076C for ; Fri, 22 Nov 2013 20:07:26 +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 D4E8620709 for ; Fri, 22 Nov 2013 20:07:24 +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 1Vjx0W-0006M6-Q2; Fri, 22 Nov 2013 20:07:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vjx0T-0001DD-SX; Fri, 22 Nov 2013 20:07:13 +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 1Vjx0Q-0001Bf-T1 for linux-arm-kernel@lists.infradead.org; Fri, 22 Nov 2013 20:07:11 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id B0EC72C0C3F; Fri, 22 Nov 2013 21:06:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385150808; bh=8SSw1AmwShOGZb0KIPLmgPhV4OciOskgpNFLtl8ov9Q=; h=From:To:Cc:Subject:In-Reply-To:References:References:Date; b=OBn3mwhxHpT3UvtHagC71eqoexn9YJtqj7rEo5PUQaisaTlNw5gonfgcgolpgsyqm dSrNSZ/4wvKF5gVtNSgPHxRqEmS74qJnpP1sLko3Z9ERK5ZBmE/zNtgafMW8nYsJLw 2vFAXAmd0Vm34wH3eVq1KjXvwcB7XdTRqBCAn5m0= 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 AD9382C08AD; Fri, 22 Nov 2013 21:06:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385150784; bh=8SSw1AmwShOGZb0KIPLmgPhV4OciOskgpNFLtl8ov9Q=; h=From:To:Cc:Subject:In-Reply-To:References:References:Date; b=egAS6GQGCEvJbpYafHbo/p8o1aQ9rWH1oMRjGswSI5ohdnsoB5Y4XIMx4x8i7P0Ux nnAggWMatDFMyNBDJtzSmwLXiPA+/dc0PUvGbDxfonT9uEqUSu6hnkwmirLVKGp266 vAUyMPrb/TFzZikw9MSdvJWzBmDfznd5kMPcfH8g= X-Hashcash: 1:20:131122:jason@lakedaemon.net::3ydf0yEBMrP/RgUF:0000000000000000000000000000000000000000004vZ X-Hashcash: 1:20:131122:andrew@lunn.ch::FaHHDw29Z/ZW9Yuq:0004LNL X-Hashcash: 1:20:131122:gregory.clement@free-electrons.com::0ft5X2vogI8ndiu1:0000000000000000000000000000lZi X-Hashcash: 1:20:131122:sebastian.hesselbarth@gmail.com::9Yj53lUtgsWdJvnj:0000000000000000000000000000004KX7 X-Hashcash: 1:20:131122:linux@arm.linux.org.uk::2kquiVudq8R2KZ1h:0000000000000000000000000000000000000002z7i X-Hashcash: 1:20:131122:linux-arm-kernel@lists.infradead.org::g3paCl++C+4dUgnD:00000000000000000000000001xNP X-Hashcash: 1:20:131122:rob.herring@calxeda.com::1O5x9nyJH4S2Iekh:000000000000000000000000000000000000003Lgz X-Hashcash: 1:20:131122:pawel.moll@arm.com::+j4/E8XAxGdurYeE:00000000000000000000000000000000000000000005/rY X-Hashcash: 1:20:131122:mark.rutland@arm.com::tuwpwbA+TN2h46/o:0000000000000000000000000000000000000000076/C X-Hashcash: 1:20:131122:swarren@wwwdotorg.org::3DOiVZAnrks/vHM4:00000000000000000000000000000000000000003E45 X-Hashcash: 1:20:131122:ijc+devicetree@hellion.org.uk::Bu7rWZOPSnyMPaXX:000000000000000000000000000000005NNy X-Hashcash: 1:20:131122:devicetree@vger.kernel.org::GhfqX+60p85d0CMP:00000000000000000000000000000000000Dp/s From: arno@natisbad.org (Arnaud Ebalard) To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCH 2/4] ARM: mvebu: NETGEAR ReadyNAS 102 .dts file cleanup In-Reply-To: References: References: Message-Id: 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 21:06:24 +0100 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-20131122_150711_373368_5310DCB7 X-CRM114-Status: GOOD ( 12.01 ) X-Spam-Score: -1.2 (-) 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 The patch does some cleanup work on NETGEAR ReadyNAS Duo v2 .dts file. Changes are listed below - Converted from value to macros for GPIO voltage level - Converted all numeric input keys values to macros - Added GPIO keys pins to pinctrl - Made button names more explicit - Added compatible string for PHY (marvell,mv88e1318s) - Made G762 clock node name unique by including g762 in it - Fixed all node names and labels to use respectively '-' and '_' - Removed useless clocks and gpio-keys properties Signed-off-by: Arnaud Ebalard --- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 80 +++++++++++++++----------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts index 8ac2ac1..87cd003 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts @@ -11,6 +11,8 @@ /dts-v1/; +#include +#include #include "armada-370.dtsi" / { @@ -77,6 +79,21 @@ marvell,function = "gpio"; }; + backup_button_pin: backup-button-pin { + marvell,pins = "mpp58"; + marvell,function = "gpio"; + }; + + power_button_pin: power-button-pin { + marvell,pins = "mpp62"; + marvell,function = "gpio"; + }; + + reset_button_pin: reset-button-pin { + marvell,pins = "mpp6"; + marvell,function = "gpio"; + }; + poweroff: poweroff { marvell,pins = "mpp8"; marvell,function = "gpio"; @@ -85,6 +102,7 @@ mdio { phy0: ethernet-phy@0 { + compatible = "marvell,88e1318s"; reg = <0>; }; }; @@ -117,78 +135,76 @@ }; clocks { - #address-cells = <1>; - #size-cells = <0>; - - g762_clk: fixedclk { + g762_clk: g762-oscillator { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <8192>; }; }; - gpio_leds { + gpio-leds { compatible = "gpio-leds"; - pinctrl-0 = < &power_led_pin - &sata1_led_pin - &sata2_led_pin - &backup_led_pin >; + pinctrl-0 = <&power_led_pin + &sata1_led_pin + &sata2_led_pin + &backup_led_pin>; pinctrl-names = "default"; - blue_power_led { + blue-power-led { label = "rn102:blue:pwr"; - gpios = <&gpio1 25 1>; /* GPIO 57 Active Low */ + gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; }; - green_sata1_led { + green-sata1-led { label = "rn102:green:sata1"; - gpios = <&gpio0 15 1>; /* GPIO 15 Active Low */ + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; default-state = "on"; }; - green_sata2_led { + green-sata2-led { label = "rn102:green:sata2"; - gpios = <&gpio0 14 1>; /* GPIO 14 Active Low */ + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; - green_backup_led { + green-backup-led { label = "rn102:green:backup"; - gpios = <&gpio1 24 1>; /* GPIO 56 Active Low */ + gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; default-state = "on"; }; }; - gpio_keys { + gpio-keys { compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; + pinctrl-0 = <&power_button_pin + &reset_button_pin + &backup_button_pin>; + pinctrl-names = "default"; - button@1 { + power-button { label = "Power Button"; - linux,code = <116>; /* KEY_POWER */ - gpios = <&gpio1 30 0>; + linux,code = ; + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; }; - button@2 { + reset-button { label = "Reset Button"; - linux,code = <0x198>; /* KEY_RESTART */ - gpios = <&gpio0 6 1>; + linux,code = ; + gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; - button@3 { + backup-button { label = "Backup Button"; - linux,code = <133>; /* KEY_COPY */ - gpios = <&gpio1 26 1>; + linux,code = ; + gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; }; }; - gpio_poweroff { + gpio-poweroff { compatible = "gpio-poweroff"; pinctrl-0 = <&poweroff>; pinctrl-names = "default"; - gpios = <&gpio0 8 1>; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; - };