Commit | Line | Data |
---|---|---|
ccf988b6 | 1 | ============= |
1da177e4 LT |
2 | I2C and SMBus |
3 | ============= | |
4 | ||
096c22f8 LC |
5 | I²C (pronounce: I squared C and written I2C in the kernel documentation) is |
6 | a protocol developed by Philips. It is a slow two-wire protocol (variable | |
7 | speed, up to 400 kHz), with a high speed extension (3.4 MHz). It provides | |
8 | an inexpensive bus for connecting many types of devices with infrequent or | |
9 | low bandwidth communications needs. I2C is widely used with embedded | |
10 | systems. Some systems use variants that don't meet branding requirements, | |
11 | and so are not advertised as being I2C but come under different names, | |
12 | e.g. TWI (Two Wire Interface), IIC. | |
13 | ||
14 | The official I2C specification is the `"I2C-bus specification and user | |
15 | manual" (UM10204) <https://www.nxp.com/docs/en/user-guide/UM10204.pdf>`_ | |
16 | published by NXP Semiconductors. | |
1da177e4 | 17 | |
4298cfc3 DB |
18 | SMBus (System Management Bus) is based on the I2C protocol, and is mostly |
19 | a subset of I2C protocols and signaling. Many I2C devices will work on an | |
20 | SMBus, but some SMBus protocols add semantics beyond what is required to | |
21 | achieve I2C branding. Modern PC mainboards rely on SMBus. The most common | |
22 | devices connected through SMBus are RAM modules configured using I2C EEPROMs, | |
23 | and hardware monitoring chips. | |
1da177e4 | 24 | |
4298cfc3 DB |
25 | Because the SMBus is mostly a subset of the generalized I2C bus, we can |
26 | use its protocols on many I2C systems. However, there are systems that don't | |
27 | meet both SMBus and I2C electrical constraints; and others which can't | |
28 | implement all the common SMBus protocol semantics or messages. | |
1da177e4 LT |
29 | |
30 | ||
31 | Terminology | |
32 | =========== | |
33 | ||
ccf988b6 MCC |
34 | When we talk about I2C, we use the following terms:: |
35 | ||
1da177e4 LT |
36 | Bus -> Algorithm |
37 | Adapter | |
38 | Device -> Driver | |
39 | Client | |
40 | ||
41 | An Algorithm driver contains general code that can be used for a whole class | |
45ccc6c5 JD |
42 | of I2C adapters. Each specific adapter driver either depends on one algorithm |
43 | driver, or includes its own implementation. | |
4298cfc3 | 44 | |
1da177e4 LT |
45 | A Driver driver (yes, this sounds ridiculous, sorry) contains the general |
46 | code to access some type of device. Each detected device gets its own | |
47 | data in the Client structure. Usually, Driver and Client are more closely | |
48 | integrated than Algorithm and Adapter. | |
49 | ||
45ccc6c5 JD |
50 | For a given configuration, you will need a driver for your I2C bus, and |
51 | drivers for your I2C devices (usually one driver for each device). |