← Documents Documentation/devicetree/bindings/soc/fsl/cpm_qe/cpm/i2c.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SoC / FSL CPM-QE

CPM I2C controller

CPM I2C bus와 parameter RAM, legacy 탐색 속성을 설명합니다.

Source pathDocumentation/devicetree/bindings/soc/fsl/cpm_qe/cpm/i2c.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

i2c.txt:1-41

CPM/QE 내부 자원과 자식 장치의 연결 규칙을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 * I2C
2
3 The I2C controller is expressed as a bus under the CPM node.
4
5 Properties:
6 - compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
7 - reg : On CPM2 devices, the second resource doesn't specify the I2C
8 Parameter RAM itself, but the I2C_BASE field of the CPM2 Parameter RAM
9 (typically 0x8afc 0x2).
10 - #address-cells : Should be one. The cell is the i2c device address with
11 the r/w bit set to zero.
12 - #size-cells : Should be zero.
13 - clock-frequency : Can be used to set the i2c clock frequency. If
14 unspecified, a default frequency of 60kHz is being used.
15 The following two properties are deprecated. They are only used by legacy
16 i2c drivers to find the bus to probe:
17 - linux,i2c-index : Can be used to hard code an i2c bus number. By default,
18 the bus number is dynamically assigned by the i2c core.
19 - linux,i2c-class : Can be used to override the i2c class. The class is used
20 by legacy i2c device drivers to find a bus in a specific context like
21 system management, video or sound. By default, I2C_CLASS_HWMON (1) is
22 being used. The definition of the classes can be found in
23 include/i2c/i2c.h
24
25 Example, based on mpc823:
26
27 i2c@860 {
28 compatible = "fsl,mpc823-i2c",
29 "fsl,cpm1-i2c";
30 reg = <0x860 0x20 0x3c80 0x30>;
31 interrupts = <16>;
32 interrupt-parent = <&CPM_PIC>;
33 fsl,cpm-command = <0x10>;
34 #address-cells = <1>;
35 #size-cells = <0>;
36
37 rtc@68 {
38 compatible = "dallas,ds1307";
39 reg = <0x68>;
40 };
41 };
42

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

CPM I2C bus

1-4

I2C 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>;
        };
};