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