1.\" $NetBSD: iic.4,v 1.5 2010/12/20 18:15:21 jruoho Exp $ 2.\" $OpenBSD: iic.4,v 1.74 2008/09/10 16:13:43 reyk Exp $ 3.\" 4.\" Copyright (c) 2004, 2006 Alexander Yurchenko <grange@openbsd.org> 5.\" Copyright (c) 2009 Hubert Feyrer <hubertf@NetBSD.org> 6.\" 7.\" Permission to use, copy, modify, and distribute this software for any 8.\" purpose with or without fee is hereby granted, provided that the above 9.\" copyright notice and this permission notice appear in all copies. 10.\" 11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18.\" 19.Dd December 20, 2010 20.Dt IIC 4 21.Os 22.Sh NAME 23.Nm iic 24.Nd Inter IC (I2C) bus 25.Sh SYNOPSIS 26.\" 27.\" Use the following commands in (t)csh to output the list below: 28.\" cd .../src/sys/arch 29.\" grep -h '^iic.*at' */conf/* | sort -u -k +3 | sed -e 's,[ ][ ]*, ,g' -e 's, *#.*,,' | sh -c 'while read iic at ic ; do printf ".Cd \"$iic $at %-20s # %s\"\n" "$ic" "`grep \"iic.*at.*$ic\" */conf/* | sed \"s,/.*,,\" | sort -u | tr \"\012\" \ `" ; done' | uniq | tee /tmp/x 30.\" cat /tmp/x 31.\" 32.Cd "iic* at alipm? # sparc64 " 33.Cd "iic* at acpismbus? # amd64 i386" 34.Cd "iic* at amdpm? # amd64 i386 " 35.Cd "iic* at armadillo9iic? # evbarm " 36.Cd "iic0 at at91twi? # evbarm " 37.Cd "iic0 at ausmbus0 # evbmips " 38.Cd "iic0 at cuda0 # macppc " 39.Cd "iic0 at gpiic? # evbppc " 40.Cd "iic* at gtiic? # evbppc " 41.Cd "iic* at gxiic? # evbarm " 42.Cd "iic* at ichsmb? # amd64 i386 " 43.Cd "iic0 at iociic0 # acorn26 " 44.Cd "iic0 at iomdiic? # acorn32 " 45.Cd "iic0 at iopiic? # evbarm iyonix " 46.Cd "iic* at ki2c? # macppc " 47.Cd "iic* at nfsmb? # amd64 i386 " 48.Cd "iic* at ociic? # sandpoint " 49.Cd "iic* at piixpm? # amd64 i386 " 50.Cd "iic0 at slugiic0 # evbarm " 51.Cd "iic* at viapcib? # i386 " 52.Pp 53.Cd "options I2C_SCAN" 54.Sh DESCRIPTION 55.Tn I2C 56is a two-wire bus developed by Philips used for connecting 57integrated circuits. 58It is commonly used for connecting devices such as EEPROMs, 59temperature sensors, fan controllers, real-time clocks, tuners, 60and other types of integrated circuits. 61.Pp 62The 63.Nm 64driver provides a uniform programming interface layer between 65.Tn I2C 66master controllers and various 67.Tn I2C 68slave devices. 69Each 70.Tn I2C 71master controller attaches an 72.Nm 73framework; several slave devices can then be attached to the 74.Nm 75bus. 76.Pp 77All 78.Tn I2C 79slave devices are uniquely identified by the address on the bus. 80The master accesses a particular slave device using its address. 81.\" Devices are found on the bus using a sophisticated scanning routine 82.\" which attempts to identify commonly available devices. 83.\" On other machines (such as sparc64 and macppc) where the machine ROM 84.\" supplies a list of I2C devices, that list is used instead. 85.Pp 86System Management Bus (SMBus) protocol is also supported by emulating 87it with the 88.Tn I2C 89commands. 90.Sh SUPPORTED MASTERS 91A wide list of I2C masters are supported, among them are: 92.Pp 93.\" 94.\" Generate the following list with these (t)csh commands: 95.\" cd .../src/sys/arch 96.\" grep -h '^iic.*at' */conf/* | awk '{print $3}' | sed 's,.$,,' | sort -u | sh -c 'while read i ; do echo .It Xr $i 4; n=`grep -h ^.Nd ../../share/man/man4/$i* | sed "s,^.Nd ,,"`; if [ -n "$n" ]; then echo $n ; else echo "" ; fi ; done' | tee /tmp/x 97.\" cat /tmp/x 98.\" 99.Bl -tag -width 18n -compact -offset indent 100.It Xr alipm 4 101Acer Labs M7101 SMBus controller 102.It Xr acpismbus 4 103ACPI SMBus Control Method Interface 104.It Xr amdpm 4 105AMD768 Power Management Controller and AMD8111 System Management Controller 106.It Xr armadillo9iic 4 107.It Xr at91twi 4 108.It Xr ausmbus 4 109.It Xr cuda 4 110support for CUDA microcontrollers found in many Power Macintosh and 111and compatible computers 112.It Xr gpiic 4 113.It Xr gtiic 4 114.It Xr gxiic 4 115.It Xr ichsmb 4 116Intel ICH SMBus controller 117.It Xr iociic 4 118.It Xr iomdiic 4 119.It Xr iopiic 4 120.It Xr ki2c 4 121.It Xr nfsmb 4 122NVIDIA nForce 2/3/4 SMBus controller and SMBus driver 123.It Xr ociic 4 124.It Xr piixpm 4 125Intel PIIX and compatible Power Management controller 126.It Xr slugiic 4 127.It Xr viapcib 4 128.El 129.Sh SUPPORTED SLAVES 130A wide list of slaves are supported, among them: 131.Pp 132.\" 133.\" Create the following list with these commands: 134.\" cd .../src/sys/arch 135.\" grep -h '.* at iic.*' */conf/* | sed -e 's,^#,,' -e 's, .*,,' -e 's,.$,,' | sort -u | sh -c 'while read i ; do echo .It Xr $i 4 ; n=`grep ^.Nd ../../share/man/man4/$i* | sed "s,^.Nd ,,"` ; if [ -n "$n" ]; then echo $n ; else echo "" ; fi ; done' | tee /tmp/x 136.\" cat /tmp/x 137.\" 138.Bl -tag -width 13n -compact -offset indent 139.It Xr dbcool 4 140dbCool(tm) family of environmental monitors and fan controllers 141.It Xr rs5c372rtc 4 142RICOH RS5C372A and RS5C372B real-time clock 143.It Xr sgsmix 4 144driver for SGS 7433 Basic Audio Processor found in some Apple machines 145.It Xr spdmem 4 146Generic Memory Module Serial Presence Detect 147.El 148.Sh SEE ALSO 149.Xr intro 4 , 150.Xr iic 9 151.Sh HISTORY 152The 153.Tn I2C 154framework first appeared in 155.Nx 2.0 . 156.Ox 157support was added in 158.Ox 3.6 . 159This manpage first appeared in 160.Nx 6.0 , 161it was ported from 162.Ox . 163.Sh AUTHORS 164.An -nosplit 165The 166.Tn I2C 167framework was written by 168.An Steve C. Woodford 169and 170.An Jason R. Thorpe 171for 172.Nx 173and then ported to 174.Ox 175by 176.An Alexander Yurchenko Aq grange@openbsd.org . 177