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