1.\" $NetBSD: iic.4,v 1.4 2010/02/06 20:11:33 pgoyette 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 February 6, 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.Sh DESCRIPTION 53.Tn I2C 54is a two-wire bus developed by Philips used for connecting 55integrated circuits. 56It is commonly used for connecting devices such as EEPROMs, 57temperature sensors, fan controllers, real-time clocks, tuners, 58and other types of integrated circuits. 59.Pp 60The 61.Nm 62driver provides a uniform programming interface layer between 63.Tn I2C 64master controllers and various 65.Tn I2C 66slave devices. 67Each 68.Tn I2C 69master controller attaches an 70.Nm 71framework; several slave devices can then be attached to the 72.Nm 73bus. 74.Pp 75All 76.Tn I2C 77slave devices are uniquely identified by the address on the bus. 78The master accesses a particular slave device using its address. 79.\" Devices are found on the bus using a sophisticated scanning routine 80.\" which attempts to identify commonly available devices. 81.\" On other machines (such as sparc64 and macppc) where the machine ROM 82.\" supplies a list of I2C devices, that list is used instead. 83.Pp 84System Management Bus (SMBus) protocol is also supported by emulating 85it with the 86.Tn I2C 87commands. 88.Sh SUPPORTED MASTERS 89A wide list of I2C masters are supported, among them 90are: 91.\" 92.\" Generate the following list with these (t)csh commands: 93.\" cd .../src/sys/arch 94.\" 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 95.\" cat /tmp/x 96.\" 97.Bl -tag -width 18n -compact 98.It Xr alipm 4 99Acer Labs M7101 SMBus controller 100.It Xr acpismbus 4 101ACPI SMBus Control Method Interface 102.It Xr amdpm 4 103AMD768 Power Management Controller and AMD8111 System Management Controller 104.It Xr armadillo9iic 4 105.It Xr at91twi 4 106.It Xr ausmbus 4 107.It Xr cuda 4 108support for CUDA microcontrollers found in many Power Macintosh and 109and compatible computers 110.It Xr gpiic 4 111.It Xr gtiic 4 112.It Xr gxiic 4 113.It Xr ichsmb 4 114Intel ICH SMBus controller 115.It Xr iociic 4 116.It Xr iomdiic 4 117.It Xr iopiic 4 118.It Xr ki2c 4 119.It Xr nfsmb 4 120NVIDIA nForce 2/3/4 SMBus controller and SMBus driver 121.It Xr ociic 4 122.It Xr piixpm 4 123Intel PIIX and compatible Power Management controller 124.It Xr slugiic 4 125.It Xr viapcib 4 126.El 127.Sh SUPPORTED SLAVES 128A wide list of slaves are supported, among them: 129.\" 130.\" Create the following list with these commands: 131.\" cd .../src/sys/arch 132.\" 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 133.\" cat /tmp/x 134.\" 135.Bl -tag -width 13n -compact 136.It Xr dbcool 4 137dbCool(tm) family of environmental monitors and fan controllers 138.It Xr rs5c372rtc 4 139RICOH RS5C372A and RS5C372B real-time clock 140.It Xr sgsmix 4 141driver for SGS 7433 Basic Audio Processor found in some Apple machines 142.It Xr spdmem 4 143Generic Memory Module Serial Presence Detect 144.El 145.Sh SEE ALSO 146.Xr intro 4 , 147.Xr iic 9 148.Sh HISTORY 149The 150.Tn I2C 151framework first appeared in 152.Nx 2.0 . 153.Ox 154support was added in 155.Ox 3.6 . 156This manpage first appeared in 157.Nx 6.0 , 158it was ported from 159.Ox . 160.Sh AUTHORS 161.An -nosplit 162The 163.Tn I2C 164framework was written by 165.An Steve C. Woodford 166and 167.An Jason R. Thorpe 168for 169.Nx 170and then ported to 171.Ox 172by 173.An Alexander Yurchenko Aq grange@openbsd.org . 174