Skip to content

Commit 11efe9e

Browse files
huaqianliWim Van Sebroeck
authored andcommitted
dt-bindings: watchdog: ti,rti-wdt: Add support for WDIOF_CARDRESET
TI RTI (Real Time Interrupt) Watchdog doesn't support to record the watchdog cause. Add a reserved memory to know the last reboot was caused by the watchdog card. In the reserved memory, some specific info will be saved to indicate whether the watchdog reset was triggered in last boot. Signed-off-by: Li Hua Qian <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent f1a43aa commit 11efe9e

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ properties:
3434
power-domains:
3535
maxItems: 1
3636

37+
memory-region:
38+
maxItems: 1
39+
description:
40+
Contains the watchdog reserved memory. It is optional.
41+
In the reserved memory, the specified values, which are
42+
PON_REASON_SOF_NUM(0xBBBBCCCC), PON_REASON_MAGIC_NUM(0xDDDDDDDD),
43+
and PON_REASON_EOF_NUM(0xCCCCBBBB), are pre-stored at the first
44+
3 * 4 bytes to tell that last boot was caused by watchdog reset.
45+
Once the PON reason is captured by driver(rti_wdt.c), the driver
46+
is supposed to wipe the whole memory region. Surely, if this
47+
property is set, at least 12 bytes reserved memory starting from
48+
specific memory address(0xa220000) should be set. More please
49+
refer to example.
50+
3751
required:
3852
- compatible
3953
- reg
@@ -47,7 +61,18 @@ examples:
4761
/*
4862
* RTI WDT in main domain on J721e SoC. Assigned clocks are used to
4963
* select the source clock for the watchdog, forcing it to tick with
50-
* a 32kHz clock in this case.
64+
* a 32kHz clock in this case. Add a reserved memory(optional) to keep
65+
* the watchdog reset cause persistent, which was be written in 12 bytes
66+
* starting from 0xa2200000 by RTI Watchdog Firmware, then make it
67+
* possible to get watchdog reset cause in driver.
68+
*
69+
* Reserved memory should be defined as follows:
70+
* reserved-memory {
71+
* wdt_reset_memory_region: wdt-memory@a2200000 {
72+
* reg = <0x00 0xa2200000 0x00 0x1000>;
73+
* no-map;
74+
* };
75+
* }
5176
*/
5277
#include <dt-bindings/soc/ti,sci_pm_domain.h>
5378
@@ -58,4 +83,5 @@ examples:
5883
power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
5984
assigned-clocks = <&k3_clks 252 1>;
6085
assigned-clock-parents = <&k3_clks 252 5>;
86+
memory-region = <&wdt_reset_memory_region>;
6187
};

0 commit comments

Comments
 (0)