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