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