Use the KSZ9896 PHY to replace the Jetson-AGX-Xavier PHY

@WayneWWW,Hello,The question I asked last time:https://forums.developer.nvidia.com/t/hope-to-get-technical-guidance-use-the-ksz9896-phy-to-replace-the-jetson-agx-xavier-phy-driver-via-the-mdio-interface/239243

when I communicated with the supplier, I encountered some new problems, this link:
https://github.com/Microchip-Ethernet/EVB-KSZ9477/issues/89

Seems to be a question about eqos_xx_clk errors.thank you.

1 Like

@WayneWWW,hello,A problem with the network caused the release twice, sorry

@WayneWWW,Then let’s take this topic as a discussion and delete this topic.

請問一下你們確定 "failed to get eqos_xxx_clk"這件事情跟你們的issue有關連嗎?

因為我們devkit本身就有這個log存在了 但是功能上沒有問題.

[ 9.214031] nvethernet 2490000.ethernet: Failed to read DMA Tx ring size, using default [1024]
[ 9.222461] nvethernet 2490000.ethernet: Failed to read DMA Tx ring size, using default [1024]
[ 9.239015] nvethernet 2490000.ethernet: failed to get eqos_rx_m clk
[ 9.240307] nvethernet 2490000.ethernet: failed to get eqos_rx_input clk
[ 9.243883] nvethernet 2490000.ethernet: failed to get eqos_tx_divider clk

那个issue是在jetson 的设备树设置fixed-link模式,Microchip说他们这样设置网络是可以正常工作的,我按照他们给的设备树来设置,但是很遗憾没有成功

ok, 所以你們現在的設置是fixed-link嗎? 能分享完整的device tree跟dmesg嗎?

tegra194-p2888-0001-p2822-0000.dts (459.9 KB)

这个是我们的device tree,型号是jetson agx xavier 32g

ksz_driver_v1.2.pdf (1.3 MB)
这是Microchip的中文指导文档

是的,要设置fixed-link模式,
但是: 1.fixed-link同时也需要mac层驱动的支持;
2.对于1000M RGMII接口的switch,可能需要配置switch或CPU mac端的RGMII delay才能保证RGMII正常工作

dmesg麻煩也分享一下 謝謝

dmesg.txt (78.6 KB)
这个是完整的dmesg

Hi,

請問一下MIcrochip能否也提供一份英文的guideline文件給我們?

https://github.com/Microchip-Ethernet/EVB-KSZ9477/tree/master/doc
@WayneWWW

英文的指导文档都在github上,应该都可以找的到,或者readme文档

就是我发给你的中文指导文档是别人发给我的,并不是MIcrochip提供的

中文的指导文档可以拷贝文字进行翻译,真的是抱歉,thank you

https://www.microchip.com/en-us/search?searchQuery=KSZ9896&category=Product%20Documents&fq=start%3D0%26rows%3D10
这个是数据手册

This is the latest dmesg information
out.txt (76.2 KB)
This is my device tree:
c.dts (459.9 KB)

Then upload the c.dts to Jetson board and execute it on the board:

➜  ~ cat /boot/extlinux/extlinux.conf    
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options              

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/dtb/kernel_tegra194-p2888-0001-p2822-0000.dtb
      INITRD /boot/initrd
      APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype
=ext4 sdhci_tegra.en_boot_part_access=1 nv-auto-config

You can tell what the device tree file path is

/boot/dtb/kernel_tegra194-p2888-0001-p2822-0000.dtb

Convert the dts file I uploaded to the board to the dtb file, execute and replace:

sudo dtc -I dts -O dtb c.dts > kernel_tegra194-p2888-0001-p2822-00002.dtb

sudo cp kernel_tegra194-p2888-0001-p2822-00002.dtb /boot/dtb/kernel_tegra194-p2888-0001-p2822-0000.dtb

Restart to check whether fixed-link takes effect, No IP address is assigned,as follows:
➜  ~ sudo ethtool  eth0    
[sudo] password for nvidia: 
Settings for eth0:
        Supported ports: [ TP MII ]      
        Supported link modes:   1000baseT/Full 
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

Hi,

可以請教一下你最後分享的這份 c.dts跟先前分享的tegra194-p2888-0001-p2822-0000.dts 改了哪些地方?
另外我們想問目前最新碰到的問題是什麼? 看起來你們eth0 interface 已經起來了

[ 12.659656] nvethernet 2490000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

想請你們分享以下測試跟結果給我們

  1. ethtool -S eth0 的結果
  2. 先ping過之後再dump ifconfig eth0
  3. device端跟host端的tcpdump結果 並且確認packet有沒有收到
  4. switch端的packet counter stats

Could you share what is the difference between this c.dts and the tegra194-p2888-0001-p2822-0000.dts you shared in previous comments?

Also, what is current situation here? Looks like your eth0 interface is up.

1.Please get the “ethtool -S eth0” stats.
2. Ifconfig output when ping command is issued.
3. Check the tcpdump on both device and host side if packets are getting recevied or not.
4. Check the packet counter stats from switch side.