Other Parts Discussed in Thread: DP83620
主题中讨论的其他器件:DP83620、 DP83869
您好、
我们正在 使用光纤模式将自定义 PCB 设计从 DP83620 迁移到 DP83869、目的是能够接收 100 和 1000 个 SFP、并与旧设计兼容。
采用 DP83620 的原始设计运行良好、但我们现在无法使用新接口、无论是使用旧的 100Mbps SFP 还是使用新的 1000Mbps SFP。
附件是原理图中有意义的部分: ethernet.pdf
SFP 笼和 DP83869 本身。 PHY 连接到 Artix 7 FPGA、该 FPGA 适合 Xilinx 的 AXI 1G/2.5G 以太网子系统 IP 内核。 在旧电路板中、该内核设置为 MII 模式、现在它配置为 RGMII 模式、这是唯一的区别。
还附带了器件树条目。 新旧设计之间的唯一区别是 phy 模式从“mii"更“更改为“RGMII/",“,并且、并且在新设计中 PHY 地址从旧设计中的 1 更改为 0(尽管我们可能也会将该默认值更改为 1,因此这减少了需要担心的一件事)。
可悲的是、我们无法路由专用 SFP 引脚、如 Presence 或 LOS、但旧设计也是如此、在旧设计中、我们不会依赖这些引脚来实现任何目的。 我们已经尝试使用旧的 100Mbps SFP 将 ti op-mode 更改为 RGMII_100_BASE 选项、但在任何情况下系统都不会建立连接。
内核确实看到了 SFP、 似乎与 PHY 通信、但不存在连接。 发生什么事了?
这是 连接了 DP83869_RGMII_100_BASE 且连接了旧版 100Mbps SFP 的内核输出:
sfp amba_pl:sfp: Host maximum power 1.0Wsfp amba_pl:sfp: No tx_disable pin: SFP modules will always be emitting.sfp amba_pl:sfp: module OEM SFP-5000-RJ45A rev A sn HLY23C0619012 dc 230619
xilinx_axienet 40c00000.ethernet eth0: PHY [axienet-40c00000:00] driver [TI DP83869] (irq=POLL)xilinx_axienet 40c00000.ethernet eth0: configuring for phy/rgmii link mode
# ethtool eth0Settings for eth0: Supported ports: [ TP MII FIBRE ] Supported link modes: 100baseFX/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: Not reported Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Port: FIBRE PHYAD: 0 Transceiver: external Auto-negotiation: off Link detected: no
将 旧 SFP 替换为新 SFP、再将 ti 的 op-mode 替换为 DP83869_RGMII_100_BASE、可实现以下输出:
sfp amba_pl:sfp:主机最大功率 1.0W
sfp amba_pl:sfp:无 tx_disable 引脚:sfp 模块将始终发射。
SFP amba_pl:SFP:模块 OEM SFP-GE-T 修订版 SN CSGE1NC2812 dc 23122701
# ethtool eth0Settings for eth0: Supported ports: [ TP MII FIBRE ] Supported link modes: 10baseT/Full 1000baseX/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: Not reported Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: 10Mb/s Duplex: Half Port: FIBRE PHYAD: 0 Transceiver: external Auto-negotiation: off Link detected: no
此输出有点令人困惑、因为它将 10baseT 和 1000baseX 列为链路模式、速度为 10Mb。 我手动将其更改为 1000
# ethtool -s eth0 speed 1000
# ethtool eth0|grep Speed Speed: 1000Mb/s
但没有什么有用的将会出来。
会发生什么事?
sfp0: sfp {
compatible = "sff,sfp";
i2c-bus = <&axi_iic_0>;
};
axi_ethernet_0_dma: dma@41e00000 {
compatible = "notxlnx,axi-dma-1.00.a";
#dma-cells = <1>;
reg = <0x41e00000 0x10000>;
interrupt-parent = <µblaze_0_axi_intc>;
interrupts = <7 8>;
xlnx,addrwidth = <32>; // Tamaño de dirección en bits
xlnx,datawidth = <32>;
xlnx,include-sg;
xlnx,sg-length-width = <16>;
xlnx,include-dre = <1>;
xlnx,axistream-connected = <1>;
xlnx,irq-delay = <0>;
dma-channels = <2>;
clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk", "m_axi_sg_aclk";
clocks = <&clk_bus_0>, <&clk_bus_0>, <&clk_bus_0>, <&clk_bus_0>;
dma-channel@41e00000 {
compatible = "xlnx,axi-dma-mm2s-channel";
xlnx,include-dre = <1>;
interrupts = <7>;
xlnx,datawidth = <32>;
};
dma-channel@41e00030 {
compatible = "xlnx,axi-dma-s2mm-channel";
xlnx,include-dre = <1>;
interrupts = <8>;
xlnx,datawidth = <32>;
};
};
axi_ethernet_eth: ethernet@40c00000 {
compatible = "xlnx,axi-ethernet-1.00.a";
reg = <0x40c00000 0x40000>;
phy-handle = <&phy1>;
interrupt-parent = <µblaze_0_axi_intc>;
interrupts = <3>;
phy-mode = "rgmii";
xlnx,rxmem = <0x1000>;
max-speed = <100000>;
xlnx,txcsum = <0x2>;
xlnx,rxcsum = <0x2>;
clock-names = "s_axi_lite_clk", "axis_clk", "ref_clk", "mgt_clk";
clocks = <&clk_bus_0>, <&clk_bus_0>, <&clk_bus_0>, <&clk_bus_0>;
axistream-connected = <&axi_ethernet_0_dma>;
/* dmas = <&axi_ethernet_0_dma 0>, <&axi_ethernet_0_dma 1>; */
dma-names = "tx_chan0", "rx_chan0";
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy1: ethernet-phy@0 {
compatible = "ethernet-phy-id2000.a0f1";
device_type = "ethernet-phy";
reg = <0>;
sfp = <&sfp0>;
ti,clk-output-sel = <DP83869_CLK_O_SEL_REF_CLK>;
ti,op-mode =
<DP83869_RGMII_1000_BASE>;
};
};
};