xref: /openbsd-src/share/man/man4/iic.4 (revision 25c4e8bd056e974b28f4a0ffd39d76c190a56013)
1.\"	$OpenBSD: iic.4,v 1.125 2022/07/17 07:08:03 jsg Exp $
2.\"
3.\" Copyright (c) 2004, 2006 Alexander Yurchenko <grange@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: July 17 2022 $
18.Dt IIC 4
19.Os
20.Sh NAME
21.Nm iic
22.Nd Inter IC (I2C) bus
23.Sh SYNOPSIS
24.Cd "iic* at kiic?                  # macppc"
25.Cd "iic* at piic?                  # macppc"
26.Cd "iic* at smu?                   # macppc"
27.Cd "iic* at alipm?                 # alpha i386 sparc64 "
28.Cd "iic* at amdiic?                # amd64 i386"
29.Cd "iic* at amdpm?                 # i386"
30.Cd "iic* at glxpcib?               # i386"
31.Cd "iic* at gscsio?                # i386"
32.Cd "iic* at ichiic?                # amd64 i386"
33.Cd "iic* at iicmux?                # arm64"
34.Cd "iic* at nviic?                 # amd64 i386"
35.Cd "iic* at pcamux?                # arm64"
36.Cd "iic* at pcfiic?                # sparc64"
37.Cd "iic* at piixpm?                # amd64 i386"
38.Cd "iic* at viapm?                 # amd64 i386"
39.Cd "iic* at gpioiic?               # i386"
40.Cd "iic* at gdiumiic?              # loongson"
41.Cd "iic* at tsciic?                # alpha"
42.Cd "iic* at amliic?                # arm64"
43.Cd "iic* at apliic?                # arm64"
44.Cd "iic* at bcmbsc?                # arm64 armv7"
45.Cd "iic* at dwiic?                 # amd64 arm64"
46.Cd "iic* at octiic?                # octeon"
47.Cd "iic* at imxiic?                # arm64 armv7"
48.Cd "iic* at mviic?                 # arm64"
49.Cd "iic* at rkiic?                 # arm64 armv7"
50.Cd "iic* at sxitwi?                # arm64 armv7"
51.Cd "iic* at mpfiic?                # riscv64"
52.Cd "iic* at ociic?                 # riscv64"
53.Sh DESCRIPTION
54.Tn I2C
55is a two-wire bus developed by Philips used for connecting
56integrated circuits.
57It is commonly used for connecting devices such as EEPROMs,
58temperature sensors, fan controllers, real-time clocks, tuners,
59and other types of integrated circuits.
60.Pp
61The
62.Nm
63driver provides a uniform programming interface layer between
64.Tn I2C
65master controllers and various
66.Tn I2C
67slave devices.
68Each
69.Tn I2C
70master controller attaches an
71.Nm
72framework; several slave devices can then be attached to the
73.Nm
74bus.
75.Pp
76All
77.Tn I2C
78slave devices are uniquely identified by the address on the bus.
79The master accesses a particular slave device using its address.
80Devices are found on the bus using a sophisticated scanning routine
81which attempts to identify commonly available devices.
82On other machines (such as sparc64 and macppc) where the machine ROM
83supplies a list of I2C devices, that list is used instead.
84.Pp
85System Management Bus (SMBus) protocol is also supported by emulating
86it with the
87.Tn I2C
88commands.
89.Sh SUPPORTED MASTERS
90.Bl -tag -width 13n -compact
91.It Xr alipm 4
92Acer Labs M7101 SMBus controller
93.It Xr amdiic 4
94AMD-8111 SMBus controller
95.It Xr amdpm 4
96AMD-756/766/768/8111 Power Management and SMBus controller
97.It Xr amliic 4
98Amlogic I2C controller
99.It Xr apliic 4
100Apple I2C controller
101.It Xr bcmbsc 4
102Broadcom Serial Control controller
103.It Xr dwiic 4
104Synopsys DesignWare I2C controller
105.It Xr glxpcib 4
106AMD CS5536 PCI-ISA bridge with timecounter, watchdog timer, and GPIO
107.It Xr gpioiic 4
108GPIO I2C controller
109.It Xr gscsio 4
110National Semiconductor Geode SC1100 I2C controller
111.It Xr ichiic 4
112Intel ICH SMBus controller
113.It Xr imxiic 4
114Freescale i.MX I2C controller
115.It Xr kiic 4
116Apple Kauai I2C controller
117.It Xr mpfiic 4
118Microchip PolarFire SoC MSS I2C controller
119.It Xr mviic 4
120Marvell Armada 3700 onboard I2C controller
121.It Xr nviic 4
122NVIDIA nForce2/3/4 SMBus controller
123.It Xr ociic 4
124OpenCores I2C controller
125.It Xr octiic 4
126OCTEON two-wire serial interface
127.It Xr pcfiic 4
128Philips PCF8584 I2C controller
129.It Xr piic 4
130Apple via-pmu I2C controller
131.It Xr piixpm 4
132Intel PIIX SMBus controller
133.It Xr rkiic 4
134Rockchip I2C controller
135.It Xr smu 4
136Apple System Management Unit
137.It Xr sxitwi 4
138Allwinner Two Wire Interface controller
139.It Xr tsciic 4
140DECchip 21272 and 21274 Core Logic chipset I2C controller
141.It Xr viapm 4
142VIA SMBus controller
143.El
144.Sh SUPPORTED SLAVES
145.Bl -tag -width 13n -compact
146.It Xr abcrtc 4
147Abracon AB1805 real-time clock
148.It Xr adc 4
149Analog Devices AD7416/AD7417/7418 temperature sensor
150.It Xr adl 4
151Andigilog aSC7621 temperature, voltage, and fan sensor
152.It Xr admcts 4
153Analog Devices ADM1026 temperature and voltage sensor
154.It Xr admlc 4
155Analog Devices ADM1024 temperature and voltage sensor
156.It Xr admtemp 4
157Analog Devices ADM1021 temperature sensor
158.It Xr admtm 4
159Analog Devices ADM1025 temperature and voltage sensor
160.It Xr admtmp 4
161Analog Devices ADM1030 temperature sensor
162.It Xr admtt 4
163Analog Devices ADM1031 temperature sensor
164.It Xr adt 4
165Analog Devices ADT7460 temperature, voltage, and fan sensor
166.It Xr adtfsm 4
167Analog Devices ADT7462 temperature, voltage, and fan sensor
168.It Xr andl 4
169Andigilog aSC7611 temperature, voltage, and fan sensor
170.It Xr asbtm 4
171Asus ASB 100 temperature sensor
172.It Xr asms 4
173Apple sudden motion sensor
174.It Xr axppmic 4
175X-Powers AXP Power Management IC
176.It Xr bdpmic 4
177ROHM BD718x7 Power Management IC
178.It Xr bgw 4
179Bosch motion sensor
180.It Xr ccpmic 4
181Intel Crystal Cove Power Management IC
182.It Xr cwfg 4
183CellWise CW201x fuel gauge
184.It Xr dapmic 4
185Dialog DA9063 Power Management IC
186.It Xr dsxrtc 4
187Maxim DS3231/DS3232 real-time clock
188.It Xr ecadc 4
189environmental monitoring subsystem temperature sensor
190.It Xr escodec 4
191Everest Semiconductor ES8316 audio codec
192.It Xr fanpwr 4
193Fairchild FAN53555 voltage regulator
194.It Xr fcu 4
195Apple Fan Control Unit sensor device
196.It Xr fintek 4
197Fintek F75375 temperature sensor
198.It Xr fusbtc 4
199Fairchild FUSB302 USB Type-C Port controller
200.It Xr glenv 4
201Genesys Logic GL518SM temperature, voltage, and fan sensor
202.It Xr iatp 4
203Atmel maXTouch touchpad and touchscreen
204.It Xr ihidev 4
205HID over I2C support
206.It Xr islrtc 4
207Intersil ISL1208/1218 real-time clock
208.It Xr lisa 4
209STMicroelectronics LIS331DL MEMS motion sensor
210.It Xr lm 4
211National Semiconductor LM78/79/81 temperature, voltage, and fan sensor
212.It Xr lmenv 4
213National Semiconductor LM87 temperature, voltage, and fan sensor
214.It Xr lmn 4
215National Semiconductor LM93 temperature, voltage, and fan sensor
216.It Xr lmtemp 4
217National Semiconductor LM75/LM76/LM77 temperature sensor
218.It Xr maxds 4
219Maxim DS1624/DS1631/DS1721 temperature sensor
220.It Xr maxrtc 4
221Maxim DS1307 real-time clock
222.It Xr maxtmp 4
223Maxim MAX6642/MAX6690 temperature sensor
224.It Xr mcprtc 4
225Microchip MCP79400 real-time clock
226.It Xr mfokrtc 4
227M41T8x real-time clock
228.It Xr nvt 4
229Nuvoton W83795G/ADG temperature, voltage, and fan sensor
230.It Xr pcagpio 4
231Philips PCA955[4567] GPIO controller
232.It Xr pcaled 4
233Philips PCA9532/9552 GPIO LED dimmer
234.It Xr pcamux 4
235Philips PCA954[678] I2C switch/mux
236.It Xr pcfadc 4
237Philips PCF8591 temperature sensor
238.It Xr pcfrtc 4
239NXP PCF8523 real-time clock
240.It Xr pcxrtc 4
241NXP PCF8563 real-time clock
242.It Xr pcyrtc 4
243NXP PCF85063A/TP real-time clock
244.It Xr ricohrtc 4
245Ricoh RS5C372 real-time clock
246.It Xr rkpmic 4
247Rockchip RK8xx Power Management IC
248.It Xr sdtemp 4
249SO-DIMM (JC-42.4) temperature sensor
250.It Xr spdmem 4
251Serial Presence Detect memory
252.It Xr ssdfb 4
253Solomon Systech SSD1306/SSD1309 OLED display module
254.It Xr stsec 4
255ST7 embedded controller
256.It Xr tcpci 4
257USB Type-C Port Controller Interface
258.It Xr tda 4
259Philips TDA8444 fan controller
260.It Xr thmc 4
261TI THMC50, Analog ADM1022/1028 temperature sensor
262.It Xr titmp 4
263TI TMP451 temperature sensor
264.It Xr tsl 4
265TAOS TSL2560/61 light sensor
266.It Xr wbenv 4
267Winbond W83L784R/W83L785R/W83L785TS-L temperature, voltage, and fan sensor
268.It Xr wbng 4
269Winbond W83793G temperature, voltage, and fan sensor
270.El
271.Sh SEE ALSO
272.Xr iicmux 4 ,
273.Xr intro 4 ,
274.Xr iic 9
275.Sh HISTORY
276The
277.Tn I2C
278framework first appeared in
279.Nx 2.0 .
280.Ox
281support was added in
282.Ox 3.6 .
283I2C bus scanning was added in
284.Ox 3.9 .
285.Sh AUTHORS
286The
287.Tn I2C
288framework was written by
289Steve C. Woodford and Jason R. Thorpe for
290.Nx
291and then ported to
292.Ox
293by
294.An Alexander Yurchenko Aq Mt grange@openbsd.org .
295