← Documents Documentation/firmware-guide/acpi/i2c-muxes.rst GitHub 원문 ↗

Linux 6.18.37 · Firmware

ACPI I2C Muxes

ACPI I2C mux channel Device scope와 downstream I2cSerialBus controller path 예제의 전문 번역입니다.

Source pathDocumentation/firmware-guide/acpi/i2c-muxes.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

i2c-muxes.rst:1-61

ACPI I2C mux hierarchy는 mux channel마다 `Device ()` scope를 만들고 `_ADR`로 channel number를 지정한다. Downstream client의 `I2cSerialBus` controller path는 해당 channel scope를 가리켜야 한다.

예제에서 MUX0은 SMB1에 address `0x70`으로 연결되고, CH00과 CH01은 각각 `_ADR=0`, `_ADR=1`이다. 두 channel의 CLIA와 CLIB는 모두 address `0x50`이지만 logical bus가 달라 충돌하지 않는다.

검토할 때는 namespace parent-child 관계, channel `_ADR`, client의 controller path 세 가지가 서로 같은 topology를 나타내는지 대조해야 한다.

I2C mux ASL 점검
Upstream controller SMB1 확인MUX0의 0x70 I2cSerialBus resource 확인Channel별 Device scope와 _ADR 고유성 확인Client address와 channel controller path 대조동일 address client가 서로 다른 channel인지 확인

Mux와 downstream client를 안전하게 열거하기 위한 확인 순서다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ==============
4 ACPI I2C Muxes
5 ==============
6
7 Describing an I2C device hierarchy that includes I2C muxes requires an ACPI
8 Device () scope per mux channel.
9
10 Consider this topology::
11
12 +------+ +------+
13 | SMB1 |-->| MUX0 |--CH00--> i2c client A (0x50)
14 | | | 0x70 |--CH01--> i2c client B (0x50)
15 +------+ +------+
16
17 which corresponds to the following ASL (in the scope of \_SB)::
18
19 Device (SMB1)
20 {
21 Name (_HID, ...)
22 Device (MUX0)
23 {
24 Name (_HID, ...)
25 Name (_CRS, ResourceTemplate () {
26 I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
27 AddressingMode7Bit, "\\_SB.SMB1", 0x00,
28 ResourceConsumer,,)
29 }
30
31 Device (CH00)
32 {
33 Name (_ADR, 0)
34
35 Device (CLIA)
36 {
37 Name (_HID, ...)
38 Name (_CRS, ResourceTemplate () {
39 I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
40 AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH00",
41 0x00, ResourceConsumer,,)
42 }
43 }
44 }
45
46 Device (CH01)
47 {
48 Name (_ADR, 1)
49
50 Device (CLIB)
51 {
52 Name (_HID, ...)
53 Name (_CRS, ResourceTemplate () {
54 I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
55 AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH01",
56 0x00, ResourceConsumer,,)
57 }
58 }
59 }
60 }
61 }
62

3. 한국어 전문 번역

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

I2C mux channel별 Device scope

1-17

I2C mux가 포함된 I2C device hierarchy를 ACPI로 기술할 때는 mux channel마다 하나의 ACPI `Device ()` scope가 필요하다. Channel 자체를 namespace object로 만들어야 downstream client가 어느 logical I2C adapter에 연결되는지 resource path로 나타낼 수 있다.

예제 topology에서 SMB1은 upstream I2C controller이고 MUX0은 SMB1에 연결된 address `0x70`의 I2C mux다. MUX0의 channel 0인 CH00에는 client A가, channel 1인 CH01에는 client B가 연결된다.

Client A와 B는 모두 address `0x50`을 사용한다. 두 client가 서로 다른 mux channel에 있어 channel별로 분리된 downstream bus에 속하므로 같은 7-bit address를 충돌 없이 사용할 수 있다.

ACPI I2C mux topology
SMB1 upstream I2C controllerMUX0 at address 0x70CH00, _ADR 0 → I2C client A at 0x50CH01, _ADR 1 → I2C client B at 0x50

원문의 ASCII 그림을 upstream controller, mux와 두 channel의 분기 관계로 다시 그렸다.

