← Documents Documentation/devicetree/bindings/net/sti-dwmac.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

STMicroelectronics STi DWMAC

STiH407 DWMAC glue logic의 syscon, retiming과 clock binding입니다.

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

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

1. 요약·해설

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

요약과 해설

sti-dwmac.txt:1-59

STMMAC core 위에 추가되는 STi glue register 설정을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 STMicroelectronics SoC DWMAC glue layer controller
2
3 This file documents differences between the core properties in
4 Documentation/devicetree/bindings/net/stmmac.txt
5 and what is needed on STi platforms to program the stmmac glue logic.
6
7 The device node has following properties.
8
9 Required properties:
10 - compatible : "st,stih407-dwmac"
11 - st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
12 encompases the glue register, and the offset of the control register.
13 - st,gmac_en: this is to enable the gmac into a dedicated sysctl control
14 register available on STiH407 SoC.
15 - pinctrl-0: pin-control for all the MII mode supported.
16
17 Optional properties:
18 - resets : phandle pointing to the system reset controller with correct
19 reset line index for ethernet reset.
20 - st,ext-phyclk: valid only for RMII where PHY can generate 50MHz clock or
21 MAC can generate it.
22 - st,tx-retime-src: This specifies which clk is wired up to the mac for
23 retimeing tx lines. This is totally board dependent and can take one of the
24 possible values from "txclk", "clk_125" or "clkgen".
25 If not passed, the internal clock will be used by default.
26 - sti-ethclk: this is the phy clock.
27 - sti-clkconf: this is an extra sysconfig register, available in new SoCs,
28 to program the clk retiming.
29 - st,gmac_en: to enable the GMAC, this only is present in some SoCs; e.g.
30 STiH407.
31
32 Example:
33
34 ethernet0: dwmac@9630000 {
35 device_type = "network";
36 compatible = "st,stih407-dwmac", "snps,dwmac", "snps,dwmac-3.710";
37 reg = <0x9630000 0x8000>;
38 reg-names = "stmmaceth";
39
40 st,syscon = <&syscfg_sbc_reg 0x80>;
41 st,gmac_en;
42 resets = <&softreset STIH407_ETH1_SOFTRESET>;
43 reset-names = "stmmaceth";
44
45 interrupts = <GIC_SPI 98 IRQ_TYPE_NONE>,
46 <GIC_SPI 99 IRQ_TYPE_NONE>,
47 <GIC_SPI 100 IRQ_TYPE_NONE>;
48 interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
49
50 snps,pbl = <32>;
51 snps,mixed-burst;
52
53 pinctrl-names = "default";
54 pinctrl-0 = <&pinctrl_rgmii1>;
55
56 clock-names = "stmmaceth", "sti-ethclk";
57 clocks = <&CLK_S_C0_FLEXGEN CLK_EXT2F_A9>,
58 <&CLK_S_C0_FLEXGEN CLK_ETH_PHY>;
59 };
60

3. 한국어 전문 번역

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

STi DWMAC glue layer

1-8

이 문서는 `Documentation/devicetree/bindings/net/stmmac.txt`의 core 속성과 STi platform에서 STMMAC glue logic을 program할 때 필요한 차이를 설명합니다.

STi 필수 속성

9-16

필수 `compatible`은 `st,stih407-dwmac`입니다. `st,syscon`은 glue register를 포함한 syscon node phandle과 control register offset의 쌍입니다.

`st,gmac_en`은 STiH407의 dedicated sysctl control register에서 GMAC을 enable하고 `pinctrl-0`은 지원하는 모든 MII mode의 pin control입니다.

STi 선택 속성

17-31

`resets`는 Ethernet reset line index를 포함한 system reset controller phandle입니다. `st,ext-phyclk`는 PHY 또는 MAC이 50MHz clock을 생성할 수 있는 RMII에서만 유효합니다.

`st,tx-retime-src`는 TX line retiming을 위해 MAC에 연결된 board-dependent clock으로 `txclk`, `clk_125`, `clkgen` 중 하나입니다. 생략하면 internal clock을 사용합니다.

`sti-ethclk`는 PHY clock, `sti-clkconf`는 새 SoC에서 clock retiming을 program하는 추가 sysconfig register입니다. `st,gmac_en`은 STiH407 같은 일부 SoC에만 존재합니다.

STiH407 예제

32-59

예제는 STiH407/Synopsys DWMAC 3.710, syscon offset `0x80`, Ethernet soft reset과 MAC/wakeup/LPI interrupt 98-100을 사용합니다. PBL 32와 mixed burst, RGMII pinctrl, STMMAC/PHY clock 두 개를 구성합니다.

ethernet0: dwmac@9630000 {
        device_type = "network";
        compatible = "st,stih407-dwmac", "snps,dwmac", "snps,dwmac-3.710";
        reg = <0x9630000 0x8000>;
        reg-names = "stmmaceth";

        st,syscon = <&syscfg_sbc_reg 0x80>;
        st,gmac_en;
        resets = <&softreset STIH407_ETH1_SOFTRESET>;
        reset-names = "stmmaceth";

        interrupts = <GIC_SPI 98 IRQ_TYPE_NONE>,
                     <GIC_SPI 99 IRQ_TYPE_NONE>,
                     <GIC_SPI 100 IRQ_TYPE_NONE>;
        interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";

        snps,pbl = <32>;
        snps,mixed-burst;

        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_rgmii1>;

        clock-names = "stmmaceth", "sti-ethclk";
        clocks = <&CLK_S_C0_FLEXGEN CLK_EXT2F_A9>,
                 <&CLK_S_C0_FLEXGEN CLK_ETH_PHY>;
};