================================== これは、 linux-2.6.13-rc7/Documentation/i2c/smbus-protocol の和訳(ドラフト) です。 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 更新日 : 2005/9/2 翻訳者 : Hiroshi.Suzuki < setter at reset dot jp > 校正者 : ================================== SMBus Protocol Summary SMBus プロトコル要約 ====================== The following is a summary of the SMBus protocol. It applies to all revisions of the protocol (1.0, 1.1, and 2.0). Certain protocol features which are not supported by this package are briefly described at the end of this document. これから述べるのは、SMBus の要約です。プロトコルのすべての改訂版 (1.0, 1.1, 2.0) に適用できます。このパッケージにサポートされない、いくつかの プロトコルの特徴は、この説明書の最後で簡潔に述べられています。 Some adapters understand only the SMBus (System Management Bus) protocol, which is a subset from the I2C protocol. Fortunately, many devices use only the same subset, which makes it possible to put them on an SMBus. If you write a driver for some I2C device, please try to use the SMBus commands if at all possible (if the device uses only that subset of the I2C protocol). This makes it possible to use the device driver on both SMBus adapters and I2C adapters (the SMBus command set is automatically translated to I2C on I2C adapters, but plain I2C commands can not be handled at all on most pure SMBus adapters). いくつかのアダプタは、SMBus プロトコル (I2C プロトコルからの一部分 (サブセット) ) だけを理解します。幸運にも、多くのデバイスは、同じ部分 (サブセット) を使うの で、ひとつの SMBus にそれらを接続できます。あるデバイスのドライバを作るなら、可 能なかぎり (デバイスが、I2C プロトコルの部分 (サブセット) だけを使うなら) 、 SMBus コマンドを使うようにしてください。これは、SMBus アダプタと、I2C アダプタ の両方でデバイスドライバが使えるようにします (SMBus コマンドセットは、I2C アダ プタ上の I2C コマンドセットに自動的に変換されますが、素の I2C コマンドは、ほと んどの純粋な SMBus アダプタが扱えません)。 Below is a list of SMBus commands. 次に示すのは、SMBus コマンドの一覧です。 Key to symbols シンボルの説明 ============== S (1 bit) : Start bit P (1 bit) : Stop bit Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. A, NA (1 bit) : Accept and reverse accept bit. Addr (7 bits): I2C 7 bit address. Note that this can be expanded as usual to get a 10 bit I2C address. Comm (8 bits): Command byte, a data byte which often selects a register on the device. Data (8 bits): A plain data byte. Sometimes, I write DataLow, DataHigh for 16 bit data. Count (8 bits): A data byte containing the length of a block operation. [..]: Data sent by I2C device, as opposed to data sent by the host adapter. S (1 ビット) : 開始ビット P (1 ビット) : 終了ビット Rd/Wr (1 ビット) : 読み込み/書き込みビット。Rd = 1, Wr = 0 A, NA (1 ビット) : 受理と、非受理 ビット。 Addr (7 ビット) : I2C 7ビットアドレス。 注) 通常、10ビットの I2C アドレスを得るために拡張できます。 Comm (8 ビット) : コマンドバイト。多くの場合、デバイス上のレジスタを選択するデータバイト。 Data (8 ビット) : データ専用バイト。私は時々、16ビットデータ用に、DataLow, DataHigh を書き込みます。 Count (8 ビット) : ブロック処理の長さを含むデータバイト。 [..]: I2C デバイスが送信したデータ。ホストアダプタで送られたデータに対する応答です。 SMBus Write Quick SMBus 即時書き込み ================= This sends a single bit to the device, at the place of the Rd/Wr bit. There is no equivalent Read Quick command. デバイスにひとつのビット (Rd/Wr ビットの位置で) を送ります。 即時読み込みコマンドと同等のものはありません。 A Addr Rd/Wr [A] P SMBus Read Byte SMBus バイト読み込み =============== This reads a single byte from a device, without specifying a device register. Some devices are so simple that this interface is enough; for others, it is a shorthand if you want to read the same register as in the previous SMBus command. デバイスレジスタを指定しないで、デバイスから1バイト読み込みます。いくつかのデバ イスは、とても単純なので、このインタフェースで十分です。それ以外では、以前の SMBus コマンドでのレジスタと同じものを読み込みたいなら、省略表記できます。 S Addr Rd [A] [Data] NA P SMBus Write Byte SMBus バイト書き込み ================ This is the reverse of Read Byte: it sends a single byte to a device. See Read Byte for more information. これは、バイト読み込みの逆で、1バイトをデバイスに送ります。 詳細は、バイト読み込みをみてください。 S Addr Wr [A] Data [A] P SMBus Read Byte Data SMBus バイトデータ読み込み ==================== This reads a single byte from a device, from a designated register. The register is specified through the Comm byte. デバイスの指定したレジスタから1バイト読み込みます。 レジスタは、Comm バイトで指定します。 S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P SMBus Read Word Data SMBus ワードデータ読み込み ==================== This command is very like Read Byte Data; again, data is read from a device, from a designated register that is specified through the Comm byte. But this time, the data is a complete word (16 bits). このコマンドは、バイトデータ読み込みと良く似ています; 再び述べることになります が、Comm バイトで指定されたレジスタから、データを読み込みます。 しかし、このときのデータは、完全なワード (16ビット) です。 S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P SMBus Write Byte Data SMBus バイトデータ書き込み ===================== This writes a single byte to a device, to a designated register. The register is specified through the Comm byte. This is the opposite of the Read Byte Data command. デバイスの指定したレジスタに1バイト書き込みます。レジスタは、Comm バイトで指定 します。バイトデータ読み込みコマンドの反対の動作をします。 S Addr Wr [A] Comm [A] Data [A] P SMBus Write Word Data SMBus ワードデータ書き込み ===================== This is the opposite operation of the Read Word Data command. 16 bits of data is read from a device, from a designated register that is specified through the Comm byte. ワードデータ読み込みコマンドと反対の処理をします。 Comm バイトで指定されたレジスタから、16ビットデータを読み込みます。 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P SMBus Process Call SMBus 処理呼び出し ================== This command selects a device register (through the Comm byte), sends 16 bits of data to it, and reads 16 bits of data in return. このコマンドは、デバイスレジスタの選択 (Comm バイトによる)、デバイスレジスタへ 16ビットデータの送信を行い、また、応答内の 16ビットデータを読み込みます。 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P SMBus Block Read SMBus ブロック読み込み ================ This command reads a block of up to 32 bytes from a device, from a designated register that is specified through the Comm byte. The amount of data is specified by the device in the Count byte. デバイスの Comm バイトで指定されたレジスタからから、最大 32バイトのブロックを読 み込みます。データ量は、Count バイトにより、デバイスで指定されます。 S Addr Wr [A] Comm [A] S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P SMBus Block Write SMBus ブロック書き込み ================= The opposite of the Block Read command, this writes up to 32 bytes to a device, to a designated register that is specified through the Comm byte. The amount of data is specified in the Count byte. ブロック読み込みと逆の動作をし、Comm バイトで指定したレジスタへ最大 32バイトを 書き込みます。データ量は、Count バイトで指定します。 S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P SMBus Block Process Call SMBus ブロック処理呼び出し ======================== SMBus Block Process Call was introduced in Revision 2.0 of the specification. SMBus ブロック処理呼び出しは、改訂版 2.0 の仕様で導入されました。 This command selects a device register (through the Comm byte), sends 1 to 31 bytes of data to it, and reads 1 to 31 bytes of data in return. コマンドは、デバイスレジスタを選択 (Comm バイトにより) し、そこへ、1から 31バイ トのデータを送り、また、応答から、1から 31バイトを読み込みます。 S Addr Wr [A] Comm [A] Count [A] Data [A] ... S Addr Rd [A] [Count] A [Data] ... A P SMBus Host Notify SMBus ホスト通知 ================= This command is sent from a SMBus device acting as a master to the SMBus host acting as a slave. It is the same form as Write Word, with the command code replaced by the alerting device's address. このコマンドは、マスタ動作する SMBus デバイスから、スレーブ動作する SMBus ホス トに送られます。ワード書き込みコマンドの応答と同じ物です。 なお、コマンドコードは、警告を出すデバイスのアドレスで置き換えられます。 [S] [HostAddr] [Wr] A [DevAddr] A [DataLow] A [DataHigh] A [P] Packet Error Checking (PEC) パケットエラー検査 (PEC) =========================== Packet Error Checking was introduced in Revision 1.1 of the specification. パケットエラー検査は、改訂版 1.1 の仕様で導入されました。 PEC adds a CRC-8 error-checking byte to all transfers. PEC は、すべての転送に、CRC-8 エラー検査バイトを追加します。 Address Resolution Protocol (ARP) アドレス解決プロトコル (ARP) ================================= The Address Resolution Protocol was introduced in Revision 2.0 of the specification. It is a higher-layer protocol which uses the messages above. アドレス解決プロトコルは、改訂版 2.0 の仕様で導入されました。 これは、上述のメッセージで使われる、さらに高階層なプロトコルです。 ARP adds device enumeration and dynamic address assignment to the protocol. All ARP communications use slave address 0x61 and require PEC checksums. ARP は、プロトコルに、デバイス一覧と、動的なアドレス割り当てを追加します。 すべての ARP 通信は、スレーブアドレス 0x61 を使用し、また、PEC チェックサムが必要です。 I2C Block Transactions I2C ブロック処理 ====================== The following I2C block transactions are supported by the SMBus layer and are described here for completeness. I2C block transactions do not limit the number of bytes transferred but the SMBus layer places a limit of 32 bytes. 次に述べる I2C ブロック処理は、SMBus 階層でサポートされ、全体を指定します。 I2C ブロック処理に転送バイト数の制限はありませんが、SMBus 階層には、32 バイトの制限があります。 I2C Block Read I2C ブロック読み込み ============== This command reads a block of bytes from a device, from a designated register that is specified through the Comm byte. デバイスの、Comm バイトで指定されたレジスタからから、バイトブロックを読み込みます。 S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P I2C Block Read (2 Comm bytes) I2C ブロック読み込み (2 Comm バイト) ============================= This command reads a block of bytes from a device, from a designated register that is specified through the two Comm bytes. デバイスの、Comm バイトで指定されたレジスタからから、バイトブロックを読み込みます。 S Addr Wr [A] Comm1 [A] Comm2 [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P I2C Block Write I2C ブロック書き込み =============== The opposite of the Block Read command, this writes bytes to a device, to a designated register that is specified through the Comm byte. Note that command lengths of 0, 2, or more bytes are supported as they are indistinguishable from data. ブロック読み込みコマンドの逆の動作をし、デバイスの、Comm バイトで指定されたレジ スタへ、バイトを書き込みます。コマンドの長さは、0, 2 またはそれ以上のバイト数が サポートされますが、それらはデータと区別できないことに注意してください。 S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P