요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Synopsys DWC Ethernet QoS IP version 4.10 driver (GMAC)
This binding is deprecated, but it continues to be supported, but new
features should be preferably added to the stmmac binding document.
This binding supports the Synopsys Designware Ethernet QoS (Quality Of Service)
IP block. The IP supports multiple options for bus type, clocking and reset
structure, and feature list. Consequently, a number of properties and list
entries in properties are marked as optional, or only required in specific HW
configurations.
Required properties:
- compatible: One of:
- "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10"
Represents the IP core when integrated into the Axis ARTPEC-6 SoC.
- "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10"
Represents the IP core when integrated into the NVIDIA Tegra186 SoC.
- "snps,dwc-qos-ethernet-4.10"
This combination is deprecated. It should be treated as equivalent to
"axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10". It is supported to be
compatible with earlier revisions of this binding.
- reg: Address and length of the register set for the device
- clocks: Phandle and clock specifiers for each entry in clock-names, in the
same order. See ../clock/clock-bindings.txt.
- clock-names: May contain any/all of the following depending on the IP
configuration, in any order:
- "tx"
The EQOS transmit path clock. The HW signal name is clk_tx_i.
In some configurations (e.g. GMII/RGMII), this clock also drives the PHY TX
path. In other configurations, other clocks (such as tx_125, rmii) may
drive the PHY TX path.
- "rx"
The EQOS receive path clock. The HW signal name is clk_rx_i.
In some configurations (e.g. GMII/RGMII), this clock is derived from the
PHY's RX clock output. In other configurations, other clocks (such as
rx_125, rmii) may drive the EQOS RX path.
In cases where the PHY clock is directly fed into the EQOS receive path
without intervening logic, the DT need not represent this clock, since it
is assumed to be fully under the control of the PHY device/driver. In
cases where SoC integration adds additional logic to this path, such as a
SW-controlled clock gate, this clock should be represented in DT.
- "slave_bus"
The CPU/slave-bus (CSR) interface clock. This applies to any bus type;
APB, AHB, AXI, etc. The HW signal name is hclk_i (AHB) or clk_csr_i (other
buses).
- "master_bus"
The master bus interface clock. Only required in configurations that use a
separate clock for the master and slave bus interfaces. The HW signal name
is hclk_i (AHB) or aclk_i (AXI).
- "ptp_ref"
The PTP reference clock. The HW signal name is clk_ptp_ref_i.
- "phy_ref_clk"
This clock is deprecated and should not be used by new compatible values.
It is equivalent to "tx".
- "apb_pclk"
This clock is deprecated and should not be used by new compatible values.
It is equivalent to "slave_bus".
Note: Support for additional IP configurations may require adding the
following clocks to this list in the future: clk_rx_125_i, clk_tx_125_i,
clk_pmarx_0_i, clk_pmarx1_i, clk_rmii_i, clk_revmii_rx_i, clk_revmii_tx_i.
Configurations exist where multiple similar clocks are used at once, e.g. all
of clk_rx_125_i, clk_pmarx_0_i, clk_pmarx1_i. For this reason it is best to
extend the binding with a separate clock-names entry for each of those RX
clocks, rather than repurposing the existing "rx" clock-names entry as a
generic/logical clock in a similar fashion to "master_bus" and "slave_bus".
This will allow easy support for configurations that support multiple PHY
interfaces using a mux, and hence need to have explicit control over
specific RX clocks.
The following compatible values require the following set of clocks:
- "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10":
- "slave_bus"
- "master_bus"
- "rx"
- "tx"
- "ptp_ref"
- "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10":
- "slave_bus"
- "master_bus"
- "tx"
- "ptp_ref"
- "snps,dwc-qos-ethernet-4.10" (deprecated):
- "phy_ref_clk"
- "apb_clk"
- interrupts: Should contain the core's combined interrupt signal
- phy-mode: See ethernet.txt file in the same directory
- resets: Phandle and reset specifiers for each entry in reset-names, in the
same order. See ../reset/reset.txt.
- reset-names: May contain any/all of the following depending on the IP
configuration, in any order:
- "eqos". The reset to the entire module. The HW signal name is hreset_n
(AHB) or aresetn_i (AXI).
The following compatible values require the following set of resets:
(the reset properties may be omitted if empty)
- "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10":
- "eqos".
- "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10":
- None.
- "snps,dwc-qos-ethernet-4.10" (deprecated):
- None.
Optional properties:
- dma-coherent: Present if dma operations are coherent
- phy-reset-gpios: Phandle and specifier for any GPIO used to reset the PHY.
See ../gpio/gpio.txt.
- snps,en-lpi: If present it enables use of the AXI low-power interface
- snps,write-requests: Number of write requests that the AXI port can issue.
It depends on the SoC configuration.
- snps,read-requests: Number of read requests that the AXI port can issue.
It depends on the SoC configuration.
- snps,burst-map: Bitmap of allowed AXI burst lengths, with the LSB
representing 4, then 8 etc.
- snps,txpbl: DMA Programmable burst length for the TX DMA
- snps,rxpbl: DMA Programmable burst length for the RX DMA
- snps,en-tx-lpi-clockgating: Enable gating of the MAC TX clock during
TX low-power mode.
- phy-handle: See ethernet.txt file in the same directory
- mdio device tree subnode: When the GMAC has a phy connected to its local
mdio, there must be device tree subnode with the following
required properties:
- compatible: Must be "snps,dwc-qos-ethernet-mdio".
- #address-cells: Must be <1>.
- #size-cells: Must be <0>.
For each phy on the mdio bus, there must be a node with the following
fields:
- reg: phy id used to communicate to phy.
- device_type: Must be "ethernet-phy".
- fixed-mode device tree subnode: see fixed-link.txt in the same directory
The MAC address will be determined using the optional properties
defined in ethernet.txt.
Examples:
ethernet2@40010000 {
clock-names = "phy_ref_clk", "apb_pclk";
clocks = <&clkc 17>, <&clkc 15>;
compatible = "snps,dwc-qos-ethernet-4.10";
interrupt-parent = <&intc>;
interrupts = <0x0 0x1e 0x4>;
reg = <0x40010000 0x4000>;
phy-handle = <&phy2>;
phy-mode = "gmii";
phy-reset-gpios = <&gpioctlr 43 GPIO_ACTIVE_LOW>;
snps,en-tx-lpi-clockgating;
snps,en-lpi;
snps,write-requests = <2>;
snps,read-requests = <16>;
snps,burst-map = <0x7>;
snps,txpbl = <8>;
snps,rxpbl = <2>;
dma-coherent;
mdio {
#address-cells = <0x1>;
#size-cells = <0x0>;
phy2: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
device_type = "ethernet-phy";
reg = <0x1>;
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Synopsys DWC Ethernet QoS 4.10
1-11이 binding은 deprecated지만 계속 지원됩니다. 새 기능은 가급적 STMMAC binding 문서에 추가해야 합니다.
Synopsys DesignWare Ethernet QoS IP는 bus type, clock/reset 구조와 feature 구성이 다양하므로 여러 속성이나 목록 항목이 선택이거나 특정 hardware 구성에서만 필수입니다.
DWC QoS compatible
12-21Axis ARTPEC-6에서는 `axis,artpec6-eqos`와 `snps,dwc-qos-ethernet-4.10`, NVIDIA Tegra186에서는 `nvidia,tegra186-eqos`와 `snps,dwc-qos-ethernet-4.10`을 함께 사용합니다.
`snps,dwc-qos-ethernet-4.10` 단독 조합은 deprecated이며 이전 binding revision 호환을 위해 지원합니다. 이는 Axis ARTPEC-6 조합과 동등하게 처리합니다.
Register와 clock 이름
22-70`reg`는 장치 register 주소와 길이입니다. `clocks`는 `clock-names` 각 항목과 같은 순서의 phandle/clock specifier이며 `../clock/clock-bindings.txt`를 따릅니다.
`tx`는 `clk_tx_i`인 EQOS transmit path clock입니다. GMII/RGMII에서는 PHY TX path도 구동할 수 있고 다른 구성에서는 `tx_125`, `rmii` 같은 clock이 PHY TX path를 구동할 수 있습니다.
`rx`는 `clk_rx_i`인 receive path clock입니다. GMII/RGMII에서는 PHY RX output에서 파생될 수 있습니다. PHY clock이 중간 logic 없이 EQOS에 직접 들어가면 DT에 표현하지 않아도 되지만 SoC가 software-controlled gate 같은 logic을 추가하면 표현해야 합니다.
`slave_bus`는 CPU/slave-bus CSR interface clock으로 APB, AHB, AXI 등에 적용하며 `hclk_i` 또는 `clk_csr_i`입니다. `master_bus`는 master/slave bus clock이 분리된 경우의 master interface clock으로 `hclk_i` 또는 `aclk_i`입니다. `ptp_ref`는 `clk_ptp_ref_i` PTP reference clock입니다.
Deprecated `phy_ref_clk`는 `tx`, deprecated `apb_pclk`는 `slave_bus`와 동등합니다. 향후 `clk_rx_125_i`, `clk_tx_125_i`, `clk_pmarx_0_i`, `clk_pmarx1_i`, `clk_rmii_i`, `clk_revmii_rx_i`, `clk_revmii_tx_i`를 별도 이름으로 추가해야 할 수 있습니다. 여러 PHY interface mux 구성에서 각 RX clock을 명시적으로 제어할 수 있도록 이름을 재사용하지 않고 각각 추가해야 합니다.
Compatible별 clock과 reset
71-103원문의 compatible별 필수 clock과 reset 집합을 구조화했습니다.
`interrupts`는 core combined interrupt, `phy-mode`는 `ethernet.txt` 정의입니다. `resets`는 `reset-names`와 같은 순서의 reset phandle/specifier이며 `../reset/reset.txt`를 따릅니다. `eqos` reset은 전체 module의 `hreset_n`(AHB) 또는 `aresetn_i`(AXI)입니다. 빈 reset 집합이면 reset 속성을 생략할 수 있습니다.
DWC QoS 선택 속성
104-136`dma-coherent`는 coherent DMA, `phy-reset-gpios`는 PHY reset GPIO입니다. `snps,en-lpi`는 AXI low-power interface, `snps,en-tx-lpi-clockgating`은 TX low-power mode의 MAC TX clock gating을 enable합니다.
`snps,write-requests`, `snps,read-requests`는 AXI port가 issue할 수 있는 write/read request 수입니다. `snps,burst-map`은 LSB가 4, 다음이 8인 허용 AXI burst length bitmap입니다. `snps,txpbl`, `snps,rxpbl`은 TX/RX DMA Programmable Burst Length입니다.
Local MDIO에 PHY가 연결되면 `compatible = "snps,dwc-qos-ethernet-mdio"`, `#address-cells = <1>`, `#size-cells = <0>`인 subnode가 필요합니다. 각 PHY node는 통신에 쓰는 PHY ID `reg`, `device_type = "ethernet-phy"`를 가지며 fixed mode는 `fixed-link.txt`를 따릅니다.
`phy-handle`과 MAC address 속성은 `ethernet.txt`를 따릅니다.
DWC QoS 예제
137-168예제는 deprecated clock 이름 두 개, GMII mode, active-low PHY reset GPIO 43, AXI LPI와 TX clock gating을 사용합니다. Write/read request는 2/16, burst map은 `0x7`, TX/RX PBL은 8/2이며 MDIO 주소 1의 Clause 22 PHY를 연결합니다.
ethernet2@40010000 {
clock-names = "phy_ref_clk", "apb_pclk";
clocks = <&clkc 17>, <&clkc 15>;
compatible = "snps,dwc-qos-ethernet-4.10";
interrupt-parent = <&intc>;
interrupts = <0x0 0x1e 0x4>;
reg = <0x40010000 0x4000>;
phy-handle = <&phy2>;
phy-mode = "gmii";
phy-reset-gpios = <&gpioctlr 43 GPIO_ACTIVE_LOW>;
snps,en-tx-lpi-clockgating;
snps,en-lpi;
snps,write-requests = <2>;
snps,read-requests = <16>;
snps,burst-map = <0x7>;
snps,txpbl = <8>;
snps,rxpbl = <2>;
dma-coherent;
mdio {
#address-cells = <0x1>;
#size-cells = <0x0>;
phy2: phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
device_type = "ethernet-phy";
reg = <0x1>;
};
};
};
요약과 해설
snps,dwc-qos-ethernet.txt:1-168Deprecated binding의 compatible별 필수 resource를 표로 정리합니다.