xref: /freebsd/share/man/man4/owc.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1.\"
2.\" Copyright (c) 2015 M. Warner Losh <imp@FreeBSD.org>
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. The name of the author may not be used to endorse or promote products
10.\"    derived from this software without specific prior written permission.
11.\"
12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22.\" SUCH DAMAGE.
23.\"
24.Dd June 26, 2019
25.Dt OWC 4
26.Os
27.Sh NAME
28.Nm owc
29.Nd Dallas Semiconductor 1-Wire Controller
30.Sh SYNOPSIS
31.Cd device owc
32.Sh DESCRIPTION
33The
34.Nm
35module implements Dallas Semiconductor 1-Wire signaling.
36It attaches the
37.Xr ow 4
38driver 1-Wire bus protocol.
39The
40.Nm
41device implements the Link Layer of the 1-Wire bus protocol stack.
42.Pp
43Bit banging a pin on a
44.Xr gpiobus 4
45is the only supported controller.
46Both standard and overdrive transfer timings are implemented.
47Strong pull-up functionality needed to support parasitic mode is not
48implemented.
49.Pp
50To enable 1-Wire for FDT systems requires modifying the DTS for your
51board to add something like:
52.Bd -literal
53/ {
54	...
55	onewire {
56		compatible = "w1-gpio";
57		gpios = <&gpio 4 1>;
58	};
59	...
60};
61.Ed
62.Pp
63The gpios property describes the GPIO pin the 1-Wire bus is connected
64to.
65For more details about the
66.Va gpios
67property, please consult
68.Pa /usr/src/sys/dts/bindings-gpio.txt .
69.Pp
70On a
71.Xr device.hints 5
72based system these values are required for the
73.Nm :
74.Bl -tag -width ".Va hint.owc.%d.atXXX"
75.It Va hint.owc.%d.at
76The
77.Nm gpiobus
78you are attaching to.
79.It Va hint.owc.%d.pins
80This is a bitmask that defines a pin on the
81.Nm gpiobus
82that is to be used for the 1-Wire bus.
83For instance, to configure pin 10, use the bitmask of 0x400.
84Please note that this mask should have only one bit set
85(any other bits - i.e., pins - will be ignored).
86.El
87.Sh SEE ALSO
88.Xr gpiobus 4 ,
89.Xr ow 4 ,
90.Xr ow_temp 4 ,
91.Xr owll 9 ,
92.Xr own 9
93.Sh LEGAL
94.Tn 1-Wire
95is a registered trademark of Maxim Integrated Products, Inc.
96.Sh HISTORY
97The
98.Nm
99driver first appeared in
100.Fx 11.0 .
101.Sh AUTHORS
102The
103.Nm
104device driver and this manual page were written by
105.An Warner Losh .
106.Sh CAVEATS
107The gpio driver implements timing by busy waiting, which can cause a
108high load on slower systems.
109.Sh BUGS
110Overdrive mode has not actually been tested.
111