This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TDA4VM:TDA4VM 0902:串行器/解串器2、4 x 1通道网络 CAN##39;t work

Guru**** 2481465 points
Other Parts Discussed in Thread: TDA4VM

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1419273/tda4vm-tda4vm-0902-serdes2-4-x-1-lane-net-can-t-work

器件型号:TDA4VM
主题中讨论的其他器件: TDA4VH

工具与软件:

您好!
   我想让我的器件树像这样、

  这是我的器件树代码。

   

// SPDX-License-Identifier: GPL-2.0
/**
 * DT Overlay for CPSW9G in dual port fixed-link USXGMII mode using ENET-1
 * and ENET-2 Expansion slots of J784S4 EVM.
 *
 * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/phy/phy-cadence.h>
#include <dt-bindings/phy/phy.h>

&main_cpsw0 {
	status = "okay";
	pinctrl-names = "default";
};

&main_cpsw0_port1 {
	status = "okay";
	phy-mode = "usxgmii";
	mac-address = [00 00 00 00 00 00];
	phys = <&cpsw0_phy_gmii_sel 1>, <&serdes2_usxgmii_link>;
	phy-names = "mac", "serdes";
	fixed-link {
		speed = <10000>;
		full-duplex;
	};
};

&main_cpsw0_port2 {
	status = "okay";
	phy-mode = "usxgmii";
	mac-address = [00 00 00 00 00 00];
	phys = <&cpsw0_phy_gmii_sel 2>, <&serdes2_usxgmii_link>;
	phy-names = "mac", "serdes";
	fixed-link {
		speed = <10000>;
		full-duplex;
	};
};

&main_cpsw0_port5 {
	status = "okay";
	phy-mode = "qsgmii";
	mac-address = [00 00 00 00 00 00];
	phys = <&cpsw0_phy_gmii_sel 5>, <&serdes2_sgmii_link>;
	phy-names = "mac", "serdes";
	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};
&main_cpsw0_port6 {
	status = "okay";
	phy-mode = "qsgmii";
	mac-address = [00 00 00 00 00 00];
	phys = <&cpsw0_phy_gmii_sel 6>, <&serdes2_sgmii_link>;
	phy-names = "mac", "serdes";
	fixed-link {
		speed = <1000>;
		full-duplex;
	};
};


&serdes_wiz2 {
	status = "okay";
	assigned-clock-parents = <&k3_clks 406 9>;
};

&serdes2 {
	status = "okay";
	#address-cells = <1>;
	#size-cells = <0>;

	serdes2_sgmii_link: phy@0 {
		reg = <0>;
		cdns,num-lanes = <2>;
		#phy-cells = <0>;
		cdns,phy-type = <PHY_TYPE_SGMII>;
		resets = <&serdes_wiz2 1>, <&serdes_wiz2 2>;
	};

	serdes2_usxgmii_link: phy@2 {
		reg = <2>;
		cdns,num-lanes = <2>;
		#phy-cells = <0>;
		cdns,phy-type = <PHY_TYPE_USXGMII>;
		resets = <&serdes_wiz2 3>, <&serdes_wiz2 4>;
	};
	
};

&serdes_ln_ctrl {
	idle-states = <J784S4_SERDES0_LANE0_PCIE1_LANE0>, <J784S4_SERDES0_LANE1_PCIE1_LANE1>,
		      <J784S4_SERDES0_LANE2_IP3_UNUSED>, <J784S4_SERDES0_LANE3_USB>,
		      <J784S4_SERDES1_LANE0_PCIE0_LANE0>, <J784S4_SERDES1_LANE1_PCIE0_LANE1>,
		      <J784S4_SERDES1_LANE2_PCIE0_LANE2>, <J784S4_SERDES1_LANE3_PCIE0_LANE3>,
		      <J784S4_SERDES2_LANE0_QSGMII_LANE5>, <J784S4_SERDES2_LANE1_QSGMII_LANE6>,
		      <J784S4_SERDES2_LANE2_QSGMII_LANE1>, <J784S4_SERDES2_LANE3_QSGMII_LANE2>;
};

启动日志和 dmesg 输出中  

  

root@j784s4-evm:~# dmesg | grep eth
[    0.000000] psci: probing for conduit method from DT.
[    1.035384] optee: probing for conduit method.
[    1.496067] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
[    1.508918] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[    1.516125] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[    1.526416] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1
[    1.536238] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA03102, cpsw version 0x6BA82902 Ports: 9 quirks:00000000
[    1.603680] am65-cpsw-nuss c200000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
[    1.616421] am65-cpsw-nuss c200000.ethernet: Use random MAC address
[    1.622675] am65-cpsw-nuss c200000.ethernet: initialized cpsw ale version 1.4
[    1.629793] am65-cpsw-nuss c200000.ethernet: ALE Table size 64
[    1.635910] am65-cpsw-nuss c200000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0
[    2.152066] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
[    2.164927] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[    2.172134] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[    2.182401] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1
[    2.192279] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48
[    2.199929] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA03102, cpsw version 0x6BA82902 Ports: 9 quirks:00000000
[    2.326304] am65-cpsw-nuss: probe of c000000.ethernet failed with error -110
[    2.387692] am65-cpsw-nuss c200000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
[    2.400439] am65-cpsw-nuss c200000.ethernet: Use random MAC address
[    2.406694] am65-cpsw-nuss c200000.ethernet: initialized cpsw ale version 1.4
[    2.413812] am65-cpsw-nuss c200000.ethernet: ALE Table size 64
[    2.419927] am65-cpsw-nuss c200000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0
[    2.429729] am65-cpsw-nuss c200000.ethernet: set new flow-id-base 82
[    4.857992] systemd[1]: /lib/systemd/system/bt-enable.service:9: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, a.
[    4.917741] systemd[1]: /etc/systemd/system/sync-clocks.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file.
[   10.768388] am65-cpsw-nuss c200000.ethernet eth1: PHY [c200f00.mdio:00] driver [TI DP83867] (irq=POLL)
[   10.777836] am65-cpsw-nuss c200000.ethernet eth1: configuring for phy/rgmii-rxid link mode
[   10.799784] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:00] driver [TI DP83867] (irq=POLL)
[   10.809264] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[   13.900014] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   13.908755] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

  错误-110
 和禁用  
&SerDes_wiz2 {
状态="正常";
 /*Assigned-clock-parents =<&K3_CLKS 406 9>;*//* disable*/
};