Mux channel별 client
Mux channel_ADRClientClient address
CH000CLIA0x50
CH011CLIB0x50

동일 client address가 channel scope와 controller path로 구분된다.

.. SPDX-License-Identifier: GPL-2.0

==============
ACPI I2C Muxes
==============

Describing an I2C device hierarchy that includes I2C muxes requires an ACPI
Device () scope per mux channel.

Consider this topology::

    +------+   +------+
    | SMB1 |-->| MUX0 |--CH00--> i2c client A (0x50)
    |      |   | 0x70 |--CH01--> i2c client B (0x50)
    +------+   +------+

which corresponds to the following ASL (in the scope of \_SB)::

\_SB scope의 ASL hierarchy

18-61

이 topology에 대응하는 ASL은 `\_SB` scope 안에 작성된다. 최상위 `Device (SMB1)`은 upstream controller이며 자체 `_HID`를 가진다.

SMB1 아래의 `Device (MUX0)`도 `_HID`를 가진 I2C device다. MUX0의 `_CRS`는 `I2cSerialBus` resource로 address `0x70`, `ControllerInitiated`, `I2C_SPEED`, `AddressingMode7Bit`, upstream controller path `\_SB.SMB1`, `ResourceConsumer`를 선언한다.

MUX0 upstream resource
항목
Device path\_SB.SMB1.MUX0
I2C address0x70
Controller modeControllerInitiated
SpeedI2C_SPEED
AddressingAddressingMode7Bit
Controller path\_SB.SMB1
Resource roleResourceConsumer

MUX0 자체가 SMB1의 I2C client로 연결되는 설정이다.

MUX0 아래 `Device (CH00)`은 `_ADR=0`으로 mux channel 0을 나타낸다. 그 아래 `Device (CLIA)`의 `_CRS`는 address `0x50`의 `I2cSerialBus`를 선언하고 controller path를 `\_SB.SMB1.MUX0.CH00`으로 지정한다.

동일하게 `Device (CH01)`은 `_ADR=1`인 channel 1이다. Child `Device (CLIB)`도 address `0x50`을 사용하지만 controller path가 `\_SB.SMB1.MUX0.CH01`이므로 CLIA와 다른 downstream bus에 연결된다.

Downstream I2cSerialBus resource
ClientAddressChannel _ADRController path
CLIA0x500\_SB.SMB1.MUX0.CH00
CLIB0x501\_SB.SMB1.MUX0.CH01

Client의 controller path가 선택할 mux channel을 명시한다.

ASL namespace 해석
\_SB.SMB1: upstream controller\_SB.SMB1.MUX0: 0x70 mux clientMUX0.CH00: _ADR 0 channel scopeCH00.CLIA: controller CH00, address 0x50MUX0.CH01: _ADR 1 channel scopeCH01.CLIB: controller CH01, address 0x50

Namespace parent-child 관계와 I2cSerialBus controller path가 같은 topology를 함께 표현한다.

핵심은 client resource가 mux device 자체가 아니라 정확한 channel `Device ()` path를 controller로 참조하는 것이다. `_ADR`은 mux driver가 생성하는 logical adapter의 channel number와 연결되며, 이 구조가 없으면 동일 address의 downstream client를 올바른 bus에 열거할 수 없다.


    Device (SMB1)
    {
        Name (_HID, ...)
        Device (MUX0)
        {
            Name (_HID, ...)
            Name (_CRS, ResourceTemplate () {
                I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
                            AddressingMode7Bit, "\\_SB.SMB1", 0x00,
                            ResourceConsumer,,)
            }

            Device (CH00)
            {
                Name (_ADR, 0)

                Device (CLIA)
                {
                    Name (_HID, ...)
                    Name (_CRS, ResourceTemplate () {
                        I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
                                    AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH00",
                                    0x00, ResourceConsumer,,)
                    }
                }
            }

            Device (CH01)
            {
                Name (_ADR, 1)

                Device (CLIB)
                {
                    Name (_HID, ...)
                    Name (_CRS, ResourceTemplate () {
                        I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
                                    AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH01",
                                    0x00, ResourceConsumer,,)
                    }
                }
            }
        }
    }