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