如何在 ethernet@6800000 中同时启用 switch 和 phy

Hi NVIDIA team,

我们设计了一款 carrier board,其网络模块结构如下:

BSP 使用 NVIDIA Jetson Linux 36.4.3,按照 nvidia-oot/Documentation 中 tegra-nvethernet.yaml 配置设备树节点:

eth0: ethernet@6800000 { 
    status = "okay"

    compatible = "nvidia,nveqos";

    nvidia,mac-addr-idx = <0>;
    
    nvidia,max-platform-mtu = <1500>; 
    
    nvidia,pause_frames = <1>; 

    phy-mode = "sgmii";
    nvidia,phy-reset-gpio = <&gpio TEGRA234_MAIN_GPIO(Y, 1) 0>; //pending
    
    /* KSZ9567 */
    fixed-link {
    	speed = <1000>;
    	full-duplex;
	};

    mdio {
        compatible = "nvidia,eqos-mdio";
        #address-cells = <1>;
        #size-cells = <0>;

        /* LAN8872 */
        phy@0 {
            compatible = "ethernet-phy-ieee802.3-c45";
            reg = <0x0>; //pending
            nvidia,phy-rst-pdelay-msec = <150>; /* msec */
            nvidia,phy-rst-duration-usec = <221000>; /* usec */
            interrupt-parent = <&gpio>;
            interrupts = <TEGRA234_MAIN_GPIO(Y, 3) IRQ_TYPE_LEVEL_LOW>;
        };
    };
}

我有以下几个疑问:

  1. 我的设备树配置是否合理,该配置是否足够让EQOS正确管理 KSZ9567 与 LAN8872
  2. 我是否需要配置 tegra-nvethernet.yaml 中的 nvidia,mdio_addr 来让驱动程序正确与PHY建立通信,按照我的经验通常只用配置 mdio.phy.reg
  3. nvidia,phy-rst-pdelay-msec 与 nvidia,phy-rst-duration-usec 配置是 eqos 驱动程序获取并使用,还是需要PHY驱动程序处理。
  4. 对于 nvidia,phy-reset-gpio 属性,如果我后续的设计中 mdio 需要管理多个PHY,应该如何配置。
  5. PHY驱动程序中 phydev->interface 值是否依赖设备树中 phy-mode 属性给出,如果我后续的设计中 mdio 需要管理多个PHY,应该如何配置 phy-mode 属性。

Hi,

What is that MDIO hardware connected on Jetson and what is that RGMII connected?

I mean what pins are you using here?

Hello,

I am using the RGMII_TX/RX pins from the pin multiplexing table to connect to the KSZ9567 switch. The RGMII_SMA_MDIO/MDC pins are used to configure the registers of the LAN8872 PHY, and the SPI2 pins are used to configure the registers of the KSZ9567 and LAN9373.


This design is not supported.

Oh no, our PCB schematic is nearly finished.
Does “unsupported design” mean that it’s not feasible to use the RGMII module to simultaneously connect both the Ethernet switch and the Ethernet PHY? Does the corresponding device tree node ethernet@6800000 only support either fixed-link or phy-handle functionality, or are there other design issues?


Let me know if you’d like any adjustments!

Yes, not possible to support both of them. Only one of them could be in use.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.