← Documents Documentation/devicetree/bindings/net/cavium-mdio.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Cavium Octeon and ThunderX MDIO

Octeon MDIO bus와 여러 ThunderX MDIO controller를 묶는 PCI nexus binding입니다.

Source pathDocumentation/devicetree/bindings/net/cavium-mdio.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

cavium-mdio.txt:1-84

단일 MDIO bus와 PCI function 아래 여러 bus를 배치하는 nexus 주소 체계를 비교합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * System Management Interface (SMI) / MDIO
2
3 Properties:
4 - compatible: One of:
5
6 "cavium,octeon-3860-mdio": Compatibility with all cn3XXX, cn5XXX
7 and cn6XXX SOCs.
8
9 "cavium,thunder-8890-mdio": Compatibility with all cn8XXX SOCs.
10
11 - reg: The base address of the MDIO bus controller register bank.
12
13 - #address-cells: Must be <1>.
14
15 - #size-cells: Must be <0>. MDIO addresses have no size component.
16
17 Typically an MDIO bus might have several children.
18
19 Example:
20 mdio@1180000001800 {
21 compatible = "cavium,octeon-3860-mdio";
22 #address-cells = <1>;
23 #size-cells = <0>;
24 reg = <0x11800 0x00001800 0x0 0x40>;
25
26 ethernet-phy@0 {
27 ...
28 reg = <0>;
29 };
30 };
31
32
33 * System Management Interface (SMI) / MDIO Nexus
34
35 Several mdio buses may be gathered as children of a single PCI
36 device, this PCI device is the nexus of the buses.
37
38 Properties:
39
40 - compatible: "cavium,thunder-8890-mdio-nexus";
41
42 - reg: The PCI device and function numbers of the nexus device.
43
44 - #address-cells: Must be <2>.
45
46 - #size-cells: Must be <2>.
47
48 - ranges: As needed for mapping of the MDIO bus device registers.
49
50 - assigned-addresses: As needed for mapping of the MDIO bus device registers.
51
52 Example:
53
54 mdio-nexus@1,3 {
55 compatible = "cavium,thunder-8890-mdio-nexus";
56 #address-cells = <2>;
57 #size-cells = <2>;
58 reg = <0x0b00 0 0 0 0>; /* DEVFN = 0x0b (1:3) */
59 assigned-addresses = <0x03000000 0x87e0 0x05000000 0x0 0x800000>;
60 ranges = <0x87e0 0x05000000 0x03000000 0x87e0 0x05000000 0x0 0x800000>;
61
62 mdio0@87e0,05003800 {
63 compatible = "cavium,thunder-8890-mdio";
64 #address-cells = <1>;
65 #size-cells = <0>;
66 reg = <0x87e0 0x05003800 0x0 0x30>;
67
68 ethernet-phy@0 {
69 ...
70 reg = <0>;
71 };
72 };
73 mdio0@87e0,05003880 {
74 compatible = "cavium,thunder-8890-mdio";
75 #address-cells = <1>;
76 #size-cells = <0>;
77 reg = <0x87e0 0x05003880 0x0 0x30>;
78
79 ethernet-phy@0 {
80 ...
81 reg = <0>;
82 };
83 };
84 };
85

3. 한국어 전문 번역

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

System Management Interface(SMI) / MDIO

1-18

`compatible`은 cn3XXX, cn5XXX, cn6XXX SoC 전체와 호환되는 `cavium,octeon-3860-mdio` 또는 cn8XXX SoC 전체와 호환되는 `cavium,thunder-8890-mdio` 중 하나입니다.

`reg`는 MDIO bus controller register bank의 base address입니다. `#address-cells`는 `<1>`, `#size-cells`는 `<0>`이어야 하며 MDIO address에는 size 성분이 없습니다.

일반적으로 하나의 MDIO bus에는 여러 child가 있을 수 있습니다.

Octeon MDIO bus 예제

19-32

예제는 `mdio@1180000001800`에 Octeon MDIO controller를 매핑하고 MDIO 주소 0에 Ethernet PHY child를 둡니다.

mdio@1180000001800 {
        compatible = "cavium,octeon-3860-mdio";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x11800 0x00001800 0x0 0x40>;

        ethernet-phy@0 {
                ...
                reg = <0>;
        };
};

SMI / MDIO PCI nexus

33-51

여러 MDIO bus를 하나의 PCI device 아래 child로 모을 수 있으며, 이 PCI device가 bus들의 nexus입니다.

`compatible`은 `cavium,thunder-8890-mdio-nexus`입니다. `reg`는 nexus device의 PCI device number와 function number를 지정합니다.

`#address-cells`와 `#size-cells`는 모두 `<2>`여야 합니다. `ranges`와 `assigned-addresses`는 필요에 따라 MDIO bus device register를 매핑합니다.

ThunderX MDIO PCI nexus
PCI MDIO nexus 1:3MDIO controller 0x05003800
PCI MDIO nexus 1:3MDIO controller 0x05003880
MDIO controller 0x05003800Ethernet PHY address 0
MDIO controller 0x05003880Ethernet PHY address 0

하나의 PCI function 아래 여러 MDIO controller와 각 PHY를 계층화합니다.

ThunderX MDIO nexus 예제

52-84

예제는 PCI DEVFN `0x0b`인 device 1, function 3의 nexus에 8MiB assigned address와 ranges를 설정합니다. 그 아래 두 Thunder 8890 MDIO controller를 서로 다른 register offset에 두고 각각 PHY 주소 0을 연결합니다.

mdio-nexus@1,3 {
        compatible = "cavium,thunder-8890-mdio-nexus";
        #address-cells = <2>;
        #size-cells = <2>;
        reg = <0x0b00 0 0 0 0>; /* DEVFN = 0x0b (1:3) */
        assigned-addresses = <0x03000000 0x87e0 0x05000000 0x0 0x800000>;
        ranges = <0x87e0 0x05000000 0x03000000 0x87e0 0x05000000 0x0 0x800000>;

        mdio0@87e0,05003800 {
                compatible = "cavium,thunder-8890-mdio";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x87e0 0x05003800 0x0 0x30>;

                ethernet-phy@0 {
                        ...
                        reg = <0>;
                };
        };
        mdio0@87e0,05003880 {
                compatible = "cavium,thunder-8890-mdio";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x87e0 0x05003880 0x0 0x30>;

                ethernet-phy@0 {
                        ...
                        reg = <0>;
                };
        };
};