将创建 eth1~4、但也不能工作。

如何解决该问题?  

谢谢

dongzhang

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您能告诉我您在设备树中修改的用途吗?

    您要实现的配置是什么?

    此致、

    Tanmay

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、  
      我需要同时使用4个网络端口、


    序列2:
    lane0在1G 下工作  
    lane1在1G 处工作  
    LANE2在10G 下工作  
    lane3在10G 下工作  
    因此、我根据 k3-j784s4-evm-usxgmii-exp1-exp2 copy.dtso 进行了一些修改

    但得到错误、[  2.326304] am65-cpsw-nuss:c000000.ethernet 的探测失败、错误为-110

    谢谢

    dongzhang

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    抱歉、错过了您之前发布的内容。

    您能否为以下寄存器提供值:

    • 0x05020404
    • 0x05020408
    • 0x0502040C
    • 0x05020480
    • 0x05020484
    • 0x05020488
    • 0x0502048C
    • 0x050204C0
    • 0x050204C4
    • 0x050204C8
    • 0x050204CC
    • 0x05020500
    • 0x05020504
    • 0x05020508
    • 0x0502050C
    • 0x05020540
    • 0x05020544
    • 0x05020548
    • 0x0502054C
    • 0x0502E000

    另外、我认为您使用的器件是 TDA4VH、而不是 TDA4VM。 您能否确认这一点。

    此致、
    Tanmay

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    抱歉、、是 TDA4VH
    关闭时 /*Assigned-clock-parents =<&K3_CLKS 406 9>;*/

    root@j784s4-evm:~# ./test_reg.sh 
    /dev/mem opened.
    Memory mapped at address 0xffffa2c62000.
    Read at address  0x05020404 (0xffffa2c62404): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffffabef4000.
    Read at address  0x05020408 (0xffffabef4408): 0x18100000
    /dev/mem opened.
    Memory mapped at address 0xffffbb1d3000.
    Read at address  0x0502040C (0xffffbb1d340c): 0xA2800000
    /dev/mem opened.
    Memory mapped at address 0xffff905c2000.
    Read at address  0x05020480 (0xffff905c2480): 0x70000000
    /dev/mem opened.
    Memory mapped at address 0xffffab146000.
    Read at address  0x05020484 (0xffffab146484): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffff9c348000.
    Read at address  0x05020488 (0xffff9c348488): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff9afe3000.
    Read at address  0x0502048C (0xffff9afe348c): 0x00000002
    /dev/mem opened.
    Memory mapped at address 0xffff86b8a000.
    Read at address  0x050204C0 (0xffff86b8a4c0): 0x70000000
    /dev/mem opened.
    Memory mapped at address 0xffffbf240000.
    Read at address  0x050204C4 (0xffffbf2404c4): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffff90ed0000.
    Read at address  0x050204C8 (0xffff90ed04c8): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff85a11000.
    Read at address  0x050204CC (0xffff85a114cc): 0x00000002
    /dev/mem opened.
    Memory mapped at address 0xffff889a5000.
    Read at address  0x05020500 (0xffff889a5500): 0x703C00C0
    /dev/mem opened.
    Memory mapped at address 0xffff9cd55000.
    Read at address  0x05020504 (0xffff9cd55504): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffffaba61000.
    Read at address  0x05020508 (0xffffaba61508): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff8f1c7000.
    Read at address  0x0502050C (0xffff8f1c750c): 0x00000012
    /dev/mem opened.
    Memory mapped at address 0xffffb1b09000.
    Read at address  0x05020540 (0xffffb1b09540): 0x703C00C0
    /dev/mem opened.
    Memory mapped at address 0xffff8343b000.
    Read at address  0x05020544 (0xffff8343b544): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffff88eb9000.
    Read at address  0x05020548 (0xffff88eb9548): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff97915000.
    Read at address  0x0502054C (0xffff9791554c): 0x00000012
    /dev/mem opened.
    Memory mapped at address 0xffffafbb1000.
    Read at address  0x0502E000 (0xffffafbb1000): 0x00C30051
    

    启用时

    root@j784s4-evm:~# ./test_reg.sh 
    /dev/mem opened.
    Memory mapped at address 0xffff8d97a000.
    Read at address  0x05020404 (0xffff8d97a404): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff89a78000.
    Read at address  0x05020408 (0xffff89a78408): 0x18100000
    /dev/mem opened.
    Memory mapped at address 0xffff93686000.
    Read at address  0x0502040C (0xffff9368640c): 0xA2800000
    /dev/mem opened.
    Memory mapped at address 0xffff95865000.
    Read at address  0x05020480 (0xffff95865480): 0x70000000
    /dev/mem opened.
    Memory mapped at address 0xffff8fde3000.
    Read at address  0x05020484 (0xffff8fde3484): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffff99677000.
    Read at address  0x05020488 (0xffff99677488): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffffa76a7000.
    Read at address  0x0502048C (0xffffa76a748c): 0x00000002
    /dev/mem opened.
    Memory mapped at address 0xffffb3789000.
    Read at address  0x050204C0 (0xffffb37894c0): 0x70000000
    /dev/mem opened.
    Memory mapped at address 0xffffa6980000.
    Read at address  0x050204C4 (0xffffa69804c4): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffffbee1e000.
    Read at address  0x050204C8 (0xffffbee1e4c8): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff95fae000.
    Read at address  0x050204CC (0xffff95fae4cc): 0x00000002
    /dev/mem opened.
    Memory mapped at address 0xffff8d73a000.
    Read at address  0x05020500 (0xffff8d73a500): 0x703C00C0
    /dev/mem opened.
    Memory mapped at address 0xffffaf66d000.
    Read at address  0x05020504 (0xffffaf66d504): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffffb9db5000.
    Read at address  0x05020508 (0xffffb9db5508): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff9443e000.
    Read at address  0x0502050C (0xffff9443e50c): 0x00000012
    /dev/mem opened.
    Memory mapped at address 0xffff97d3a000.
    Read at address  0x05020540 (0xffff97d3a540): 0x703C00C0
    /dev/mem opened.
    Memory mapped at address 0xffff99fa3000.
    Read at address  0x05020544 (0xffff99fa3544): 0x00010002
    /dev/mem opened.
    Memory mapped at address 0xffff9c065000.
    Read at address  0x05020548 (0xffff9c065548): 0x00000000
    /dev/mem opened.
    Memory mapped at address 0xffff8eb3c000.
    Read at address  0x0502054C (0xffff8eb3c54c): 0x00000012
    /dev/mem opened.
    Memory mapped at address 0xffffb861f000.
    Read at address  0x0502E000 (0xffffb861f000): 0x00820050

    dongzhang

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    正在解锁 该线程。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    当您在使用串行器/解串器进行 SGMII + USXGMII 时、需要使用多链路配置、即需要使用两个参考时钟基准、ref1时钟。
    SGMII -> REFCLK -> 100MHz
    USXGMII -> ref1clk -> 156.25MHz。

    时钟 ID -> 5、父级为9
    时钟 ID ->6、父项为10

    有关 SerDes2的时钟 ID、请参阅下面的 TISCI 文档。
    https://software-dl.ti.com/tisci/esd/09_02_07/5_soc_doc/j784s4/clocks.html#clocks-for-serdes-10g2-device

    此致、
    Sudheer

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、
     抱歉、我需要在几天内修改和测试此问题。
    谢谢
    东张

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

     抱歉、我需要在几天内修改并测试此问题。

    当然可以、请查看以上建议的更改、如果仍有问题、请告诉我们。

    此致、
    Sudheer