From patchwork Tue Feb 2 10:58:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 577090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3BEB9140BCD for ; Tue, 2 Feb 2016 22:00:06 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQYgm-0003WL-Op; Tue, 02 Feb 2016 11:00:04 +0000 Received: from smtprelay.synopsys.com ([198.182.60.111]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQYgk-000372-Kd for linux-snps-arc@lists.infradead.org; Tue, 02 Feb 2016 11:00:03 +0000 Received: from us02secmta1.synopsys.com (us02secmta1.synopsys.com [10.12.235.96]) by smtprelay.synopsys.com (Postfix) with ESMTP id 7FAE510C1409; Tue, 2 Feb 2016 02:59:45 -0800 (PST) Received: from us02secmta1.internal.synopsys.com (us02secmta1.internal.synopsys.com [127.0.0.1]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id 72EE94E213; Tue, 2 Feb 2016 02:59:45 -0800 (PST) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id 2FD424E202; Tue, 2 Feb 2016 02:59:45 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 12F49EE7; Tue, 2 Feb 2016 02:59:45 -0800 (PST) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id F1434EE6; Tue, 2 Feb 2016 02:59:44 -0800 (PST) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 2 Feb 2016 02:59:44 -0800 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 2 Feb 2016 16:29:41 +0530 Received: from vineet-E7440.internal.synopsys.com (10.12.197.208) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 2 Feb 2016 16:29:41 +0530 From: Vineet Gupta To: , , Noam Camus Subject: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Date: Tue, 2 Feb 2016 16:28:52 +0530 Message-ID: <1454410739-24444-3-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454410739-24444-1-git-send-email-vgupta@synopsys.com> References: <1454410739-24444-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 X-Originating-IP: [10.12.197.208] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160202_030002_776651_DBF588CD X-CRM114-Status: GOOD ( 10.66 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.60.111 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [198.182.60.111 listed in wl.mailspike.net] -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Vineet Gupta , Daniel Lezcano , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org ARC Timers have historically been probed directly. As precursor to start probing Timers thru DT introduce these bindings Cc: Daniel Lezcano Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Vineet Gupta --- .../devicetree/bindings/timer/snps,arc-timer0.txt | 23 ++++++++++++++++++++++ .../devicetree/bindings/timer/snps,arc-timer1.txt | 17 ++++++++++++++++ .../devicetree/bindings/timer/snps,archs-gfrc.txt | 14 +++++++++++++ .../devicetree/bindings/timer/snps,archs-rtc.txt | 14 +++++++++++++ arch/arc/boot/dts/abilis_tb10x.dtsi | 12 +++++++++++ arch/arc/boot/dts/skeleton.dtsi | 12 +++++++++++ arch/arc/boot/dts/skeleton_hs.dtsi | 12 +++++++++++ arch/arc/boot/dts/skeleton_hs_idu.dtsi | 12 +++++++++++ 8 files changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/snps,arc-timer0.txt create mode 100644 Documentation/devicetree/bindings/timer/snps,arc-timer1.txt create mode 100644 Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt create mode 100644 Documentation/devicetree/bindings/timer/snps,archs-rtc.txt diff --git a/Documentation/devicetree/bindings/timer/snps,arc-timer0.txt b/Documentation/devicetree/bindings/timer/snps,arc-timer0.txt new file mode 100644 index 000000000000..ceb80c72a90b --- /dev/null +++ b/Documentation/devicetree/bindings/timer/snps,arc-timer0.txt @@ -0,0 +1,23 @@ +Synopsys ARC Local Timer with Interrupt Capabilities +- Found on all ARC CPUs (ARC700/ARCHS) +- Mandatory clockevent provider + +Required properties: + +- compatible : should be "snps,arc-timer0" +- interrupts : single Interrupt going into parent intc + (16 for ARCHS cores, 3 for ARC700 cores) +- clocks : phandle to the source clock + +Optional properties: + +- interrupt-parent : phandle to parent intc + +Example: + + timer0: timer_clkevt { + compatible = "snps,arc-timer0"; + interrupts = <3>; + interrupt-parent = <&core_intc>; + clocks = <&timer0_clk>; + }; diff --git a/Documentation/devicetree/bindings/timer/snps,arc-timer1.txt b/Documentation/devicetree/bindings/timer/snps,arc-timer1.txt new file mode 100644 index 000000000000..4886192ce2f2 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/snps,arc-timer1.txt @@ -0,0 +1,17 @@ +Synopsys ARC Free Running Local 32-bit Timer +- Found on all ARC CPUs (ARC700/ARCHS) +- Mandatory clocksource provider on ARC700 +- Optional clocksource provider on UP ARC HS CPUs + (and if better timer archs-rtc not available in SoC) + +Required properties: + +- compatible : should be "snps,arc-timer1" +- clocks : phandle to the source clock + +Example: + + timer1: timer_clksrc { + compatible = "snps,arc-timer1"; + clocks = <&timer0_clk>; + }; diff --git a/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt b/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt new file mode 100644 index 000000000000..cce60e16aa0d --- /dev/null +++ b/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt @@ -0,0 +1,14 @@ +Synopsys ARC Free Running 64-bit Global Timer for ARC HS CPUs +- clocksourc provider for SMP SoC + +Required properties: + +- compatible : should be "snps,archs-gfrc" +- clocks : phandle to the source clock + +Example: + + timer1: timer_clksrc { + compatible = "snps,archs-gfrc"; + clocks = <&timer0_clk>; + }; diff --git a/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt b/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt new file mode 100644 index 000000000000..f3b49938812b --- /dev/null +++ b/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt @@ -0,0 +1,14 @@ +Synopsys ARC Free Running 64-bit Local Timer for ARC HS CPUs +- clocksourc provider for UP SoC + +Required properties: + +- compatible : should be "snps,archs-rtc" +- clocks : phandle to the source clock + +Example: + + timer1: timer_clksrc { + compatible = "snps,arc-rtc"; + clocks = <&timer0_clk>; + }; diff --git a/arch/arc/boot/dts/abilis_tb10x.dtsi b/arch/arc/boot/dts/abilis_tb10x.dtsi index cfb5052239a1..f9f138efa92c 100644 --- a/arch/arc/boot/dts/abilis_tb10x.dtsi +++ b/arch/arc/boot/dts/abilis_tb10x.dtsi @@ -35,6 +35,18 @@ }; }; + timer0: timer_clkevt { + compatible = "snps,arc-timer0"; + interrupts = <3>; + interrupt-parent = <&intc>; + clocks = <&cpu_clk>; + }; + + timer1: timer_clksrc { + compatible = "snps,arc-timer1"; + clocks = <&cpu_clk>; + }; + soc100 { #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arc/boot/dts/skeleton.dtsi b/arch/arc/boot/dts/skeleton.dtsi index 296d371a335c..bcb08b36210d 100644 --- a/arch/arc/boot/dts/skeleton.dtsi +++ b/arch/arc/boot/dts/skeleton.dtsi @@ -30,6 +30,18 @@ }; }; + timer0: timer_clkevt { + compatible = "snps,arc-timer0"; + interrupts = <3>; + interrupt-parent = <&core_intc>; + clocks = <&core_clk>; + }; + + timer1: timer_clksrc { + compatible = "snps,arc-timer1"; + clocks = <&core_clk>; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256M */ diff --git a/arch/arc/boot/dts/skeleton_hs.dtsi b/arch/arc/boot/dts/skeleton_hs.dtsi index a53876669030..46c5b05aea90 100644 --- a/arch/arc/boot/dts/skeleton_hs.dtsi +++ b/arch/arc/boot/dts/skeleton_hs.dtsi @@ -25,6 +25,18 @@ }; }; + timer0: timer_clkevt { + compatible = "snps,arc-timer0"; + interrupts = <16>; + interrupt-parent = <&core_intc>; + clocks = <&core_clk>; + }; + + timer1: timer_clksrc { + compatible = "snps,arc-timer1"; + clocks = <&core_clk>; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256M */ diff --git a/arch/arc/boot/dts/skeleton_hs_idu.dtsi b/arch/arc/boot/dts/skeleton_hs_idu.dtsi index 74898d017f7a..2a40bd9e2e2a 100644 --- a/arch/arc/boot/dts/skeleton_hs_idu.dtsi +++ b/arch/arc/boot/dts/skeleton_hs_idu.dtsi @@ -25,6 +25,18 @@ }; }; + timer0: timer_clkevt { + compatible = "snps,arc-timer0"; + interrupts = <16>; + interrupt-parent = <&core_intc>; + clocks = <&core_clk>; + }; + + timer1: timer_clksrc { + compatible = "snps,archs-timer-gfrc"; + clocks = <&core_clk>; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256M */