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.

Linux/DP83TC811S-Q1: No SGMII signal output after installed dp83tc811.ko & qcom_emac.ko

Part Number: DP83TC811S-Q1
Other Parts Discussed in Thread: DP83TC811, DP83TC811SEVM, DP83TC811EVM

Tool/software: Linux

Hi,

After installed driver modules, kernel tried but can't connect external phy dp83tc811s. Detailed as follows:

---- 1 ----

root@mdm9607:/usr/lib/modules# insmod dp83tc811.ko

root@mdm9607:/usr/lib/modules# insmod qcom_emac.ko

Here we got log from kernel:

[ 20.463954] [emac_probe] Start probe, dma_set_mask_and_coherent.adpt = 0x0
[ 20.503511] [emac_probe] Start probe, alloc_etherdev. adpt = 0x0
[ 20.524359] [emac_probe] Middile point1, adpt = 0xca47b500
[ 20.528811] [emac_probe] Start probe, set IRQ. adpt = 0xca47b500
[ 20.567384] [emac_probe] Start probe, emac_get_resources. adpt = 0xca47b500
[ 20.580071] [msm_emac_pinctrl_init] After get pin resource, output reset for 20ms.
[ 20.649560] [emac_probe] Start probe, msm_emac_ldo_init.adpt = 0xca47b500
[ 20.686913] [emac_probe] Start probe, emac_clks_phase1_init.adpt = 0xca47b500
[ 20.693288] [emac_probe] Start probe, emac_set_ethtool_ops.adpt = 0xca47b500
[ 20.713167] [emac_probe] Start probe, emac_phy_config_internal.adpt = 0xca47b500
[ 20.737083] [emac_phy_config_internal] Phy mode = 3.
[ 20.754374] [emac_probe] Start probe, emac_clks_phase2_init.adpt = 0xca47b500
[ 20.773631] [emac_probe] Start probe, emac_reg_r32.adpt = 0xca47b500
[ 20.782877] [emac_probe] Start probe, emac_reg_r32.hw_ver = 0x10030000
[ 20.810093] [emac_probe] Start probe, emac_init_adapter.adpt = 0xca47b500
[ 20.837950] [emac_probe] Start probe, adpt->gpio_on.adpt = 0xca47b500
[ 20.868009] [emac_probe] Start probe, emac_phy_config_external.adpt = 0xca47b500
[ 20.958950] libphy: emac-mdio: probed
[ 20.961597] [get_phy_device] mii_bus = 0xca4b6800, addr(the No.x phy) = 0, is_c45 = 0, MII_PHYSID1 = 0x2, MII_PHYSID2 = 0x3
[ 21.025501] [get_phy_device] phy_id = 0x200196ff
[ 21.047171] phydrv->phy_id = 0x2000a251, phydev->phy_id = 0x200196ff, phydrv->phy_id_mask = 0xfffffff0
[ 21.109920] phydrv->phy_id = 0xffffffff, phydev->phy_id = 0x200196ff, phydrv->phy_id_mask = 0xffffffff
[ 21.158556] phydrv->phy_id = 0x200196ff, phydev->phy_id = 0x200196ff, phydrv->phy_id_mask = 0xfffffff0
[ 21.187210] [emac_phy_config_external] Phydev = 0xca4b6c00.
[ 21.191756] [emac_phy_config_external] Phy id = 0x200196ff.
[ 21.217417] [emac_probe] Start probe, emac_hw_reset_mac.adpt = 0xca47b500
[ 21.234241] [emac_probe] Start probe, emac_work_thread.

---- 2 ----

Now we can find eth0 in system, and can operate it for some case.

root@mdm9607:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:47

---- 3 ----

For other more cases we can't operate eth0 successfully.

root@mdm9607:~# ethtool eth0

Settings for eth0:
Cannot get device settings: Invalid argument --- CANT GET INFORMATION HERE.
Supports Wake-on: pg
Wake-on: p
Current message level: 0x00007fff (32767)
drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
Link detected: no
root@mdm9607:~# ethtool -i eth0
driver: eth0 --- HERE DRIVER IS NOT DP83TC811.
version: Revision: 1.1.0.0
firmware-version:
bus-info: eth0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

root@mdm9607:~# ifconfig eth0 hw ether aa:11:22:33:44:55

