← Documents Documentation/devicetree/bindings/i2c/i2c-opal.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

IBM OPAL I2C Driver

Firmware가 구성한 I2C port를 OPAL ID로 식별하는 바인딩입니다.

Source pathDocumentation/devicetree/bindings/i2c/i2c-opal.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

i2c-opal.txt:1-37

Linux와 firmware가 사용하는 OPAL port property를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Device-tree bindings for I2C OPAL driver
2 ----------------------------------------
3
4 Most of the device node and properties layout is specific to the firmware and
5 used by the firmware itself for configuring the port. From the linux
6 perspective, the properties of use are "ibm,port-name" and "ibm,opal-id".
7
8 Required properties:
9
10 - reg: Port-id within a given master
11 - compatible: must be "ibm,opal-i2c"
12 - ibm,opal-id: Refers to a specific bus and used to identify it when calling
13 the relevant OPAL functions.
14 - bus-frequency: Operating frequency of the i2c bus (in HZ). Informational for
15 linux, used by the FW though.
16
17 Optional properties:
18 - ibm,port-name: Firmware provides this name that uniquely identifies the i2c
19 port.
20
21 The node contains a number of other properties that are used by the FW itself
22 and depend on the specific hardware implementation. The example below depicts
23 a P8 on-chip bus.
24
25 Example:
26
27 i2c-bus@0 {
28 reg = <0x0>;
29 bus-frequency = <0x61a80>;
30 compatible = "ibm,power8-i2c-port", "ibm,opal-i2c";
31 ibm,opal-id = <0x1>;
32 ibm,port-name = "p8_00000000_e1p0";
33 #address-cells = <0x1>;
34 phandle = <0x10000006>;
35 #size-cells = <0x0>;
36 linux,phandle = <0x10000006>;
37 };
38

3. 한국어 전문 번역

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

OPAL firmware I2C 속성

1-24

I2C OPAL device node와 property layout의 대부분은 firmware 고유 형식이며 firmware가 port를 설정하는 데 직접 사용합니다. Linux 관점에서 사용하는 핵심 property는 `ibm,port-name`과 `ibm,opal-id`입니다.

필수 `reg`는 주어진 master 안의 port ID이고 `compatible`은 `ibm,opal-i2c`여야 합니다. `ibm,opal-id`는 특정 bus를 가리키며 관련 OPAL function 호출에서 bus를 식별합니다. `bus-frequency`는 Hz 단위 I2C bus operating frequency로, Linux에는 정보용이지만 firmware는 사용합니다.

선택 `ibm,port-name`은 firmware가 제공하는 I2C port의 고유 이름입니다. Node에는 firmware 자체가 사용하는 다른 property도 포함될 수 있으며, 그 내용은 구체적인 hardware implementation에 따라 달라집니다. 이어지는 예제는 P8 on-chip bus입니다.

OPAL I2C identification
Firmware device treePort configuration
ibm,opal-idIdentify specific bus
Linux OPAL driverCall relevant OPAL functions
ibm,port-nameUnique firmware port name

Firmware가 구성한 port를 Linux가 OPAL ID로 선택해 function을 호출하는 흐름입니다.

Power8 on-chip bus 예제

25-37

예제의 port 0은 `bus-frequency = <0x61a80>`, OPAL ID 1과 고유 이름 `p8_00000000_e1p0`을 사용합니다. `ibm,power8-i2c-port`와 `ibm,opal-i2c` 두 compatible을 함께 제공하고 동일한 phandle 값을 표준 및 Linux property에 기록합니다.

i2c-bus@0 {
        reg = <0x0>;
        bus-frequency = <0x61a80>;
        compatible = "ibm,power8-i2c-port", "ibm,opal-i2c";
        ibm,opal-id = <0x1>;
        ibm,port-name = "p8_00000000_e1p0";
        #address-cells = <0x1>;
        phandle = <0x10000006>;
        #size-cells = <0x0>;
        linux,phandle = <0x10000006>;
};