요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==================
Driver i2c-mlxcpld
==================
Author: Michael Shych <[email protected]>
This is the Mellanox I2C controller logic, implemented in Lattice CPLD
device.
Device supports:
- Master mode.
- One physical bus.
- Polling mode.
This controller is equipped within the next Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800",
"msn2740", "msn2100".
The next transaction types are supported:
- Receive Byte/Block.
- Send Byte/Block.
- Read Byte/Block.
- Write Byte/Block.
Registers:
=============== === =======================================================================
CPBLTY 0x0 - capability reg.
Bits [6:5] - transaction length. b01 - 72B is supported,
36B in other case.
Bit 7 - SMBus block read support.
CTRL 0x1 - control reg.
Resets all the registers.
HALF_CYC 0x4 - cycle reg.
Configure the width of I2C SCL half clock cycle (in 4 LPC_CLK
units).
I2C_HOLD 0x5 - hold reg.
OE (output enable) is delayed by value set to this register
(in LPC_CLK units)
CMD 0x6 - command reg.
Bit 0, 0 = write, 1 = read.
Bits [7:1] - the 7bit Address of the I2C device.
It should be written last as it triggers an I2C transaction.
NUM_DATA 0x7 - data size reg.
Number of data bytes to write in read transaction
NUM_ADDR 0x8 - address reg.
Number of address bytes to write in read transaction.
STATUS 0x9 - status reg.
Bit 0 - transaction is completed.
Bit 4 - ACK/NACK.
DATAx 0xa - 0x54 - 68 bytes data buffer regs.
For write transaction address is specified in four first bytes
(DATA1 - DATA4), data starting from DATA4.
For read transactions address is sent in a separate transaction and
specified in the four first bytes (DATA0 - DATA3). Data is read
starting from DATA0.
=============== === =======================================================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Mellanox CPLD I2C 컨트롤러
1-24`i2c-mlxcpld`는 Lattice CPLD 장치에 구현된 Mellanox I2C 컨트롤러 로직입니다. 작성자는 Michael Shych <[email protected]>입니다.
장치는 마스터 모드, 물리 버스 하나, 폴링 모드를 지원합니다.
이 컨트롤러는 Mellanox 시스템 `msx6710`, `msx6720`, `msb7700`, `msn2700`, `msx1410`, `msn2410`, `msb7800`, `msn2740`, `msn2100`에 탑재됩니다.
지원 트랜잭션은 Receive Byte/Block, Send Byte/Block, Read Byte/Block, Write Byte/Block입니다.
지원 시스템과 전송 유형을 구조화했습니다.
단일 물리 버스에서 마스터가 폴링으로 완료를 확인합니다.
==================
Driver i2c-mlxcpld
==================
Author: Michael Shych <[email protected]>
This is the Mellanox I2C controller logic, implemented in Lattice CPLD
device.
Device supports:
- Master mode.
- One physical bus.
- Polling mode.
This controller is equipped within the next Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800",
"msn2740", "msn2100".
The next transaction types are supported:
- Receive Byte/Block.
- Send Byte/Block.
- Read Byte/Block.
- Write Byte/Block.
CPLD 레지스터 맵
25-57`CPBLTY`(`0x0`)는 기능 레지스터입니다. 비트 `[6:5]`는 트랜잭션 길이를 나타내며 `b01`이면 72바이트, 그 밖의 값이면 36바이트를 지원합니다. 비트 7은 SMBus 블록 읽기 지원을 나타냅니다.
`CTRL`(`0x1`)은 모든 레지스터를 재설정하는 제어 레지스터입니다. `HALF_CYC`(`0x4`)는 I2C SCL 반주기 폭을 4 `LPC_CLK` 단위로 설정합니다. `I2C_HOLD`(`0x5`)는 출력 활성화(OE)를 레지스터 값만큼 `LPC_CLK` 단위로 지연합니다.
`CMD`(`0x6`)의 비트 0은 쓰기 0, 읽기 1을 선택하고 비트 `[7:1]`은 I2C 장치의 7비트 주소입니다. 이 레지스터 기록이 I2C 트랜잭션을 시작하므로 반드시 마지막에 써야 합니다.
`NUM_DATA`(`0x7`)는 읽기 트랜잭션에서 쓸 데이터 바이트 수이고, `NUM_ADDR`(`0x8`)는 읽기 트랜잭션에서 쓸 주소 바이트 수입니다. `STATUS`(`0x9`)의 비트 0은 트랜잭션 완료, 비트 4는 ACK/NACK를 나타냅니다.
`DATAx`(`0xa`~`0x54`)는 68바이트 데이터 버퍼 레지스터입니다. 쓰기 트랜잭션의 주소는 처음 네 바이트 `DATA1`~`DATA4`에 두고 데이터는 `DATA4`부터 둡니다. 읽기 트랜잭션에서는 별도 트랜잭션으로 주소를 보내며 처음 네 바이트 `DATA0`~`DATA3`에 지정하고, 읽은 데이터는 `DATA0`부터 시작합니다.
원문의 ASCII 레지스터 표를 같은 의미의 구조화 표로 다시 그렸습니다.
`CMD` 기록이 전송을 촉발한다는 제약을 보존합니다.
Registers:
=============== === =======================================================================
CPBLTY 0x0 - capability reg.
Bits [6:5] - transaction length. b01 - 72B is supported,
36B in other case.
Bit 7 - SMBus block read support.
CTRL 0x1 - control reg.
Resets all the registers.
HALF_CYC 0x4 - cycle reg.
Configure the width of I2C SCL half clock cycle (in 4 LPC_CLK
units).
I2C_HOLD 0x5 - hold reg.
OE (output enable) is delayed by value set to this register
(in LPC_CLK units)
CMD 0x6 - command reg.
Bit 0, 0 = write, 1 = read.
Bits [7:1] - the 7bit Address of the I2C device.
It should be written last as it triggers an I2C transaction.
NUM_DATA 0x7 - data size reg.
Number of data bytes to write in read transaction
NUM_ADDR 0x8 - address reg.
Number of address bytes to write in read transaction.
STATUS 0x9 - status reg.
Bit 0 - transaction is completed.
Bit 4 - ACK/NACK.
DATAx 0xa - 0x54 - 68 bytes data buffer regs.
For write transaction address is specified in four first bytes
(DATA1 - DATA4), data starting from DATA4.
For read transactions address is sent in a separate transaction and
specified in the four first bytes (DATA0 - DATA3). Data is read
starting from DATA0.
=============== === =======================================================================
요약·해설
i2c-mlxcpld.rst:1-57mlxcpld는 단일 물리 버스의 마스터·폴링 컨트롤러이며 `CMD`를 마지막에 기록해 전송을 시작하고 `STATUS`로 완료를 확인합니다.
원문 분량과 핵심 기능을 요약합니다.
장치 인식부터 기능 제공까지의 순서입니다.