]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: tegra: define DT bindings for and instantiate timer
authorStephen Warren <swarren@nvidia.com>
Wed, 19 Sep 2012 18:02:31 +0000 (12:02 -0600)
committerStephen Warren <swarren@nvidia.com>
Mon, 15 Oct 2012 18:22:08 +0000 (12:22 -0600)
The Tegra timer provides a number of 29-bit timer channels, a single
32-bit free running counter, and in the Tegra30 variant, 5 watchdog modules.
The first two channels may also trigger a legacy watchdog reset.

Define a DT binding for this HW module, and add the module into the Tegra
device tree files.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt [new file with mode: 0644]
Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt [new file with mode: 0644]
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30.dtsi

diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt
new file mode 100644 (file)
index 0000000..e019fdc
--- /dev/null
@@ -0,0 +1,21 @@
+NVIDIA Tegra20 timer
+
+The Tegra20 timer provides four 29-bit timer channels and a single 32-bit free
+running counter. The first two channels may also trigger a watchdog reset.
+
+Required properties:
+
+- compatible : should be "nvidia,tegra20-timer".
+- reg : Specifies base physical address and size of the registers.
+- interrupts : A list of 4 interrupts; one per timer channel.
+
+Example:
+
+timer {
+       compatible = "nvidia,tegra20-timer";
+       reg = <0x60005000 0x60>;
+       interrupts = <0 0 0x04
+                       0 1 0x04
+                       0 41 0x04
+                       0 42 0x04>;
+};
diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt b/Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt
new file mode 100644 (file)
index 0000000..906109d
--- /dev/null
@@ -0,0 +1,23 @@
+NVIDIA Tegra30 timer
+
+The Tegra30 timer provides ten 29-bit timer channels, a single 32-bit free
+running counter, and 5 watchdog modules. The first two channels may also
+trigger a legacy watchdog reset.
+
+Required properties:
+
+- compatible : should be "nvidia,tegra30-timer", "nvidia,tegra20-timer".
+- reg : Specifies base physical address and size of the registers.
+- interrupts : A list of 6 interrupts; one per each of timer channels 1
+    through 5, and one for the shared interrupt for the remaining channels.
+
+timer {
+       compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer";
+       reg = <0x60005000 0x400>;
+       interrupts = <0 0 0x04
+                     0 1 0x04
+                     0 41 0x04
+                     0 42 0x04
+                     0 121 0x04
+                     0 122 0x04>;
+};
index f3a09d0d45bc801a012fe7ea97f73548384ae9ad..3e3997a36fd202e784b5a9b08e244e6b97a121da 100644 (file)
                #interrupt-cells = <3>;
        };
 
+       timer@60005000 {
+               compatible = "nvidia,tegra20-timer";
+               reg = <0x60005000 0x60>;
+               interrupts = <0 0 0x04
+                             0 1 0x04
+                             0 41 0x04
+                             0 42 0x04>;
+       };
+
        apbdma: dma {
                compatible = "nvidia,tegra20-apbdma";
                reg = <0x6000a000 0x1200>;
index b1497c7d7d6851db3753c1210e974cb9e47888c2..656272b16ad9719df4e83fc0aee309f54dcd83bd 100644 (file)
                #interrupt-cells = <3>;
        };
 
+       timer@60005000 {
+               compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer";
+               reg = <0x60005000 0x400>;
+               interrupts = <0 0 0x04
+                             0 1 0x04
+                             0 41 0x04
+                             0 42 0x04
+                             0 121 0x04
+                             0 122 0x04>;
+       };
+
        apbdma: dma {
                compatible = "nvidia,tegra30-apbdma", "nvidia,tegra20-apbdma";
                reg = <0x6000a000 0x1400>;