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)