]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARC: [dts] Introduce Timer bindings
authorVineet Gupta <vgupta@synopsys.com>
Fri, 1 Jan 2016 13:18:40 +0000 (18:48 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 7 Mar 2016 12:36:13 +0000 (18:06 +0530)
ARC Timers have historically been probed directly.
As precursor to start probing Timers thru DT introduce these bindings
Note that to keep series bisectable, these bindings are not yet used in
code.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Documentation/devicetree/bindings/timer/snps,arc-timer.txt [new file with mode: 0644]
Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt [new file with mode: 0644]
Documentation/devicetree/bindings/timer/snps,archs-rtc.txt [new file with mode: 0644]
arch/arc/boot/dts/abilis_tb10x.dtsi
arch/arc/boot/dts/skeleton.dtsi
arch/arc/boot/dts/skeleton_hs.dtsi
arch/arc/boot/dts/skeleton_hs_idu.dtsi

diff --git a/Documentation/devicetree/bindings/timer/snps,arc-timer.txt b/Documentation/devicetree/bindings/timer/snps,arc-timer.txt
new file mode 100644 (file)
index 0000000..9e02be2
--- /dev/null
@@ -0,0 +1,26 @@
+Synopsys ARC Local Timer with Interrupt Capabilities
+- Found on all ARC CPUs (ARC700/ARCHS)
+- Can be optionally programmed to interrupt on Limit
+- Two idential copies TIMER0 and TIMER1 exist in ARC cores and historically
+  TIMER0 used as clockevent provider (true for all ARC cores)
+  TIMER1 used for clocksource (mandatory for ARC700, optional for ARC HS)
+
+Required properties:
+
+- compatible : should be "snps,arc-timer"
+- 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:
+
+       timer@0 {
+               compatible = "snps,arc-timer0";
+               interrupts = <3>;
+               interrupt-parent = <&core_intc>;
+               clocks = <&core_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 (file)
index 0000000..aaab100
--- /dev/null
@@ -0,0 +1,14 @@
+Synopsys ARC Free Running 64-bit Global Timer for ARC HS CPUs
+- clocksource provider for SMP SoC
+
+Required properties:
+
+- compatible : should be "snps,archs-gfrc"
+- clocks     : phandle to the source clock
+
+Example:
+
+       timer@1 {
+               compatible = "snps,archs-gfrc";
+               clocks = <&core_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 (file)
index 0000000..13f756f
--- /dev/null
@@ -0,0 +1,14 @@
+Synopsys ARC Free Running 64-bit Local Timer for ARC HS CPUs
+- clocksource provider for UP SoC
+
+Required properties:
+
+- compatible : should be "snps,archs-rtc"
+- clocks     : phandle to the source clock
+
+Example:
+
+       timer@1 {
+               compatible = "snps,arc-rtc";
+               clocks = <&core_clk>;
+       };
index cfb5052239a1cffdcb3f8ac3dc07537441d55bef..eadbe71dfa2266f9528254a8f298ff1b48ae1aca 100644 (file)
                };
        };
 
+       /* TIMER0 with interrupt for clockevent */
+       timer@0 {
+               compatible = "snps,arc-timer";
+               interrupts = <3>;
+               interrupt-parent = <&intc>;
+               clocks = <&cpu_clk>;
+       };
+
+       /* TIMER1 for free running clocksource */
+       timer@1 {
+               compatible = "snps,arc-timer";
+               clocks = <&cpu_clk>;
+       };
+
        soc100 {
                #address-cells  = <1>;
                #size-cells     = <1>;
index 296d371a335c8374b98efba984d95b705b3f343b..f6109c2feba7b91d3c7f9f6a0e22071dbb161071 100644 (file)
                };
        };
 
+       /* TIMER0 with interrupt for clockevent */
+       timer@0 {
+               compatible = "snps,arc-timer";
+               interrupts = <3>;
+               interrupt-parent = <&core_intc>;
+               clocks = <&core_clk>;
+       };
+
+       /* TIMER1 for free running clocksource */
+       timer@1 {
+               compatible = "snps,arc-timer";
+               clocks = <&core_clk>;
+       };
+
        memory {
                device_type = "memory";
                reg = <0x80000000 0x10000000>;  /* 256M */
index a53876669030f4768cff95f3237d9952b9392b35..49caeabca37a3733dcfdac729afafc13872da5c1 100644 (file)
                };
        };
 
+       /* TIMER0 with interrupt for clockevent */
+       timer@0 {
+               compatible = "snps,arc-timer";
+               interrupts = <16>;
+               interrupt-parent = <&core_intc>;
+               clocks = <&core_clk>;
+       };
+
+       /* 64-bit Local RTC: preferred clocksource for UP */
+       timer@1 {
+               compatible = "snps,archs-timer-rtc";
+               clocks = <&core_clk>;
+       };
+
+       /* TIMER1 for free running clocksource: Fallback if rtc not found */
+       timer@2 {
+               compatible = "snps,arc-timer";
+               clocks = <&core_clk>;
+       };
+
        memory {
                device_type = "memory";
                reg = <0x80000000 0x10000000>;  /* 256M */
index 74898d017f7ac552e2c86f82ac34265d5b124992..7e301ff16200a3ad409210ecf5fe269a6443ca4c 100644 (file)
                };
        };
 
+       /* TIMER0 with interrupt for clockevent */
+       timer@0 {
+               compatible = "snps,arc-timer";
+               interrupts = <16>;
+               interrupt-parent = <&core_intc>;
+               clocks = <&core_clk>;
+       };
+
+       /* 64-bit Global Free Running Counter */
+       timer@1 {
+               compatible = "snps,archs-timer-gfrc";
+               clocks = <&core_clk>;
+       };
+
        memory {
                device_type = "memory";
                reg = <0x80000000 0x10000000>;  /* 256M */