From patchwork Fri Nov 29 20:27:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3259461 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 12DEFBEEAD for ; Fri, 29 Nov 2013 20:29:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F19C2060E for ; Fri, 29 Nov 2013 20:29:36 +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 EA711205FD for ; Fri, 29 Nov 2013 20:29:34 +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 1VmUgJ-0002uO-Fb; Fri, 29 Nov 2013 20:28:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VmUg2-0001tW-Ln; Fri, 29 Nov 2013 20:28:38 +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 1VmUfz-0001sj-Pk for linux-arm-kernel@lists.infradead.org; Fri, 29 Nov 2013 20:28:36 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id B62082C0D71; Fri, 29 Nov 2013 21:28:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385756892; bh=NPH+Tz3TS78UDBsePVpMF1+SVWJUFPPJOPuOHD4oX60=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=z6f6UIQgERjgrPHadLtWk0NnuQmnL5GsdDZpeHS2Xj8qke121q8jbhWO9ERs4Yw46 CoB2qBMhUH7v5rhAKxvuHjk+TkD+TpUE8zZn53iz542HKIeUyukVNYh90rclfOyCs1 242PQUV/Y1IjajH4/5iLlyyC0QNKl83lRn1MuWzI= 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 9B0BC2C0D6E; Fri, 29 Nov 2013 21:27:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385756858; bh=NPH+Tz3TS78UDBsePVpMF1+SVWJUFPPJOPuOHD4oX60=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=mHpPuq9DpAb8fKtWw9m49BfjrRelBmKqnOB6SN0sxJ01tAOItWLPqjvCZUAy83jnQ p74TC5ea6iu8Zmi7nD1D8XnhMfY+st2BT/R5X6orz+4UWXXCXUI2a6z73foi5PH6zy 1DfdKsIRfrdj3QXvzbj+wFaiC1kAdjFMoSsaqU0s= X-Hashcash: 1:20:131129:jason@lakedaemon.net::skWQPOIl8+/THwk1:000000000000000000000000000000000000000001jCi X-Hashcash: 1:20:131129:andrew@lunn.ch::OV+JhwT4Ih8gIr7o:0001yLD X-Hashcash: 1:20:131129:gregory.clement@free-electrons.com::W2sSpRpCABnUouIO:0000000000000000000000000004XNB X-Hashcash: 1:20:131129:sebastian.hesselbarth@gmail.com::crk6GCuaKU1bSHn9:000000000000000000000000000000Bf+F X-Hashcash: 1:20:131129:linux@arm.linux.org.uk::clpjV0aQEd2KkRnk:000000000000000000000000000000000000000Bzcl X-Hashcash: 1:20:131129:linux-arm-kernel@lists.infradead.org::MeDt2kJ3WySPUke8:0000000000000000000000000HYOT X-Hashcash: 1:20:131129:rob.herring@calxeda.com::nA9VSscl2FwDRv+d:000000000000000000000000000000000000000V1p X-Hashcash: 1:20:131129:pawel.moll@arm.com::7ujt5SudI2zjet9w:000000000000000000000000000000000000000000008Jt X-Hashcash: 1:20:131129:mark.rutland@arm.com::zvGeTDCybhLp4EJh:000000000000000000000000000000000000000007nok X-Hashcash: 1:20:131129:swarren@wwwdotorg.org::jMibUYLGwWBOSv6d:00000000000000000000000000000000000000000EOs X-Hashcash: 1:20:131129:ijc+devicetree@hellion.org.uk::/maLRAvpGWzU87wz:00000000000000000000000000000000I9JT X-Hashcash: 1:20:131129:devicetree@vger.kernel.org::EPW3P23NHhH5yJgo:000000000000000000000000000000000000qA4 From: Arnaud Ebalard To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCHv2 2/4] ARM: mvebu: NETGEAR ReadyNAS 102 .dts cleanup In-Reply-To: References: Message-Id: <10b7a81f838d2bc554cb55c329532e0cadc73619.1385756371.git.arno@natisbad.org> Date: Fri, 29 Nov 2013 21:27:38 +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_152836_265021_5BB20D2E X-CRM114-Status: GOOD ( 12.39 ) 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 102 .dts file. Changes are listed below - Added missing button mpp in pinctrl - Converted from value to macros for GPIO voltage level - Converted all numeric input key values to macros - Added GPIO keys pins to pinctrl - Made button names more explicit - Document ethernet PHY (Marvell 88E1318) via a comment - 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 --- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 81 +++++++++++++++----------- 1 file changed, 48 insertions(+), 33 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..6411105 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"; @@ -84,7 +101,7 @@ }; mdio { - phy0: ethernet-phy@0 { + phy0: ethernet-phy@0 { /* Marvell 88E1318 */ reg = <0>; }; }; @@ -117,78 +134,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>; }; - };