root@mdm9607:~# [ 1891.737532] qcom-emac 7c40000.qcom,emac eth0: TX queues 1, TX descriptors 512
[ 1891.743637] qcom-emac 7c40000.qcom,emac eth0: RX queues 1, Rx descriptors 256
[ 1891.765380] [emac_mac_up] Calling phy_connect_direct.
[ 1891.769701] qcom-emac 7c40000.qcom,emac eth0: could not connect phy --- HERE WE CANT CONNECT PHY.
[ 1891.800917] QTI:Netlink Query to Kernel Success
[ 1892.016804] qcom-emac 7c40000.qcom,emac eth0: TX queues 1, TX descriptors 512
[ 1892.022916] qcom-emac 7c40000.qcom,emac eth0: RX queues 1, Rx descriptors 256
[ 1892.057049] [emac_mac_up] Calling phy_connect_direct.
[ 1892.061370] qcom-emac 7c40000.qcom,emac eth0: could not connect phy --- HERE WE CANT CONNECT PHY.
[ 1892.096782] QTI:Netlink Query to Kernel Success

---- 4 ----

I tried to check port configuration and signals for SGMII.

root@mdm9607:~# cat /sys/bus/mdio_bus/devices/7c40000.qcom,emac\:00/phy_id
0x200196ff --- THIS ID IS NOT MATCH SPECIFICATION PDF.
root@mdm9607:~# cat /sys/bus/mdio_bus/devices/7c40000.qcom,emac\:00/phy_interface
sgmii --- THIS PORT CONFIGURED AS SGMII, IT'S OK.

The signal from TX_M / TX_P and RX_M / RX_P we grasped by an osilloscope, were ANALOG signals and there is NO DIFFERENTAL.

Now we don't have more ideas and project is delaying :.<

Please help us~~~

  • Hi user5947325 ,

    It looks like MDC/MDIO communication to the device is not working correctly.

    Can you share the schematic?

    Regards,

    Hung Nguyen
  • Dear Nguyen,

      Thank you for your fast reply.

      We are using DP83TC811SEVM board, and Qualcomm Mdm9607 Internal Emac to contorl.

      We also have another DP83TC811EVM board (NO S for chip name), and from 2 board we can read phy chip ID through MDC / MDIO.

      For DP83TC811SEVM board, we got ID is 0x200196ff, so I still wonder it not like described in datasheet. This is suspected we also confused. If we have some user application to test MDC / MDIO?

      We use DP83TC811SEVM  board so if you need mdm9607 schematic?

  • Dear Nguyen,

     I steped into kernel and tried to get how phy chip get up, by printk during mac up. Log as below:

    [   23.084743] [emac_mac_up] Calling phy_connect_direct. adpt->phy.is_ext_phy_connect = 0

    [   23.091629] [phy_attach_direct] Calling driver->probe. d->driver = 0xbf013740

    [   23.156078] [phy_attach_direct] Get if attached. phydev->attached_dev = 0

    [   23.161837] [phy_attach_direct] Try to get bus module, bus_module = 0

    [   23.206421] [phy_attach_direct] Calling phy_init_hw.

    [   23.210444] [phy_init_hw] Calling phydev->drv->config_init.

    [   23.234476] [PR] Reg = 0x1, value = 0xc7

       --- Here we read PHY chip register, used phy_read in linux kernel.

       --- Phy register ID is 1, BMSR Register 0x0001 – Basic Mode Status Register.

    [   23.237513] [phy_connect_direct] Called phy_attach_direct. rc = -95

    [   23.243627] qcom-emac 7c40000.qcom,emac eth0: could not connect phy

    [   23.334244] [emac_mac_up] Error req irq exit! Cant connect phy, called adpt->phy.ops.down

        --- [PR] : This line we add code in kernel/include/linux/phy.h, function phy_read.

    This is information update, for analysis reference.

    Regards,

  • Dear Nguyen,
    I did further code explore and find that the chip driver has not hooked in kernel, instead of general phy driver did the job.
    The code I added, and which has not printed yet, even after insmod ko file.
    static int dp83811_config_intr(struct phy_device *phydev)
    {
    int misr_status, err;

    printk(KERN_ALERT "[dp83811_config_intr] Calling func.\n"); // Add this line to indicate if dp83tc811 driver effected.
    ...
    Please give me some guidance :..<
    Regards,
  • Hi,

    I have limited expertise in Linux driver. I would suggest asking for support from Linux experts in Linux forum. For example: lore.kernel.org/.../

    As for MDC/MDIO tool, please follow this link for both software and required hardware: www.ti.com/.../USB-2-MDIO

    Regards,

    Hung Nguyen
  • This is not a proper init function I put code, init function should be dp83811_config_init (intr is interrupt :..< )
  • Thanks dear Nguyen, I will go to linux forum for linux mechanism. Still if I have chip related issues I'd like to get your help. Is that OK?
  • Hi John,

    Yes, we can definitely help to resolve chip related issues.

    I will go ahead and close this thread. Kindly open a new thread when you encounter chip related issue.

    Regards,

    Hung Nguyen
  • Hi, Dear Nguyen,

      Thank u anyway, I got some support from kernel side and still not working.

      I'll collect information about this application and feedback by another thread.

    Regards,