From patchwork Fri Nov 29 20:27:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3259471 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 0082B9F384 for ; Fri, 29 Nov 2013 20:30:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A9D92062D for ; Fri, 29 Nov 2013 20:30:13 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BDF820611 for ; Fri, 29 Nov 2013 20:30:12 +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 1VmUgl-0003FQ-Lo; Fri, 29 Nov 2013 20:29:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VmUgS-0001vF-SI; Fri, 29 Nov 2013 20:29:04 +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 1VmUgP-0001tj-5o for linux-arm-kernel@lists.infradead.org; Fri, 29 Nov 2013 20:29:02 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id 98B002C0910; Fri, 29 Nov 2013 21:28:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385756918; bh=jCfdo4tz6HQVbgsK+6rx2TOabB3F24q6E1YnAOwof1c=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=aPQX2zT6OlmBEmc/hVwH4lp2eqKHrSliwM1Qu3n8lzIx4jfQMksLN3vW4xw5X0bSn 1H7lOjPgcpPqHvLkJgYZecqq2L94Y5Xxl2N3OEpEeWQorIQ5Q5Nr+jeIN9u2N8+7vk LmQxptW12d6OHrQzzWur5K//oGR3ewa4Tuw2KYtw= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from small (localhost [127.0.0.1]) by smtp.natisbad.org (Postfix) with ESMTP id CF0B02C0D70; Fri, 29 Nov 2013 21:27:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385756868; bh=jCfdo4tz6HQVbgsK+6rx2TOabB3F24q6E1YnAOwof1c=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=vMq7jVz+Y0ivNj1HcalY/P+f0lzY6QBmrR76vldotq+viX7XAJVE4kUqQg4Ruv5tI EsnnGrFT7MtDJ/XCbEGU6Uga61/WQun+hajB1irKKnELmUd7maVQbhnNTa4wyIOa4q 9jcDcRQvyKKwSnTah/yiho2w/7HZ0eJESx0Egks0= X-Hashcash: 1:20:131129:jason@lakedaemon.net::QpRf46iZZJ0UnccA:000000000000000000000000000000000000000005u8T X-Hashcash: 1:20:131129:andrew@lunn.ch::RnVRnjaHa9JgevVk:0009KsL X-Hashcash: 1:20:131129:gregory.clement@free-electrons.com::LHZtQNcIbg3VIrOK:0000000000000000000000000000ap3 X-Hashcash: 1:20:131129:sebastian.hesselbarth@gmail.com::wd3Awe3lbUvKfTPI:0000000000000000000000000000006F67 X-Hashcash: 1:20:131129:linux@arm.linux.org.uk::2KfJGjEJjBwLk5rM:0000000000000000000000000000000000000005a8f X-Hashcash: 1:20:131129:linux-arm-kernel@lists.infradead.org::18LP0xX3lqlSYS+d:000000000000000000000000008Ff X-Hashcash: 1:20:131129:rob.herring@calxeda.com::2a0QnMj2SvKEXM9W:000000000000000000000000000000000000001oQI X-Hashcash: 1:20:131129:pawel.moll@arm.com::qNRlI2UNky1IbWOC:00000000000000000000000000000000000000000004yoj X-Hashcash: 1:20:131129:mark.rutland@arm.com::Zl2dI/lzDYRzOxuO:000000000000000000000000000000000000000008cuB X-Hashcash: 1:20:131129:swarren@wwwdotorg.org::Ee+RVqONbxWL7Jg0:000000000000000000000000000000000000000000eT X-Hashcash: 1:20:131129:ijc+devicetree@hellion.org.uk::js9i8o9AGuhz1N9w:000000000000000000000000000000007NSA X-Hashcash: 1:20:131129:devicetree@vger.kernel.org::ArWg9hifu2Onb3X1:0000000000000000000000000000000000012Zv From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCHv2 3/4] ARM: mvebu: NETGEAR ReadyNAS 104 .dts cleanup In-Reply-To: References: Message-Id: <6273faf4078ed0bf556cf0abecc9b5d8bdd3a59f.1385756371.git.arno@natisbad.org> Date: Fri, 29 Nov 2013 21:27:48 +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-20131129_152901_555632_66A94AE1 X-CRM114-Status: GOOD ( 11.95 ) 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 The patch does some cleanup work on NETGEAR ReadyNAS 104 .dts file. Changes are listed below: - Completed conversion from value to macros for GPIO voltage level - Converted all numeric input key values to macros - Fixed all node names and labels to use respectively '-' and '_' - Made button names more explicit - Changed order of included files from general to local - Removed useless clocks and gpio-keys properties - Document ethernet PHY (Marvell 88E1318) via a comment - Made G762 clock node name unique by including g762 in it Signed-off-by: Arnaud Ebalard --- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 68 ++++++++++++-------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts index 50b5150..e48e5fb 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts @@ -11,8 +11,9 @@ /dts-v1/; -#include "armada-370.dtsi" +#include #include +#include "armada-370.dtsi" / { model = "NETGEAR ReadyNAS 104"; @@ -59,12 +60,12 @@ marvell,function = "gpio"; }; - backup_key_pin: backup-key-pin { + backup_button_pin: backup-button-pin { marvell,pins = "mpp52"; marvell,function = "gpio"; }; - power_key_pin: power-key-pin { + power_button_pin: power-button-pin { marvell,pins = "mpp62"; marvell,function = "gpio"; }; @@ -79,18 +80,18 @@ marvell,function = "gpio"; }; - reset_key_pin: reset-key-pin { + reset_button_pin: reset-button-pin { marvell,pins = "mpp65"; marvell,function = "gpio"; }; }; mdio { - phy0: ethernet-phy@0 { + phy0: ethernet-phy@0 { /* Marvell 88E1318 */ reg = <0>; }; - phy1: ethernet-phy@1 { + phy1: ethernet-phy@1 { /* Marvell 88E1318 */ reg = <1>; }; }; @@ -136,90 +137,85 @@ }; 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 = <&backup_led_pin &power_led_pin>; pinctrl-names = "default"; - blue_backup_led { + blue-backup-led { label = "rn104:blue:backup"; - gpios = <&gpio1 31 0>; /* GPIO 63 Active High */ + gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - blue_power_led { + blue-power-led { label = "rn104:blue:pwr"; - gpios = <&gpio2 0 1>; /* GPIO 64 Active Low */ + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "keep"; }; - sata1_led { + blue-sata1-led { label = "rn104:blue:sata1"; gpios = <&pca9554 0 GPIO_ACTIVE_LOW>; default-state = "off"; }; - sata2_led { + blue-sata2-led { label = "rn104:blue:sata2"; gpios = <&pca9554 1 GPIO_ACTIVE_LOW>; default-state = "off"; }; - sata3_led { + blue-sata3-led { label = "rn104:blue:sata3"; gpios = <&pca9554 2 GPIO_ACTIVE_LOW>; default-state = "off"; }; - sata4_led { + blue-sata4-led { label = "rn104:blue:sata4"; gpios = <&pca9554 3 GPIO_ACTIVE_LOW>; default-state = "off"; }; }; - gpio_keys { + gpio-keys { compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-0 = <&backup_key_pin - &power_key_pin - &reset_key_pin>; + pinctrl-0 = <&backup_button_pin + &power_button_pin + &reset_button_pin>; pinctrl-names = "default"; - button@1 { + backup-button { label = "Backup Button"; - linux,code = <133>; /* KEY_COPY */ - gpios = <&gpio1 20 1>; + linux,code = ; + gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; }; - button@2 { + power-button { label = "Power Button"; - linux,code = <116>; /* KEY_POWER */ - gpios = <&gpio1 30 0>; + linux,code = ; + gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; }; - button@3 { + reset-button { label = "Reset Button"; - linux,code = <0x198>; /* KEY_RESTART */ - gpios = <&gpio2 1 1>; + linux,code = ; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; }; - gpio_poweroff { + gpio-poweroff { compatible = "gpio-poweroff"; pinctrl-0 = <&poweroff>; pinctrl-names = "default"; - gpios = <&gpio1 28 1>; + gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; }; };