From patchwork Fri Nov 29 20:27:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3259441 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 BD45F9F384 for ; Fri, 29 Nov 2013 20:28:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA8632060E for ; Fri, 29 Nov 2013 20:28:53 +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 BBA40205FD for ; Fri, 29 Nov 2013 20:28:52 +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 1VmUfr-0002bM-Aq; Fri, 29 Nov 2013 20:28:27 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VmUfg-0001sk-Aq; Fri, 29 Nov 2013 20:28:16 +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 1VmUfd-0001r0-Mg for linux-arm-kernel@lists.infradead.org; Fri, 29 Nov 2013 20:28:14 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id A66C02C0D6F; 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=Q+t4sJIO6zpQVlWMTQnpStMYlhhBJoepuP0wNSmUwaM=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=faOojJNgRAEQ9D8fO530lHY5N27rGhgK0asPQkNr35x+jWDwYfWjiF0bgzlExNacK /fUELWL//iNCHp5BDPB2ssyOIokJL00iv7g1e3Mj8pAv4sRPhpPNiOVLVVdcoYqvKt fCJwxFIIPrtfCBUzLxScuHA/J9ESw70T3qPGt5O0= 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 9EF662C0C3F; Fri, 29 Nov 2013 21:27:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385756845; bh=Q+t4sJIO6zpQVlWMTQnpStMYlhhBJoepuP0wNSmUwaM=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=nqFwY0TH9td2C1NFUA/WZLlMNTauVjOGRzaJbpYuVS0QDYqwRnrefy7btz3afct4D HHp07N/ZVONORqGzVvb8y8aGcpFtE+aMc9nQVsQPkgxKZEH3s4NNN70XX+e3C6KGvk 3bCoMDDrpxDkorc4pRIXXeuOm5D4KIqZgj5Wr/Cc= X-Hashcash: 1:20:131129:jason@lakedaemon.net::koTfa7wBJUrXk+hy:000000000000000000000000000000000000000005rw8 X-Hashcash: 1:20:131129:andrew@lunn.ch::+M+Cn0Cf0rYhBOZC:0000nO+ X-Hashcash: 1:20:131129:gregory.clement@free-electrons.com::pu25ebGfEC7+9ozp:0000000000000000000000000005zrQ X-Hashcash: 1:20:131129:sebastian.hesselbarth@gmail.com::yUsF9IIG84IUhG8c:0000000000000000000000000000001MXH X-Hashcash: 1:20:131129:linux@arm.linux.org.uk::z8LEbM2dodrHTj+b:0000000000000000000000000000000000000003WrB X-Hashcash: 1:20:131129:linux-arm-kernel@lists.infradead.org::Iyy4DSzlywwMuxs/:00000000000000000000000004C+N X-Hashcash: 1:20:131129:rob.herring@calxeda.com::PUyv7cNA3TXNiSgW:000000000000000000000000000000000000000bd8 X-Hashcash: 1:20:131129:pawel.moll@arm.com::DvBsGTP5KKi23jTz:00000000000000000000000000000000000000000003Xl2 X-Hashcash: 1:20:131129:mark.rutland@arm.com::mRF6iejataIj7PGw:000000000000000000000000000000000000000005UuM X-Hashcash: 1:20:131129:swarren@wwwdotorg.org::MdO5jdgqMZ7JkZT1:00000000000000000000000000000000000000005GOu X-Hashcash: 1:20:131129:ijc+devicetree@hellion.org.uk::s45LiCRb+keEGeri:000000000000000000000000000000002quA X-Hashcash: 1:20:131129:devicetree@vger.kernel.org::tm38Z0e5kXwclVTs:00000000000000000000000000000000000198B From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCHv2 1/4] ARM: kirkwood: NETGEAR ReadyNAS Duo v2 .dts cleanup In-Reply-To: References: Message-Id: <79f40df9fe26fbb5177c5389a2f3961d8f77cdf8.1385756371.git.arno@natisbad.org> Date: Fri, 29 Nov 2013 21:27:25 +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_152814_024005_D61A282F X-CRM114-Status: GOOD ( 14.87 ) 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 Duo v2 .dts file. Changes are listed below: - Converted from value to macros for GPIO voltage level - Converted all numeric input key values to macros - Made button names more explicit - Document ethernet PHY (Marvell 88E1318) via a comment - Added header for the file to describe content and author - Made G762 clock node name unique by including g762 in it - Fixed all node names and labels to use respectively '-' and '_' - Changed order of included files from general to local - Removed useless clocks and gpio-keys properties Signed-off-by: Arnaud Ebalard --- .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 51 ++++++++++++---------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts index 551bfed..03bb136 100644 --- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts @@ -1,5 +1,17 @@ +/* + * Device Tree file for NETGEAR ReadyNAS Duo v2 + * + * 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 #include #include "kirkwood.dtsi" #include "kirkwood-6282.dtsi" @@ -68,10 +80,7 @@ }; clocks { - #address-cells = <1>; - #size-cells = <0>; - - g762_clk: fixedclk { + g762_clk: g762-oscillator { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <8192>; @@ -117,49 +126,47 @@ power_led { label = "status:blue:power_led"; - gpios = <&gpio0 31 1>; /* GPIO 31 Active Low */ + gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; linux,default-trigger = "default-on"; }; activity_led { label = "status:blue:activity_led"; - gpios = <&gpio1 6 1>; /* GPIO 38 Active Low */ + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; }; disk1_led { label = "status:blue:disk1_led"; - gpios = <&gpio0 23 1>; /* GPIO 23 Active Low */ + gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; }; disk2_led { label = "status:blue:disk2_led"; - gpios = <&gpio0 22 1>; /* GPIO 22 Active Low */ + gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; }; backup_led { label = "status:blue:backup_led"; - gpios = <&gpio0 29 1>; /* GPIO 29 Active Low*/ + gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; }; }; - gpio_keys { + gpio-keys { compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; pinctrl-0 = <&pmx_button_power &pmx_button_backup &pmx_button_reset>; pinctrl-names = "default"; - button@1 { + power-button { label = "Power Button"; - linux,code = <116>; /* KEY_POWER */ - gpios = <&gpio1 15 1>; + linux,code = ; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; - button@2 { + reset-button { label = "Reset Button"; - linux,code = <0x198>; /* KEY_RESTART */ - gpios = <&gpio0 13 1>; + linux,code = ; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; - button@3 { + backup-button { label = "Backup Button"; - linux,code = <133>; /* KEY_COPY */ - gpios = <&gpio1 13 1>; + linux,code = ; + gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; }; }; @@ -222,7 +229,7 @@ &mdio { status = "okay"; - ethphy0: ethernet-phy@0 { + ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */ device_type = "ethernet-phy"; reg = <0>; };