xref: /freebsd/share/man/man4/man4.arm/imx_wdog.4 (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1.\"
2.\" Copyright (c) 2018 Ian Lepore <ian@freebsd.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\"
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd July 7, 2018
27.Dt IMX_WDOG 4
28.Os
29.Sh NAME
30.Nm imx_wdog
31.Nd device driver for the NXP i.MX5 and i.MX6 watchdog timer
32.Sh SYNOPSIS
33To compile this driver into the kernel,
34place the following line in your
35kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device imxwdt"
38.Ed
39.Pp
40Alternatively, to load the driver as a
41module at boot time, place the following line in
42.Xr loader.conf 5 :
43.Bd -literal -offset indent
44imx_wdog_load="YES"
45.Ed
46.Sh DESCRIPTION
47The
48.Nm
49driver provides
50.Xr watchdog 4
51support for the watchdog timer present on NXP i.MX5 and i.MX6 processors.
52The i.MX watchdog hardware supports programmable timeouts ranging from
530.5 to 128 seconds, in half-second increments.
54Once activated, the watchdog hardware cannot be deactivated, but the
55timeout period can be changed to any valid non-zero value.
56.Pp
57At power-on, a special 16-second
58.Sq power-down timer
59mode is automatically enabled by the hardware.
60It will assert the external WDOG_B signal, which may be connected to
61external hardware that causes the system to reset or power-down.
62The power-down timer is often reset by the boot loader (typically U-Boot).
63If the power-down timer is still active at the time when the normal
64watchdog is first enabled, the
65.Nm
66driver automatically disables it.
67.Pp
68The
69.Nm
70driver supports the FDT
71.Va fsl,external-reset
72property by enabling the assertion of the WDOG_B external timeout signal
73when the property is present.
74When running this way, the need to reset the system due to watchdog
75timeout is signaled by driving the WDOG_B line low; some external
76entity is expected to assert the chip's POR pin in response.
77The
78.Nm
79driver attempts to backstop this external reset by scheduling an
80interrupt to occur as well.
81The interrupt handler waits 1 second for the external reset to occur,
82then it triggers a normal software reset.
83Note that the WDOG_B signal can be configured to use a variety of
84pins on the chip.
85For the
86.Va fsl,external-reset
87property to be effective, the signal must be connected to an appropriate
88pin by the system's FDT pinctrl data.
89.Pp
90The
91.Nm
92driver supports the FDT
93.Va timeout-secs
94property by enabling the watchdog as soon as the driver attaches,
95using the given timeout value.
96This extends watchdog protection to much of the system startup process,
97but it still requires that
98.Xr watchdogd 4
99be configured to service the watchdog.
100.Sh SEE ALSO
101.Xr fdt 4 ,
102.Xr watchdog 4 ,
103.Xr watchdog 8 ,
104.Xr watchdogd 8 ,
105.Xr watchdog 9
106.Sh HISTORY
107The
108.Nm
109driver first appeared in
110.Fx 10.0 .
111