← Documents Documentation/devicetree/bindings/net/marvell-orion-net.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Marvell Orion/Discovery Ethernet

Discovery controller와 최대 3개 port의 2단계 Ethernet binding입니다.

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

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

1. 요약·해설

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

요약과 해설

marvell-orion-net.txt:1-83

Controller 공통 register와 port별 속성이 분리되는 이유를 정리합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Marvell Orion/Discovery ethernet controller
2 =============================================
3
4 The Marvell Discovery ethernet controller can be found on Marvell Orion SoCs
5 (Kirkwood, Dove, Orion5x, and Discovery Innovation) and as part of Marvell
6 Discovery system controller chips (mv64[345]60).
7
8 The Discovery ethernet controller is described with two levels of nodes. The
9 first level describes the ethernet controller itself and the second level
10 describes up to 3 ethernet port nodes within that controller. The reason for
11 the multiple levels is that the port registers are interleaved within a single
12 set of controller registers. Each port node describes port-specific properties.
13
14 Note: The above separation is only true for Discovery system controllers.
15 For Orion SoCs we stick to the separation, although there each controller has
16 only one port associated. Multiple ports are implemented as multiple single-port
17 controllers. As Kirkwood has some issues with proper initialization after reset,
18 an extra compatible string is added for it.
19
20 * Ethernet controller node
21
22 Required controller properties:
23 - #address-cells: shall be 1.
24 - #size-cells: shall be 0.
25 - compatible: shall be one of "marvell,orion-eth", "marvell,kirkwood-eth".
26 - reg: address and length of the controller registers.
27
28 Optional controller properties:
29 - clocks: phandle reference to the controller clock.
30 - marvell,tx-checksum-limit: max tx packet size for hardware checksum.
31
32 * Ethernet port node
33
34 Required port properties:
35 - compatible: shall be one of "marvell,orion-eth-port",
36 "marvell,kirkwood-eth-port".
37 - reg: port number relative to ethernet controller, shall be 0, 1, or 2.
38 - interrupts: port interrupt.
39 - local-mac-address: See ethernet.txt file in the same directory.
40
41 Optional port properties:
42 - marvell,tx-queue-size: size of the transmit ring buffer.
43 - marvell,tx-sram-addr: address of transmit descriptor buffer located in SRAM.
44 - marvell,tx-sram-size: size of transmit descriptor buffer located in SRAM.
45 - marvell,rx-queue-size: size of the receive ring buffer.
46 - marvell,rx-sram-addr: address of receive descriptor buffer located in SRAM.
47 - marvell,rx-sram-size: size of receive descriptor buffer located in SRAM.
48
49 and
50
51 - phy-handle: See ethernet.txt file in the same directory.
52 - phy-mode: See ethernet.txt file in the same directory.
53
54 or
55
56 - speed: port speed if no PHY connected.
57 - duplex: port mode if no PHY connected.
58
59 * Node example:
60
61 mdio-bus {
62 ...
63 ethphy: ethernet-phy@8 {
64 ...
65 };
66 };
67
68 eth: ethernet-controller@72000 {
69 compatible = "marvell,orion-eth";
70 #address-cells = <1>;
71 #size-cells = <0>;
72 reg = <0x72000 0x2000>;
73 clocks = <&gate_clk 2>;
74 marvell,tx-checksum-limit = <1600>;
75
76 ethernet@0 {
77 compatible = "marvell,orion-eth-port";
78 reg = <0>;
79 interrupts = <29>;
80 phy-handle = <&ethphy>;
81 local-mac-address = [00 00 00 00 00 00];
82 };
83 };
84

3. 한국어 전문 번역

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

Orion/Discovery Ethernet controller 구조

1-19

Marvell Discovery Ethernet controller는 Kirkwood, Dove, Orion5x, Discovery Innovation 같은 Marvell Orion SoC와 `mv64[345]60` Discovery system controller chip에 들어 있습니다.

Binding은 controller 자체를 설명하는 첫 번째 node와 그 안의 최대 3개 Ethernet port node를 설명하는 두 번째 계층으로 구성됩니다. Port register가 하나의 controller register 집합 안에 interleave되어 있으므로 각 port node가 port별 속성을 가집니다.

이 구분은 Discovery system controller에만 실제로 해당합니다. Orion SoC도 같은 구분을 따르지만 controller마다 port 하나만 연결되며, 여러 port는 여러 single-port controller로 구현합니다. Kirkwood는 reset 뒤 올바른 초기화에 문제가 있어 별도 compatible 문자열을 사용합니다.

Ethernet controller node

20-31

필수 `#address-cells`는 1, `#size-cells`는 0입니다. `compatible`은 `marvell,orion-eth` 또는 `marvell,kirkwood-eth`이고 `reg`는 controller register의 주소와 길이입니다.

선택 `clocks`는 controller clock의 phandle이며 `marvell,tx-checksum-limit`는 hardware checksum을 적용할 수 있는 최대 TX packet 크기입니다.

Ethernet port node

32-58

필수 `compatible`은 `marvell,orion-eth-port` 또는 `marvell,kirkwood-eth-port`입니다. `reg`는 controller 기준 port 번호 0, 1, 2 중 하나이고 `interrupts`는 port interrupt입니다. `local-mac-address`는 같은 directory의 `ethernet.txt` 정의를 따릅니다.

선택 `marvell,tx-queue-size`와 `marvell,rx-queue-size`는 각각 transmit/receive ring buffer 크기입니다. `marvell,tx-sram-addr`, `marvell,tx-sram-size`, `marvell,rx-sram-addr`, `marvell,rx-sram-size`는 SRAM에 둔 TX/RX descriptor buffer의 주소와 크기입니다.

PHY가 연결되면 `ethernet.txt`의 `phy-handle`과 `phy-mode`를 사용합니다. PHY가 없으면 `speed`로 port 속도, `duplex`로 port mode를 지정합니다.

Controller와 port 예제

59-83

예제는 MDIO bus의 PHY 주소 8을 controller `0x72000`의 port 0에 연결합니다. Controller는 gate clock 2와 TX checksum 한계 1600을 사용하고 port는 interrupt 29와 빈 local MAC address를 지정합니다.

mdio-bus {
        ...
        ethphy: ethernet-phy@8 {
                ...
        };
};

eth: ethernet-controller@72000 {
        compatible = "marvell,orion-eth";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x72000 0x2000>;
        clocks = <&gate_clk 2>;
        marvell,tx-checksum-limit = <1600>;

        ethernet@0 {
                compatible = "marvell,orion-eth-port";
                reg = <0>;
                interrupts = <29>;
                phy-handle = <&ethphy>;
                local-mac-address = [00 00 00 00 00 00];
        };
};