2 .\" Copyright (c) 2015 Ian Lepore <ian@freebsd.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
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.
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.
33 .Nd RFC 2783 Pulse Per Second API driver for AM335x systems
35 .Cd "device am335x_dmtpps"
38 .Pa /boot/loader.conf :
39 .Cd hw.am335x_dmtpps.input="pin name"
44 device driver provides a system time counter that includes precise
45 capture of Pulse Per Second (PPS) signals emitted by GPS receivers
46 and other timing devices.
49 driver may be compiled into the kernel or loaded as a module.
51 The AM335x timer hardware captures the value of the system time counter
52 on the leading edge of the PPS pulse.
53 Because the capture is done by the hardware there is no interrupt
54 latency in the measurement.
55 The time counter runs at 24Mhz, providing a measurement resolution
58 To use the PPS timing information provided by this driver with
68 to configure a type 22 (ATOM) refclock.
70 .Sh DRIVER CONFIGURATION
71 The AM335x hardware provides four timer devices with a capture input
72 pin, DMTimer4 through DMTimer7.
73 Because it also provides the active system time counter,
74 only one instance of the
76 driver can be active at a time.
77 The driver uses system pin configuration to determine which hardware
79 Configure the timer input pin in the system's FDT data, or by
80 supplying the pin name using a tunable variable in
83 To use a standard kernel and FDT data, use
88 .Va hw.am335x_dmtpps.input
89 tunable variable to the name of the input pin, one of the following:
91 .Bl -tag -width "GPMC_ADVn_ALE MMMM" -offset MMMM -compact
95 DMTimer4; Beaglebone P8 header pin 7.
97 DMTimer7; Beaglebone P8 header pin 8.
99 DMTimer5; Beaglebone P8 header pin 9.
101 DMTimer6; Beaglebone P8 header pin 10.
114 driver using FDT data, create a new pinctrl node by referencing the standard
116 driver node (which is defined in am33xx.dtsi) in your dts file.
120 timer4_pins: timer4_pins {
121 pinctrl-single,pins = <0x90 (PIN_INPUT | MUX_MODE2)>;
126 Add pinctrl properties referencing
130 device node (also defined in am33xx.dtsi) by referencing it in
131 your dts file as follows:
134 pinctrl-names = "default";
135 pinctrl-0 = <&timer4_pins>;
140 .Bl -tag -width ".Pa /dev/dmtpps" -compact
144 access to the RFC 2783 API.
156 device driver first appeared in
162 device driver and this manual page were written by
163 .An Ian Lepore Aq Mt ian@FreeBSD.org .