]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
dt-binding: tegra: add timer source documentation
authorShreshtha SAHU <ssahu@nvidia.com>
Tue, 20 Jun 2017 15:14:26 +0000 (20:44 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 7 Jul 2017 23:29:38 +0000 (16:29 -0700)
Add documentation of possible methods to provide WDT timer sources,
their priorities of selection and restriction in usage of each
method.

Bug 200314562

Change-Id: Ib19c9962e181301b9b3b373c7e079c211a6e09e8
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515193
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Documentation/devicetree/bindings/watchdog/tegra-wdt.txt

index 139318461c52224a834b66daf00a423dd47704fc..febb950bcef86ca8ac6f622a66110f109c15a8da 100644 (file)
@@ -12,14 +12,36 @@ Optional properties:
 - nvidia,expiry-count: total expiry count of WDT (1 if not specified)
 - nvidia,enable-on-init: Toggle switch for enable during init
 - nvidia,heartbeat-init: default timeout in secs (120 secs if not specified)
+- nvidia,timer-index: timer source index for WDT
+
+Timer source index:
+
+      There are three ways by which WDT timer source index can be specified
+and timer source selection happens with below given priorty order (decending)
+(a) Bootloader programs WDT and timer source
+(b) "nvidia,timer-index" property in DT
+(c) Timer source base address in DT (old method)
+
+Method (a) is of highest priority, because bootloader can program the WDT timer
+source and lock to prevent any further modification of timer source by kernel.
+In order to calculate the timer source address in runtime in this case timer
+base address is required and hence Timer base address should be provided in
+timer resource property in DT.
+
+Either timer base address or timer source address is expected in timer resource
+property in DT for case (b).
+
+Note: If method (c) is used it should correspond to the timer source index provided
+in method (a) or (b) or make sure that method (a) or (b) is not in use.
 
 Examples:
 
 watchdog@60005100 {
        compatible = "nvidia,tegra-wdt";
        reg = <0x0 0x60005100 0x0 0x20          /* WDT0 registers */
-               0x0 0x60005070 0x0 0x8>;        /* TMR7 registers */
+               0x0 0x60005088 0x0 0x8>;        /* TMR0 registers */
        interrupts = <0 123 0x04>;
        nvidia,expiry-count = <4>;
+       nvidia,timer-index = <7>;
        status = "disabled";
 };