요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* I2C
The I2C controller is expressed as a bus under the CPM node.
Properties:
- compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
- reg : On CPM2 devices, the second resource doesn't specify the I2C
Parameter RAM itself, but the I2C_BASE field of the CPM2 Parameter RAM
(typically 0x8afc 0x2).
- #address-cells : Should be one. The cell is the i2c device address with
the r/w bit set to zero.
- #size-cells : Should be zero.
- clock-frequency : Can be used to set the i2c clock frequency. If
unspecified, a default frequency of 60kHz is being used.
The following two properties are deprecated. They are only used by legacy
i2c drivers to find the bus to probe:
- linux,i2c-index : Can be used to hard code an i2c bus number. By default,
the bus number is dynamically assigned by the i2c core.
- linux,i2c-class : Can be used to override the i2c class. The class is used
by legacy i2c device drivers to find a bus in a specific context like
system management, video or sound. By default, I2C_CLASS_HWMON (1) is
being used. The definition of the classes can be found in
include/i2c/i2c.h
Example, based on mpc823:
i2c@860 {
compatible = "fsl,mpc823-i2c",
"fsl,cpm1-i2c";
reg = <0x860 0x20 0x3c80 0x30>;
interrupts = <16>;
interrupt-parent = <&CPM_PIC>;
fsl,cpm-command = <0x10>;
#address-cells = <1>;
#size-cells = <0>;
rtc@68 {
compatible = "dallas,ds1307";
reg = <0x68>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
CPM I2C bus
1-4I2C controller는 CPM 노드 아래의 bus로 표현합니다.
I2C 필수·일반 속성
5-14`compatible`은 `fsl,cpm1-i2c` 또는 `fsl,cpm2-i2c`입니다. CPM2에서 둘째 `reg` resource는 I2C Parameter RAM 자체가 아니라 CPM2 Parameter RAM의 `I2C_BASE` field를 지정하며 일반적인 값은 `<0x8afc 0x2>`입니다.
`#address-cells`는 1이며 그 셀은 r/w bit를 0으로 둔 I2C 장치 주소입니다. `#size-cells`는 0입니다. `clock-frequency`가 없으면 기본 I2C clock은 60kHz입니다.
deprecated bus 탐색 속성
15-23`linux,i2c-index`와 `linux,i2c-class`는 legacy I2C 드라이버의 probe bus 탐색에만 쓰이는 deprecated 속성입니다.
`linux,i2c-index`가 없으면 I2C core가 bus 번호를 동적으로 할당합니다. `linux,i2c-class`가 없으면 기본 `I2C_CLASS_HWMON` 값 1을 사용하며 class 정의는 `include/i2c/i2c.h`에 있습니다.
MPC823 I2C 예제
24-41예제는 CPM1 I2C bus에 register·parameter RAM, interrupt, CPM command를 지정하고 주소 `0x68`의 Dallas DS1307 RTC를 자식으로 둡니다.
i2c@860 {
compatible = "fsl,mpc823-i2c",
"fsl,cpm1-i2c";
reg = <0x860 0x20 0x3c80 0x30>;
interrupts = <16>;
interrupt-parent = <&CPM_PIC>;
fsl,cpm-command = <0x10>;
#address-cells = <1>;
#size-cells = <0>;
rtc@68 {
compatible = "dallas,ds1307";
reg = <0x68>;
};
};
요약과 해설
i2c.txt:1-41CPM/QE 내부 자원과 자식 장치의 연결 규칙을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.