From patchwork Fri Nov 22 15:27:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 3222821 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 70E579F3AE for ; Fri, 22 Nov 2013 15:28:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83534207A0 for ; Fri, 22 Nov 2013 15:28:24 +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 8A4752074A for ; Fri, 22 Nov 2013 15:28:19 +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 1VjseV-0000Z0-Ef; Fri, 22 Nov 2013 15:28:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjseS-0001E2-VN; Fri, 22 Nov 2013 15:28: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 1VjseL-0001DQ-9d for linux-arm-kernel@lists.infradead.org; Fri, 22 Nov 2013 15:28:10 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id 0FD862C0910; Fri, 22 Nov 2013 16:27:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385134062; bh=N2BqGtrUGmqJyet4rAdTrWPh5CLXSfjjZep8moyYe3s=; h=From:To:Cc:Subject:Date; b=AsuSXrWC28ZWDCKFE0vpRaQPauGcM4QGZEF6lCvnwLQUDmRdSenba+DfkfJ80FGuA X/4PGgzPnsMzL3C/yzf+8Yi18zbPck4iUeLJVQUoKt6wF2l2kr8KUVr/P8PyH91tQ1 exNOmdx2ikFC/E9CxUQCOuvZoQaxUAT1Ri1UuXD8= 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 C4D552C0910; Fri, 22 Nov 2013 16:27:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1385134030; bh=N2BqGtrUGmqJyet4rAdTrWPh5CLXSfjjZep8moyYe3s=; h=From:To:Cc:Subject:Date; b=QXd3tmx283jxEYZE7IYFRl23LbIPBf+K2Kmy6Kh7t017V+B2nufqVtQfLP/55P42m lhScCqtlmTmex/LMUDf/3JxBPikOrDbuw1THtYgaQfC2RjKRmtiVOs1lX45M0DEpXX h5bICSRm7eYISAS1vPGWHJmwFVtgNzM9vnxGcqx0= X-Hashcash: 1:20:131122:jason@lakedaemon.net::ecYiABgkTSnNOmAz:000000000000000000000000000000000000000003kkD X-Hashcash: 1:20:131122:andrew@lunn.ch::+SFnJIKoWqF/UDHI:00026sh X-Hashcash: 1:20:131122:gregory.clement@free-electrons.com::n3AlMYRoulM1VVGX:000000000000000000000000000310/ X-Hashcash: 1:20:131122:sebastian.hesselbarth@gmail.com::y2HukDBBZ93faqla:0000000000000000000000000000003Yh+ X-Hashcash: 1:20:131122:linux@arm.linux.org.uk::wkktJ6tanpSlQTug:0000000000000000000000000000000000000002XdT X-Hashcash: 1:20:131122:linux-arm-kernel@lists.infradead.org::XeH+IbtIBJ8cvqbg:00000000000000000000000000Ilk X-Hashcash: 1:20:131122:rob.herring@calxeda.com::WidddS/kIko1vUOh:000000000000000000000000000000000000004Kr9 X-Hashcash: 1:20:131122:pawel.moll@arm.com::Dsvgv7c+wdGaO414:00000000000000000000000000000000000000000001nWT X-Hashcash: 1:20:131122:mark.rutland@arm.com::3UYiqcMHlRNBwUVo:000000000000000000000000000000000000000005pz4 X-Hashcash: 1:20:131122:swarren@wwwdotorg.org::Mdi3h13OeX+hVQBi:00000000000000000000000000000000000000000ucK X-Hashcash: 1:20:131122:ijc+devicetree@hellion.org.uk::ELHyRKrlFCvaIy/v:000000000000000000000000000000003u9f X-Hashcash: 1:20:131122:devicetree@vger.kernel.org::/5tY0yGRRrog33kJ:000000000000000000000000000000000004HZT From: arno@natisbad.org (Arnaud Ebalard) To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCH] ARM: kirkwood: ReadyNAS Duo v2 .dts cleanup 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 16:27:09 +0100 Message-ID: <87li0ge9te.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-20131122_102805_845318_1F12F355 X-CRM114-Status: GOOD ( 17.03 ) 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 GPIO voltage level from value to macros - Converted all numeric input key values to macros - Fixed bad spacing - Added some space between some nodes to improve readability - Made button node names more explicit - Added compatible string for PHY (marvell,mv88e1318s) - 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 '_' - Removed useless clocks and gpio-keys properties Signed-off-by: Arnaud Ebalard --- Hi Jason, This patch applies above the one adding gpio-poweroff driver for the Duo v2 I just sent a few minutes ago. Most of the changes it contains were Suggested-By: Sebastian Hesselbarth ;-) If you have additional ideas or see things that should be fixed, I am interested. As soon as I get a final version of this one, I will push the same kind of cleanup patches for the RN102 and RN014 boards. .../boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 98 +++++++++++++--------- 1 file changed, 60 insertions(+), 38 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..0961e80 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" @@ -33,34 +45,42 @@ marvell,pins = "mpp47"; marvell,function = "gpio"; }; + pmx_button_backup: pmx-button-backup { marvell,pins = "mpp45"; marvell,function = "gpio"; }; + pmx_button_reset: pmx-button-reset { marvell,pins = "mpp13"; marvell,function = "gpio"; }; + pmx_led_blue_power: pmx-led-blue-power { marvell,pins = "mpp31"; marvell,function = "gpio"; }; + pmx_led_blue_activity: pmx-led-blue-activity { marvell,pins = "mpp38"; marvell,function = "gpio"; }; + pmx_led_blue_disk1: pmx-led-blue-disk1 { marvell,pins = "mpp23"; marvell,function = "gpio"; }; + pmx_led_blue_disk2: pmx-led-blue-disk2 { marvell,pins = "mpp22"; marvell,function = "gpio"; }; + pmx_led_blue_backup: pmx-led-blue-backup { marvell,pins = "mpp29"; marvell,function = "gpio"; }; + pmx_poweroff: pmx-poweroff { marvell,pins = "mpp30"; marvell,function = "gpio"; @@ -68,10 +88,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 +134,53 @@ 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>; }; }; @@ -170,23 +191,23 @@ gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; }; - regulators { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <0>; - - usb_power: regulator@1 { - compatible = "regulator-fixed"; - reg = <1>; - regulator-name = "USB 3.0 Power"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - enable-active-high; - regulator-always-on; - regulator-boot-on; - gpio = <&gpio1 14 0>; - }; - }; + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + usb3_regulator: usb3-regulator { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "USB 3.0 Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; + }; + }; }; &nand { @@ -224,6 +245,7 @@ ethphy0: ethernet-phy@0 { device_type = "ethernet-phy"; + compatible = "marvell,88e1318s"; reg = <0>; }; };