]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - share/man/man4/gpioiic.4
MFC r258044, r258679, r263990
[FreeBSD/stable/10.git] / share / man / man4 / gpioiic.4
1 .\" Copyright (c) 2013, Luiz Otavio O Souza <loos@FreeBSD.org>
2 .\" All rights reserved.
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. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd November 5, 2013
28 .Dt GPIOIIC 4
29 .Os
30 .Sh NAME
31 .Nm gpioiic
32 .Nd GPIO I2C bit-banging device driver
33 .Sh SYNOPSIS
34 .Cd "device gpio"
35 .Cd "device gpioiic"
36 .Cd "device iic"
37 .Cd "device iicbb"
38 .Cd "device iicbus"
39 .Sh DESCRIPTION
40 The
41 .Em gpioiic
42 driver provides an IIC bit-banging interface using two GPIO pins for the
43 SCL and SDA on the
44 .Em gpiobus .
45 .Nm
46 implements an open colector kind of output, as recommended by the standard,
47 when driving the pins on the
48 .Em gpiobus ,
49 i.e, they are never switched to the logical value of '1',
50 or they are '0' or simply open (Hi-Z/tri-state).
51 So the pullup resistors are required so
52 .Nm
53 can work.
54 .Pp
55 On a hint based system, like
56 .Li MIPS , these values are configureable for the
57 .Nm gpioiic :
58 .Bl -tag -width ".Va hint.gpioiic.%d.atXXX"
59 .It Va hint.gpioiic.%d.at
60 The gpiobus you are attaching to.
61 Normally just gpiobus0.
62 .It Va hint.gpioiic.%d.pins
63 This is a bitmask of the pins on the
64 .Em gpiobus
65 that are to be used for SCLOCK and SDATA from the GPIO IIC
66 bit-banging bus.
67 To configure pin 0 and 7, use the bitmask of
68 10000001 and convert it to a hexadecimal value of 0x0081.
69 Please note that this mask should only ever have two bits set
70 (any others bits - i.e., pins - will be ignored).
71 .It Va hint.gpioiic.%d.scl
72 Indicates which bit in the
73 .Va hint.gpioiic.%d.pins
74 should be used as the SCLOCK
75 source.
76 .It Va hint.gpioiic.%d.sda
77 Indicates which bit in the
78 .Va hint.gpioiic.%d.pins
79 should be used as the SDATA
80 source.
81 .El
82 .Sh SEE ALSO
83 .Xr gpio 4 ,
84 .Xr gpioled 4 ,
85 .Xr iic 4 ,
86 .Xr iicbb 4 ,
87 .Xr iicbus 4
88 .Sh HISTORY
89 The
90 .Nm
91 manual page first appeared in
92 .Fx 11.0 .
93 .Sh AUTHORS
94 This
95 manual page was written by
96 .An Luiz Otavio O Souza .