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: ethernet CPSW2G

Part Number: TDA4VM
Other Parts Discussed in Thread: PCM3168A,

Dear Experts :

  Recently, when I was debugging Ethernet on our own hardware, I encountered a problem and wanted to consult you,the PHY chip we use is dp83822,cpsw2g Ethernet interface。When the network port of our own hardware circuit board is connected to the router , use the  "ifconfig" command to view the network port information,the network port does not obtain the IP address(the ethernet interface we use is eth0 ) , and the following kernel crash message appears :

ifco[ 121.916502] ------------[ cut here ]------------
[ 121.921122] NETDEV WATCHDOG: eth0 (am65-cpsw-nuss): transmit queue 0 timed out
[ 121.928376] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:442 dev_watchdog+0x300/0x308
[ 121.936617] Modules linked in: xhci_plat_hcd xhci_hcd ti_am335x_adc kfifo_buf rpmsg_char cdns3 udc_core roles irq_pruss_intc pru_rproc icss_iep omap_rng rng_core cdns_csi2rx usbcore usb_common crct10dif_ce snd_soc_j721e_evm ti_j721e_cpsw_virt_mac phy_can_transceiver m_can_platform m_can can_dev ti_am335x_tscadc pruss cdns_mhdp8546 ti_k3_r5_remoteproc sa2ul sha512_generic authenc ti_k3_dsp_remoteproc virtio_rpmsg_bus vxd_dec cdns_dphy j721e_csi2rx videobuf2_dma_sg v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common bluetooth ov5640 ecdh_generic v4l2_fwnode ecc rfkill snd_soc_pcm3168a_i2c snd_soc_pcm3168a ina2xx pvrsrvkm(O) cdns3_ti rti_wdt sch_fq_codel rpmsg_kdrv_switch cryptodev(O) ipv6
[ 122.000081] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 5.10.41-g4c2eade9f7 #6
[ 122.008495] Hardware name: Texas Instruments K3 J721E SoC (DT)
[ 122.014311] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--)
[ 122.020299] pc : dev_watchdog+0x300/0x308
[ 122.024293] lr : dev_watchdog+0x300/0x308
[ 122.028286] sp : ffff80001136fdb0
[ 122.031587] x29: ffff80001136fdb0 x28: ffff0008026b6940
[ 122.036884] x27: 0000000000000004 x26: 0000000000000140
[ 122.042181] x25: 00000000ffffffff x24: 0000000000000000
[ 122.047478] x23: ffff0008026b539c x22: ffff0008026b5000
[ 122.052774] x21: ffff0008026b5440 x20: ffff800011131000
[ 122.058070] x19: 0000000000000000 x18: 0000000000000010
[ 122.063367] x17: 0000000000000000 x16: 0000000000000000
[ 122.068662] x15: ffff80001113be30 x14: 0000000000000481
[ 122.073959] x13: ffff80001113be30 x12: 00000000ffffffea
[ 122.079255] x11: ffff8000111ba360 x10: ffff8000111a2320
[ 122.084550] x9 : ffff8000111a2378 x8 : 0000000000017fe8
[ 122.089846] x7 : c0000000ffffefff x6 : 0000000000000003
[ 122.095142] x5 : 0000000000000000 x4 : 0000000000000000
[ 122.100439] x3 : 0000000000000100 x2 : 0000000000000100
[ 122.105736] x1 : cafeeac8ef3e5d00 x0 : 0000000000000000
[ 122.111033] Call trace:
[ 122.113468] dev_watchdog+0x300/0x308
[ 122.117120] call_timer_fn.isra.0+0x24/0x80
[ 122.121288] run_timer_softirq+0x3f0/0x418
[ 122.125371] efi_header_end+0x120/0x268
[ 122.129194] irq_exit+0xc0/0xe0
[ 122.132322] __handle_domain_irq+0x68/0xc0
[ 122.136404] gic_handle_irq+0x58/0x128
[ 122.140138] el1_irq+0xcc/0x180
[ 122.143268] arch_cpu_idle+0x18/0x28
[ 122.146829] default_idle_call+0x20/0x68
[ 122.150738] do_idle+0xc0/0x128
[ 122.153864] cpu_startup_entry+0x28/0x60
[ 122.157772] rest_init+0xd4/0xe4
[ 122.160990] arch_call_rest_init+0x10/0x1c
[ 122.165071] start_kernel+0x49c/0x4d4
[ 122.168719] ---[ end trace 3d4497e978e490a7 ]--

  Then the serial port continuously prints the following log:

      am65-cpsw-nuss 46000000.ethernet eth0: txq:0 DRV_XOFF:0 tmo:7976 dql_avail:-70 free_desc:510

Code modification::

1) Compile the dp83822 driver to the kernel, and add in the dp83822 driver:through phy_ Write writes 0x21 to register 0x0017 (mii_dp83822_rcsr) to enable RMII mode of dp83822 (there is no configuration on the hardware,software configuration is required ), and confirms that the driver has run by adding print information。

2)  The pin multiplexing of the device tree is modified. The TDA4VM pin connected to dp83822 is multiplexed from rgmii mode to RMII mode, and the PHY chip address is also changed from 0 to 1 according to the hardware (the Development board is dp83867 + rgmii, and our own hardware is dp83822 + RMII) 

  • Hi,

    Have you checked in Uboot first ? It's easier to test a new PHY there.

    [ 121.921122] NETDEV WATCHDOG: eth0 (am65-cpsw-nuss): transmit queue 0 timed out

    The Tx queue is getting timed out indicating that packets are not being sent. It could be that the DT changes are not done correctly leading to incorrect pinmux and Tx not working. Please confirm pinmuxing by following this thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/927526/faq-ccs-tda4vm-pinmux-guide-for-jacinto-processors

    With PHY's, this is the order of probability (for issues)

    1. Pinmuxing issues

    2. Driver initialization

    3. HW connections (for new boards)

    Regards

    Vineet

  • Hi,Vineet

    Thank you very much for your reply,I confirmed your suggestion and the results are as follows:

    1.Have you checked in Uboot first ? It's easier to test a new PHY there

       At present, there is no dp83822 driver file in uboot, so it is impossible to test PHY chip dp83822 in uboot 

    2.Pinmuxing issues

      The Ethernet IO port we use is the same as the development board (cpsw2g). We only refer to the data sheet to reuse the IO port function from rgmii mode to RMII mode. I confirmed that it should be no problem 

    3. Driver initialization

    I compiled the dp83822 driver into the kernel, learned that the driver had run by adding print information in the driver file dp83822.c, and checked and generated the eth0 network interface through the' ifconfig' command .

    4.HW connections (for new boards)

      'RMII master Sgnaling' connection method is adopted for dp83822 hardware. I want to know what the difference of tda4vm software configuration.for RMII master and RMII slave are used for dp83822 chip. 

  • Hi Vineet:

    Thanks for your help,I solved this problem by initializing the relevant registers of dp83822 in the driver. At present, the system can normally obtain the IP address and Ping the network