1*9b4738cfSIan Lepore.\" 2*9b4738cfSIan Lepore.\" Copyright (c) 2018 Ian Lepore <ian@freebsd.org> 3*9b4738cfSIan Lepore.\" All rights reserved. 4*9b4738cfSIan Lepore.\" 5*9b4738cfSIan Lepore.\" Redistribution and use in source and binary forms, with or without 6*9b4738cfSIan Lepore.\" modification, are permitted provided that the following conditions 7*9b4738cfSIan Lepore.\" are met: 8*9b4738cfSIan Lepore.\" 9*9b4738cfSIan Lepore.\" 1. Redistributions of source code must retain the above copyright 10*9b4738cfSIan Lepore.\" notice, this list of conditions and the following disclaimer. 11*9b4738cfSIan Lepore.\" 2. Redistributions in binary form must reproduce the above copyright 12*9b4738cfSIan Lepore.\" notice, this list of conditions and the following disclaimer in the 13*9b4738cfSIan Lepore.\" documentation and/or other materials provided with the distribution. 14*9b4738cfSIan Lepore.\" 15*9b4738cfSIan Lepore.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16*9b4738cfSIan Lepore.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17*9b4738cfSIan Lepore.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18*9b4738cfSIan Lepore.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19*9b4738cfSIan Lepore.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20*9b4738cfSIan Lepore.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*9b4738cfSIan Lepore.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*9b4738cfSIan Lepore.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*9b4738cfSIan Lepore.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*9b4738cfSIan Lepore.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*9b4738cfSIan Lepore.\" 26*9b4738cfSIan Lepore.Dd July 8, 2018 27*9b4738cfSIan Lepore.Dt IMX6_SNVS 4 28*9b4738cfSIan Lepore.Os 29*9b4738cfSIan Lepore.Sh NAME 30*9b4738cfSIan Lepore.Nm imx6_snvs 31*9b4738cfSIan Lepore.Nd device driver for the NXP i.MX6 on-chip Realtime Clock 32*9b4738cfSIan Lepore.Sh SYNOPSIS 33*9b4738cfSIan LeporeTo compile this driver into the kernel, 34*9b4738cfSIan Leporeplace the following line in your 35*9b4738cfSIan Leporekernel configuration file: 36*9b4738cfSIan Lepore.Bd -ragged -offset indent 37*9b4738cfSIan Lepore.Cd "device imx6_snvs" 38*9b4738cfSIan Lepore.Ed 39*9b4738cfSIan Lepore.Pp 40*9b4738cfSIan LeporeAlternatively, to load the driver as a 41*9b4738cfSIan Leporemodule at boot time, place the following line in 42*9b4738cfSIan Lepore.Xr loader.conf 5 : 43*9b4738cfSIan Lepore.Bd -literal -offset indent 44*9b4738cfSIan Leporeimx6_snvs_load="YES" 45*9b4738cfSIan Lepore.Ed 46*9b4738cfSIan Lepore.Sh DESCRIPTION 47*9b4738cfSIan LeporeThe 48*9b4738cfSIan Lepore.Nm 49*9b4738cfSIan Leporedriver provides 50*9b4738cfSIan Leporesupport for the i.MX6 on-chip realtime clock. 51*9b4738cfSIan LeporeIt provides the time of day with a resolution of approximately 52*9b4738cfSIan Lepore30 microseconds. 53*9b4738cfSIan Lepore.Pp 54*9b4738cfSIan Lepore.Sq SNVS 55*9b4738cfSIan Leporestands for Secure Non-Volatile Storage, and refers to the subsystem 56*9b4738cfSIan Leporewithin the chip that (optionally) remains powered by a battery when 57*9b4738cfSIan Leporethe rest of the system is powered down. 58*9b4738cfSIan LeporeThe on-chip realtime clock is part of that subsystem. 59*9b4738cfSIan LeporeOther features of the SNVS subsystem are related to security, tamper 60*9b4738cfSIan Leporemonitoring, and power control; the 61*9b4738cfSIan Lepore.Nm 62*9b4738cfSIan Leporedriver does not currently support those features. 63*9b4738cfSIan Lepore.Pp 64*9b4738cfSIan LeporeMany i.MX6 systems do not use a battery to provide power to the SNVS 65*9b4738cfSIan Leporedue to its relatively high power draw. In such systems, this driver 66*9b4738cfSIan Leporeis able to provide a very accurate time following a reboot, but cannot 67*9b4738cfSIan Leporeprovide time at all if the power is cycled. If the system provides an 68*9b4738cfSIan Leporei2c or other type of alternate realtime clock with lower resolution, 69*9b4738cfSIan Leporethere is value in configuring both clock drivers. 70*9b4738cfSIan LeporeDoing so allows SNVS to provide accurate time after a reboot, while the 71*9b4738cfSIan Leporeexternal clock provides approximate time after power cycling. 72*9b4738cfSIan Lepore.Sh HISTORY 73*9b4738cfSIan LeporeThe 74*9b4738cfSIan Lepore.Nm 75*9b4738cfSIan Leporedriver first appeared in 76*9b4738cfSIan Lepore.Fx 12.0 . 77