From patchwork Fri Mar 8 11:29:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2236921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 444314006E for ; Fri, 8 Mar 2013 11:34:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDvV2-0000tQ-KE; Fri, 08 Mar 2013 11:30:08 +0000 Received: from mail-ee0-f53.google.com ([74.125.83.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDvUh-0000qF-Vf for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2013 11:29:49 +0000 Received: by mail-ee0-f53.google.com with SMTP id e53so936399eek.26 for ; Fri, 08 Mar 2013 03:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=gWdajM41L/KSA4bXAJTI3qkZCOvr074/WMZxHcO3s+c=; b=k1qfVfUq2QDFWh72yhhtpmO+PLjNvhG3LftSpqdsQvTyGHgXUdLNbcb8kb0+NjkuTj CfQ+4RodYz94spyDl++Y1Td68cb8/bop7J3/r1y/R4KYz2RXX/OBRVWEbAaWL8x2Jgps xXUa2R8aGpMiFePRht5XHpQUSn/ydh5S5urZJk2l0zvL4am9onk/bxeY4B1ycuQ539qf EEgIEjJOAROFOOePEqvP6aNrEfCIMQWQgYG2e/Uj9ykjlRiSfHoIg7qiyNDVVC65BBEJ 3HrOC5OYs6Lk41dj0kl0jQgVSmoWzrulk5orroYDlTYartECdkUw1t/eV13OndhoQoNS ejFA== X-Received: by 10.14.202.71 with SMTP id c47mr4430418eeo.39.1362742185871; Fri, 08 Mar 2013 03:29:45 -0800 (PST) Received: from localhost.localdomain (p4FD23A77.dip.t-dialin.net. [79.210.58.119]) by mx.google.com with ESMTPS id q42sm7197626eem.14.2013.03.08.03.29.44 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Mar 2013 03:29:45 -0800 (PST) From: Bastian Hecht To: linux-sh@vger.kernel.org Subject: [PATCH v2 1/7] ARM: shmobile: Define DT bindings for timer devices Date: Fri, 8 Mar 2013 12:29:35 +0100 Message-Id: <1362742181-19111-2-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362742181-19111-1-git-send-email-hechtb+renesas@gmail.com> References: <1362742181-19111-1-git-send-email-hechtb+renesas@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130308_062948_239702_474BDA9F X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.53 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (hechtb[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Mark Rutland , Paul Mundt , Magnus Damm , Sergei Shtylyov , 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SH mobile series currently features 3 timer devices in the kernel: Compare Match Timer (CMT), Timer Unit (TMU) and MTU2. These devices share register layout characteristics amongst each that enable us to define common DT bindings for them. Signed-off-by: Bastian Hecht --- v2: - Split the bindings into an extra patch - Renamed the linux specific clocksource-rating and added an explanation why it is in the bindings - Using the postfix -timer in the compatible string .../devicetree/bindings/timer/renesas,timer.txt | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/renesas,timer.txt diff --git a/Documentation/devicetree/bindings/timer/renesas,timer.txt b/Documentation/devicetree/bindings/timer/renesas,timer.txt new file mode 100644 index 0000000..2c001bf --- /dev/null +++ b/Documentation/devicetree/bindings/timer/renesas,timer.txt @@ -0,0 +1,45 @@ +* Renesas SH Mobile Timer + +Bindings for several timer devices from Renesas including CMT, TMU and MTU2. + +Required properties: +- compatible : Should be "renesas,{device}-timer", + whereas device is "cmt", "tmu" or "mtu2". +- reg : Address and length of the register set for the device +- interrupts : Timer interrupt +- renesas,device-id : The ID of the timer device +- renesas,channel-id : The channel ID of the timer device +- renesas,source-quality : The viability to use this device as a free + running clock. From 0 (do not use) to 10 (best possible clock). +- renesas,event-quality : The viability to use this device as an event + generator. From 0 (do not use) to 10 (best possible clock). + +The properties renesas,{source,event}-quality reflect the situation that the +usability of the timer devices depend on the location within their SoCs. E.g. +the power domain affinty affects power management, some mux-ed lines might be +preferred to be assigned to other functions and other constraints. + +Example for CMT1 channel 0 on the R8A7740 SoC: + + timer@e6138010 { + compatible = "renesas,cmt-timer"; + interrupt-parent = <&intca>; + reg = <0xe6138010 0xc>; + interrupts = <0x0b00>; + renesas,device-id = <1>; + renesas,channel-id = <0>; + renesas,source-quality = <3>; + renesas,event-quality = <3>; + }; + +Example for TMU0 channel 1 on the SH7372 SoC: + timer@fff60014 { + compatible = "renesas,tmu-timer"; + interrupt-parent = <&intcs>; + reg = <0xfff60014 0xc>; + interrupts = <0xea0>; + renesas,device-id = <0>; + renesas,channel-id = <1>; + renesas,source-quality = <4>; + renesas,event-quality = <0>; + };