← Documents Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Hisilicon HiX5HD2 GMAC

HiSilicon GMAC v1/v2의 SoC, clock, reset과 PHY child binding입니다.

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

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

1. 요약·해설

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

요약과 해설

hisilicon-hix5hd2-gmac.txt:1-60

IP version별 SoC와 core/interface clock·reset 구성을 비교합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Hisilicon hix5hd2 gmac controller
2
3 Required properties:
4 - compatible: should contain one of the following SoC strings:
5 * "hisilicon,hix5hd2-gmac"
6 * "hisilicon,hi3798cv200-gmac"
7 * "hisilicon,hi3516a-gmac"
8 and one of the following version string:
9 * "hisilicon,hisi-gmac-v1"
10 * "hisilicon,hisi-gmac-v2"
11 The version v1 includes SoCs hix5hd2.
12 The version v2 includes SoCs hi3798cv200, hi3516a.
13 - reg: specifies base physical address(s) and size of the device registers.
14 The first region is the MAC register base and size.
15 The second region is external interface control register.
16 - interrupts: should contain the MAC interrupt.
17 - #address-cells: must be <1>.
18 - #size-cells: must be <0>.
19 - phy-mode: see ethernet.txt [1].
20 - phy-handle: see ethernet.txt [1].
21 - clocks: clock phandle and specifier pair.
22 - clock-names: contain the clock name "mac_core"(required) and "mac_ifc"(optional).
23 - resets: should contain the phandle to the MAC core reset signal(optional),
24 the MAC interface reset signal(optional)
25 and the PHY reset signal(optional).
26 - reset-names: contain the reset signal name "mac_core"(optional),
27 "mac_ifc"(optional) and "phy"(optional).
28 - hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
29 The 1st cell is reset pre-delay in micro seconds.
30 The 2nd cell is reset pulse in micro seconds.
31 The 3rd cell is reset post-delay in micro seconds.
32
33 The MAC address will be determined using the properties defined in
34 ethernet.txt[1].
35
36 - PHY subnode: inherits from phy binding [2]
37
38 [1] Documentation/devicetree/bindings/net/ethernet.txt
39 [2] Documentation/devicetree/bindings/net/phy.txt
40
41 Example:
42 gmac0: ethernet@f9840000 {
43 compatible = "hisilicon,hi3798cv200-gmac", "hisilicon,hisi-gmac-v2";
44 reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
45 interrupts = <0 71 4>;
46 #address-cells = <1>;
47 #size-cells = <0>;
48 phy-mode = "rgmii";
49 phy-handle = <&phy2>;
50 mac-address = [00 00 00 00 00 00];
51 clocks = <&crg HISTB_ETH0_MAC_CLK>, <&crg HISTB_ETH0_MACIF_CLK>;
52 clock-names = "mac_core", "mac_ifc";
53 resets = <&crg 0xcc 8>, <&crg 0xcc 10>, <&crg 0xcc 12>;
54 reset-names = "mac_core", "mac_ifc", "phy";
55 hisilicon,phy-reset-delays-us = <10000 10000 30000>;
56
57 phy2: ethernet-phy@2 {
58 reg = <2>;
59 };
60 };
61

3. 한국어 전문 번역

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

Hisilicon HiX5HD2 GMAC

1-2

이 binding은 Hisilicon HiX5HD2 계열 GMAC controller를 설명합니다.

SoC·version, clock과 reset 속성

3-40

`compatible`에는 SoC 문자열 `hisilicon,hix5hd2-gmac`, `hisilicon,hi3798cv200-gmac`, `hisilicon,hi3516a-gmac` 중 하나와 version 문자열 `hisilicon,hisi-gmac-v1` 또는 `hisilicon,hisi-gmac-v2` 중 하나가 들어갑니다. v1은 HiX5HD2, v2는 HI3798CV200과 HI3516A를 포함합니다.

`reg`의 첫 영역은 MAC register base와 크기, 두 번째는 external interface control register입니다. `interrupts`는 MAC interrupt이며 `#address-cells`는 `<1>`, `#size-cells`는 `<0>`입니다. `phy-mode`와 `phy-handle`은 `ethernet.txt`를 참조합니다.

`clocks`는 clock phandle/specifier 쌍입니다. `clock-names`에는 필수 `mac_core`와 선택 `mac_ifc`가 들어갑니다.

`resets`에는 선택적인 MAC core, MAC interface, PHY reset signal phandle이 들어가며 `reset-names`는 같은 순서로 `mac_core`, `mac_ifc`, `phy`를 지정합니다.

PHY reset을 제공하면 `hisilicon,phy-reset-delays-us`의 세 cell이 microsecond 단위 pre-delay, reset pulse, post-delay를 나타냅니다. MAC address는 `ethernet.txt` 속성으로 결정하고 PHY subnode는 `phy.txt`를 상속합니다.

참조 문서는 `[1] Documentation/devicetree/bindings/net/ethernet.txt`와 `[2] Documentation/devicetree/bindings/net/phy.txt`입니다.

HiSilicon GMAC version mapping
VersionSoC
hisi-gmac-v1hix5hd2
hisi-gmac-v2hi3798cv200, hi3516a

SoC 문자열과 IP version 문자열을 함께 지정합니다.

HI3798CV200 GMAC v2 예제

41-60

예제는 GMAC v2 core와 4-byte interface control register, interrupt 71, RGMII와 PHY 주소 2를 사용합니다. Core/interface clock과 세 reset line을 연결하고 PHY reset timing을 10000/10000/30000us로 지정합니다.

gmac0: ethernet@f9840000 {
        compatible = "hisilicon,hi3798cv200-gmac", "hisilicon,hisi-gmac-v2";
        reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
        interrupts = <0 71 4>;
        #address-cells = <1>;
        #size-cells = <0>;
        phy-mode = "rgmii";
        phy-handle = <&phy2>;
        mac-address = [00 00 00 00 00 00];
        clocks = <&crg HISTB_ETH0_MAC_CLK>, <&crg HISTB_ETH0_MACIF_CLK>;
        clock-names = "mac_core", "mac_ifc";
        resets = <&crg 0xcc 8>, <&crg 0xcc 10>, <&crg 0xcc 12>;
        reset-names = "mac_core", "mac_ifc", "phy";
        hisilicon,phy-reset-delays-us = <10000 10000 30000>;

        phy2: ethernet-phy@2 {
                reg = <2>;
        };
};