xref: /freebsd/share/man/man4/iic_gpiomux.4 (revision 422d05da14fe063e5d187d81a328fa7b362d069f)
1*422d05daSIan Lepore.\"-
2*422d05daSIan Lepore.\" SPDX-License-Identifier: BSD-2-Clause
3*422d05daSIan Lepore.\"
4*422d05daSIan Lepore.\" Copyright (c) 2019 Ian Lepore <ian@freebsd.org>
5*422d05daSIan Lepore.\"
6*422d05daSIan Lepore.\" Redistribution and use in source and binary forms, with or without
7*422d05daSIan Lepore.\" modification, are permitted provided that the following conditions
8*422d05daSIan Lepore.\" are met:
9*422d05daSIan Lepore.\" 1. Redistributions of source code must retain the above copyright
10*422d05daSIan Lepore.\"    notice, this list of conditions and the following disclaimer.
11*422d05daSIan Lepore.\" 2. Redistributions in binary form must reproduce the above copyright
12*422d05daSIan Lepore.\"    notice, this list of conditions and the following disclaimer in the
13*422d05daSIan Lepore.\"    documentation and/or other materials provided with the distribution.
14*422d05daSIan Lepore.\"
15*422d05daSIan Lepore.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16*422d05daSIan Lepore.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*422d05daSIan Lepore.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*422d05daSIan Lepore.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19*422d05daSIan Lepore.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*422d05daSIan Lepore.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*422d05daSIan Lepore.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*422d05daSIan Lepore.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*422d05daSIan Lepore.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*422d05daSIan Lepore.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*422d05daSIan Lepore.\" SUCH DAMAGE.
26*422d05daSIan Lepore.\"
27*422d05daSIan Lepore.\" $FreeBSD$
28*422d05daSIan Lepore.\"
29*422d05daSIan Lepore.Dd January 1, 2020
30*422d05daSIan Lepore.Dt IIC_GPIOMUX 4
31*422d05daSIan Lepore.Os
32*422d05daSIan Lepore.Sh NAME
33*422d05daSIan Lepore.Nm iic_gpiomux
34*422d05daSIan Lepore.Nd driver for I2C mux hardware controlled via GPIO
35*422d05daSIan Lepore.Sh SYNOPSIS
36*422d05daSIan LeporeTo compile this driver into the kernel,
37*422d05daSIan Leporeplace the following line in your
38*422d05daSIan Leporekernel configuration file:
39*422d05daSIan Lepore.Bd -ragged -offset indent
40*422d05daSIan Lepore.Cd "device iic_gpiomux"
41*422d05daSIan Lepore.Ed
42*422d05daSIan Lepore.Pp
43*422d05daSIan LeporeAlternatively, to load the driver as a
44*422d05daSIan Leporemodule at boot time, place the following line in
45*422d05daSIan Lepore.Xr loader.conf 5 :
46*422d05daSIan Lepore.Bd -literal -offset indent
47*422d05daSIan Leporeiic_gpiomux_load="YES"
48*422d05daSIan Lepore.Ed
49*422d05daSIan Lepore.Sh DESCRIPTION
50*422d05daSIan LeporeThe
51*422d05daSIan Lepore.Nm
52*422d05daSIan Leporedriver supports any type of I2C bus multiplexer (mux) hardware that
53*422d05daSIan Leporeis controlled by manipulating the state of one or more GPIO pins.
54*422d05daSIan LeporeIt automatically connects an upstream I2C bus to one of the downstream
55*422d05daSIan Leporebuses as needed when slave devices on the downstream buses initiate I/O.
56*422d05daSIan LeporeMore information on the automatic switching behavior is available in
57*422d05daSIan Lepore.Xr iicmux 4 .
58*422d05daSIan Lepore.Pp
59*422d05daSIan Lepore.Sh FDT CONFIGURATION
60*422d05daSIan LeporeOn an
61*422d05daSIan Lepore.Xr fdt 4
62*422d05daSIan Leporebased system, an
63*422d05daSIan Lepore.Nm
64*422d05daSIan Leporedevice node may be defined as a child node of any arbitrary bus
65*422d05daSIan Leporein the FDT data.
66*422d05daSIan LeporeThe
67*422d05daSIan Lepore.Va i2c-parent
68*422d05daSIan Leporeproperty indicates the connection to the upstream I2C bus.
69*422d05daSIan LeporeThe children of the
70*422d05daSIan Lepore.Nm
71*422d05daSIan Leporenode are additional i2c buses, which will have their own i2c slave
72*422d05daSIan Leporedevices described in their child nodes.
73*422d05daSIan Lepore.Pp
74*422d05daSIan LeporeThe
75*422d05daSIan Lepore.Nm
76*422d05daSIan Leporedriver conforms to the standard
77*422d05daSIan Lepore.Bk -words
78*422d05daSIan Lepore.Li i2c/i2c-mux-gpio.txt
79*422d05daSIan Lepore.Ek
80*422d05daSIan Leporebindings document.
81*422d05daSIan Lepore.Sh SEE ALSO
82*422d05daSIan Lepore.Xr iicbus 4 ,
83*422d05daSIan Lepore.Xr iicmux 4 ,
84*422d05daSIan Lepore.Sh HISTORY
85*422d05daSIan LeporeThe
86*422d05daSIan Lepore.Nm
87*422d05daSIan Leporedriver first appeared in
88*422d05daSIan Lepore.Fx 13.0 .
89