xref: /freebsd/share/man/man4/iic_gpiomux.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1422d05daSIan Lepore.\"-
2422d05daSIan Lepore.\" SPDX-License-Identifier: BSD-2-Clause
3422d05daSIan Lepore.\"
4422d05daSIan Lepore.\" Copyright (c) 2019 Ian Lepore <ian@freebsd.org>
5422d05daSIan Lepore.\"
6422d05daSIan Lepore.\" Redistribution and use in source and binary forms, with or without
7422d05daSIan Lepore.\" modification, are permitted provided that the following conditions
8422d05daSIan Lepore.\" are met:
9422d05daSIan Lepore.\" 1. Redistributions of source code must retain the above copyright
10422d05daSIan Lepore.\"    notice, this list of conditions and the following disclaimer.
11422d05daSIan Lepore.\" 2. Redistributions in binary form must reproduce the above copyright
12422d05daSIan Lepore.\"    notice, this list of conditions and the following disclaimer in the
13422d05daSIan Lepore.\"    documentation and/or other materials provided with the distribution.
14422d05daSIan Lepore.\"
15422d05daSIan Lepore.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16422d05daSIan Lepore.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17422d05daSIan Lepore.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18422d05daSIan Lepore.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19422d05daSIan Lepore.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20422d05daSIan Lepore.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21422d05daSIan Lepore.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22422d05daSIan Lepore.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23422d05daSIan Lepore.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24422d05daSIan Lepore.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25422d05daSIan Lepore.\" SUCH DAMAGE.
26422d05daSIan Lepore.\"
27422d05daSIan Lepore.Dd January 1, 2020
28422d05daSIan Lepore.Dt IIC_GPIOMUX 4
29422d05daSIan Lepore.Os
30422d05daSIan Lepore.Sh NAME
31422d05daSIan Lepore.Nm iic_gpiomux
32422d05daSIan Lepore.Nd driver for I2C mux hardware controlled via GPIO
33422d05daSIan Lepore.Sh SYNOPSIS
34422d05daSIan LeporeTo compile this driver into the kernel,
35422d05daSIan Leporeplace the following line in your
36422d05daSIan Leporekernel configuration file:
37422d05daSIan Lepore.Bd -ragged -offset indent
38422d05daSIan Lepore.Cd "device iic_gpiomux"
39422d05daSIan Lepore.Ed
40422d05daSIan Lepore.Pp
41422d05daSIan LeporeAlternatively, to load the driver as a
42422d05daSIan Leporemodule at boot time, place the following line in
43422d05daSIan Lepore.Xr loader.conf 5 :
44422d05daSIan Lepore.Bd -literal -offset indent
45422d05daSIan Leporeiic_gpiomux_load="YES"
46422d05daSIan Lepore.Ed
47422d05daSIan Lepore.Sh DESCRIPTION
48422d05daSIan LeporeThe
49422d05daSIan Lepore.Nm
50422d05daSIan Leporedriver supports any type of I2C bus multiplexer (mux) hardware that
51422d05daSIan Leporeis controlled by manipulating the state of one or more GPIO pins.
52422d05daSIan LeporeIt automatically connects an upstream I2C bus to one of the downstream
53422d05daSIan Leporebuses as needed when slave devices on the downstream buses initiate I/O.
54422d05daSIan LeporeMore information on the automatic switching behavior is available in
55422d05daSIan Lepore.Xr iicmux 4 .
56422d05daSIan Lepore.Sh FDT CONFIGURATION
57422d05daSIan LeporeOn an
58422d05daSIan Lepore.Xr fdt 4
59422d05daSIan Leporebased system, an
60422d05daSIan Lepore.Nm
61422d05daSIan Leporedevice node may be defined as a child node of any arbitrary bus
62422d05daSIan Leporein the FDT data.
63422d05daSIan LeporeThe
64422d05daSIan Lepore.Va i2c-parent
65422d05daSIan Leporeproperty indicates the connection to the upstream I2C bus.
66422d05daSIan LeporeThe children of the
67422d05daSIan Lepore.Nm
68422d05daSIan Leporenode are additional i2c buses, which will have their own i2c slave
69422d05daSIan Leporedevices described in their child nodes.
70422d05daSIan Lepore.Pp
71422d05daSIan LeporeThe
72422d05daSIan Lepore.Nm
73422d05daSIan Leporedriver conforms to the standard
74422d05daSIan Lepore.Bk -words
75422d05daSIan Lepore.Li i2c/i2c-mux-gpio.txt
76422d05daSIan Lepore.Ek
77422d05daSIan Leporebindings document.
78422d05daSIan Lepore.Sh SEE ALSO
79422d05daSIan Lepore.Xr iicbus 4 ,
80*16ee5cd1SChristian Brueffer.Xr iicmux 4
81422d05daSIan Lepore.Sh HISTORY
82422d05daSIan LeporeThe
83422d05daSIan Lepore.Nm
84422d05daSIan Leporedriver first appeared in
85422d05daSIan Lepore.Fx 13.0 .
86