mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 21:03:31 -04:00
docs: watchdog: npcm: Add reset status description
Add documentation describing how the NPCM watchdog driver reports reset causes through bootstatus on NPCM750 and NPCM845 systems. Document the reset flag mapping, the watchdog instance mapping for WDIOF_CARDRESET, and the NPCM750/NPCM845 latch handling. Also mention sysfs bootstatus reporting when watchdog sysfs support is enabled. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Link: https://lore.kernel.org/r/20260706144828.3517631-3-tmaimon77@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
committed by
Guenter Roeck
parent
686a639c02
commit
016d840a7e
@@ -25,4 +25,5 @@ Driver specific
|
||||
hpwdt
|
||||
ics-wdt
|
||||
mlx-wdt
|
||||
npcm_wdt
|
||||
pcwd-watchdog
|
||||
|
||||
71
Documentation/watchdog/npcm_wdt.rst
Normal file
71
Documentation/watchdog/npcm_wdt.rst
Normal file
@@ -0,0 +1,71 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
=============
|
||||
NPCM Watchdog
|
||||
=============
|
||||
|
||||
The NPCM watchdog driver can report reset-cause information on
|
||||
``nuvoton,npcm750-wdt`` and ``nuvoton,npcm845-wdt`` systems.
|
||||
|
||||
Userspace can read the latched reset cause through
|
||||
``WDIOC_GETBOOTSTATUS``. When ``CONFIG_WATCHDOG_SYSFS`` is enabled, the
|
||||
same value is also visible through ``/sys/class/watchdog/watchdogN/bootstatus``.
|
||||
|
||||
The mapping is fixed in the driver. It exposes the SoC reset indications
|
||||
through the generic watchdog bootstatus flags and is not configurable from
|
||||
Device Tree.
|
||||
|
||||
.. list-table:: Reset-cause mapping
|
||||
:header-rows: 1
|
||||
|
||||
* - Platform
|
||||
- Reset indication
|
||||
- Bootstatus flag
|
||||
- Reported meaning
|
||||
* - NPCM750 and NPCM845
|
||||
- ``PORST``
|
||||
- ``WDIOF_OVERHEAT``
|
||||
- power-on reset
|
||||
* - NPCM750 and NPCM845
|
||||
- ``CORST``
|
||||
- ``WDIOF_FANFAULT``
|
||||
- core reset
|
||||
* - NPCM750 and NPCM845
|
||||
- ``SWR1RST``
|
||||
- ``WDIOF_EXTERN1``
|
||||
- software reset source 1
|
||||
* - NPCM750 and NPCM845
|
||||
- ``SWR2RST``
|
||||
- ``WDIOF_EXTERN2``
|
||||
- software reset source 2
|
||||
* - NPCM750 and NPCM845
|
||||
- ``SWR3RST``
|
||||
- ``WDIOF_POWERUNDER``
|
||||
- software reset source 3
|
||||
* - NPCM750
|
||||
- ``SWR4RST``
|
||||
- ``WDIOF_POWEROVER``
|
||||
- software reset source 4
|
||||
* - NPCM845
|
||||
- ``TIP reset`` (``INTCR2[25]``)
|
||||
- ``WDIOF_POWEROVER``
|
||||
- TIP reset
|
||||
|
||||
``WDIOF_CARDRESET`` is reported only for the watchdog instance whose own
|
||||
reset-status bit is latched. On systems with three watchdog instances, this
|
||||
maps ``WD0RST``, ``WD1RST``, and ``WD2RST`` to ``watchdog0``, ``watchdog1``,
|
||||
and ``watchdog2`` respectively.
|
||||
|
||||
The driver may report ``WDIOF_CARDRESET`` together with one or more of the
|
||||
reset-cause flags listed above.
|
||||
|
||||
On NPCM750, the driver samples ``RESSR``. When reset bits are still latched,
|
||||
it clears them and stores the sampled value in ``SCRPAD2`` so later watchdog
|
||||
probes can report the same boot-time state.
|
||||
|
||||
On NPCM845, the driver samples ``INTCR2``. When reset bits are still latched,
|
||||
it clears them and stores the sampled value in ``SCRPAD10`` so later watchdog
|
||||
probes can report the same boot-time state.
|
||||
|
||||
The WPCM450 watchdog continues to operate without this reset-indication
|
||||
mapping.
|
||||
Reference in New Issue
Block a user