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: DP83TC811S-Q1 driver porting bring up issue

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

Tool/software: Linux

hi I'm porting dp83tc811 on mdm9607 (linux3.18),but it can not work when ping pc and mdm9607,

my step:

1:

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

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

console log:

[ 39.559747] start emac_probe
[ 39.580760] stephen go to msm_emac_request_pinctrl_on

[ 39.628262] stephen go to get_phy_id===1=MII_PHYSID1=is:2000
[ 39.633741] stephen go to get_phy_id===1=MII_PHYSID2=is:a253

2:

ifconfig eth0

3:

ifconfig eth0 down

4:

ifconfig eth0 hw ether 00:80:48:BA:d1:30

console log:

[ 173.966215] stephen dev_set_mac_address start

[ 173.969574] stephen go to emac_set_mac_address start

[ 173.975564] stephen go to emac_pm_runtime_resume

[ 173.981020] stephen go to msm_emac_request_pinctrl_on

[ 173.985824] stephen yes phy is external

[ 173.989185] stephen set mdio active

[ 174.643766] stephen go to emac_hw_set_mac_addr

[ 174.648226] stephen go to emac_set_mac_address end

[ 174.653609] stephen dev_set_mac_address end

[ 174.685750] stephen dev_set_rx_mode start

[ 174.689409] stephen dev_set_rx_mode end

[ 174.693452] stephen dev_set_rx_mode over

[ 174.697478] stephen go to emac_open

[ 174.700560] qcom-emac 7c40000.qcom,emac eth0: TX queues 1, TX descriptors 512

[ 174.708127] qcom-emac 7c40000.qcom,emac eth0: RX queues 1, Rx descriptors 256

[ 174.781102] stephen go to emac_sgmii_up

[ 174.785704] stephen go to emac_mac_up phy_connect_direct

[ 174.790190] stephen go to phy_connect_direct

[  174.899099] stephen go to phy_attach_direct

[ 175.015991] stephen phy_attach_direct111

[ 175.019847] stephen go to phy_init_hw

[ 175.143805] stephen phy_init_hw===2

[ 175.147294] stephen start dp83811_phy_reset

[  176.757439] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[ 177.587165] stephen phy_state_machine PHY_UP

[ 177.591491] stephen go to phy_start_aneg

[ 179.289282] stephen go to phy_state_machine = 8

[ 179.292998] stephen phy_state_machine PHY_FORCING and read status

[ 179.299600] stephen go to genphy_read_status

[ 179.382409] stephen go to genphy_update_link get link is=:1

[ 179.387515] stephen go to genphy_read_status 1

[ 179.391763] EMAC PHY ADDR 0 PHY RD 0x00 -> 0x2100

[ 179.396532] stephen go to genphy_read_status 3

[ 179.400787] stephen go to genphy_read_status end phydev->speed is:100,phydev->duplex is:1,phydev->pause=0

[ 179.411073] EMAC PHY ADDR 0 PHY RD 0x01 -> 0x0065

[ 179.415084] EMAC PHY ADDR 0 PHY RD 0x01 -> 0x0065

[  179.460696] qcom-emac 7c40000.qcom,emac eth0: Link is Up - 100Mbps/Full - flow control off

[  179.473093] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

5:

/ # ifconfig
ifconfig
bridge0 Link encap:Ethernet HWaddr D6:E8:CD:88:DA:2E
inet addr:192.168.225.1 Bcast:192.168.225.255 Mask:255.255.255.0
inet6 addr: fe80::d4e8:cdff:fe85:d72b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:6304 (6.1 KiB)

eth0 Link encap:Ethernet HWaddr 00:80:48:BA:D1:30
inet addr:169.254.4.1 Bcast:169.254.4.255 Mask:255.255.255.0
inet6 addr: fe80::280:48ff:feba:d130/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:794 (794.0 B)
Interrupt:108

6:ifconfig eth0 192.168.2.0

7:ping to pc:

ping 192.168.2.37

/ # ifconfig eth0 192.168.2.0
ifconfig eth0 192.168.2.0
/ # ping 192.168.2.37
ping 192.168.2.37
PING 192.168.2.37 (192.168.2.37) 56(84) bytes of data.
From 192.168.2.0 icmp_seq=1 Destination Host Unreachable
From 192.168.2.0 icmp_seq=2 Destination Host Unreachable
From 192.168.2.0 icmp_seq=3 Destination Host Unreachable
From 192.168.2.0 icmp_seq=4 Destination Host Unreachable
From 192.168.2.0 icmp_seq=5 Destination Host Unreachable
From 192.168.2.0 icmp_seq=6 Destination Host Unreachable
From 192.168.2.0 icmp_seq=7 Destination Host Unreachable
From 192.168.2.0 icmp_seq=8 Destination Host Unreachable
From 192.168.2.0 icmp_seq=9 Destination Host Unreachable

get register value:

stephen dp83811_config_aneg c45 test reg[0x000]=2100

[ 177.629815] EMAC PHY ADDR 0 PHY RD 0x09 -> 0x1000

[ 177.634377] stephen dp83811_config_aneg c45 test reg[0x009]=1000

[ 177.640336] EMAC PHY ADDR 0 PHY RD 0x12 -> 0x0000

[ 177.644978] stephen dp83811_config_aneg c45 test reg[0x12]=0

[ 177.650656] EMAC PHY ADDR 0 PHY RD 0x13 -> 0x4000

[ 177.655337] stephen dp83811_config_aneg c45 test reg[0x13]=4000

[ 177.661240] EMAC PHY ADDR 0 PHY RD 0x18 -> 0x0010

[ 177.665886] stephen dp83811_config_aneg c45 test reg[0x18]=10

[ 177.671898] EMAC PHY ADDR 0 PHY RD 0x1f -> 0x0000

[ 177.677087] stephen dp83811_config_aneg c45 test reg[0x1f]=0

[  177.700964] stephen dp83811_config_aneg c45 test reg[0x198]=34b

[  177.725785] stephen dp83811_config_aneg c45 test reg[0x432]=0

[  177.750092] stephen dp83811_config_aneg c45 test reg[0x459]=0

[  177.774888] stephen dp83811_config_aneg c45 test reg[0x4a0]=a1

[  177.801529] stephen dp83811_config_aneg c45 test reg[0x4a1]=0

[  177.852280] stephen dp83811_config_aneg c45 test reg[0x4a2]=0

[ 177.913210] stephen dp83811_config_aneg c45 test reg[0x4a3]=0

[ 177.942802] stephen dp83811_config_aneg c45 test reg[0x4a4]=0

[ 177.953218] stephen dp83811_config_aneg c45 test reg[0x001]=65

[ 177.963717] stephen dp83811_config_aneg c45 test reg[0x000]=2100

[ 177.974734] stephen dp83811_config_aneg c45 test reg[0x012]=0

[ 177.985167] stephen dp83811_config_aneg c45 test reg[0x01f]=0

[ 178.009407] stephen dp83811_config_aneg c45 test reg[0x133]=75ff

[ 178.034294] stephen dp83811_config_aneg c45 test reg[0x18b]=1a

[ 178.058710] stephen dp83811_config_aneg c45 test reg[0x18c]=0

[ 178.083189] stephen dp83811_config_aneg c45 test reg[0x432]=0

[ 178.107894] stephen dp83811_config_aneg c45 test reg[0x467]=300

[ 178.132323] stephen dp83811_config_aneg c45 test reg[0x485]=1078

[ 178.157207] stephen dp83811_config_aneg c45 test reg[ex-0x7]=3d

[ 178.182327] stephen dp83811_config_aneg c45 test reg[ex-0xb]=800

[ 178.188080] EMAC PHY Addr 0 PHY WR 0x0d <- 0x0001

[ 178.206647] stephen dp83811_config_aneg c45 test reg[ex-0x12]=1

[ 178.231105] stephen dp83811_config_aneg c45 test reg[ex-0x834]=c000

[ 178.256256] stephen dp83811_config_aneg c45 test reg[ex-0x836]=0

can not ping pc and mdm9607 ,how to solve the problem?

ifconfig eth0 192.168.2.0
/ # ping 192.168.2.37
ping 192.168.2.37
PING 192.168.2.37 (192.168.2.37) 56(84) bytes of data.
From 192.168.2.0 icmp_seq=1 Destination Host Unreachable
From 192.168.2.0 icmp_seq=2 Destination Host Unreachable
From 192.168.2.0 icmp_seq=3 Destination Host Unreachable
From 192.168.2.0 icmp_seq=4 Destination Host Unreachable
From 192.168.2.0 icmp_seq=5 Destination Host Unreachable
From 192.168.2.0 icmp_seq=6 Destination Host Unreachable
From 192.168.2.0 icmp_seq=7 Destination Host Unreachable
From 192.168.2.0 icmp_seq=8 Destination Host Unreachable
From 192.168.2.0 icmp_seq=9 Destination Host Unreachable
From 192.168.2.0 icmp_seq=10 Destination Host Unreachable

  • Hi,

    Few questions:

    1. Do you see link up with Link Partner ?
    2. What is the interface on MAC you are using ?

    Can you try doing a MAC loopback to confirm MAC interface with Phy is looking good ?

    Regards,
    Geet
  • root@mdm9607:/usr/lib/modules# ethtool eth0
    Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes: Not reported
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: No
    Advertised link modes: Not reported
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: No
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: external
    Auto-negotiation: off
    Supports Wake-on: pg
    Wake-on: pg
    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: yes
    root@mdm9607:/usr/lib/modules#
    1:link is ok
    2:we use sgmii interface
    3:i will doing a MAC loopback and feed back to you

    hi:

    To order  set  to loopback mode,setting bit[14] to 1 in the BMCR Register 0x0000 – Basic Mode Control Register
    and setting bits[6:0] = 0b1100000 in the BISTCR Register 0x0016 – BIST Control Register 
    reg value :
    dp83811-reg[0x00]=6100
    dp83811-reg[0x16]=160
    step:
    ifconfig eth0 
    ifconfig eth0  down
    ifconfig eth0 hw ether 00:80:48:BA:d1:30
    ifconfig eth0 192.168.1.10
    ping 192.168.1.11
    log:
    [ 1168.120510] stephen emac_isr interrupt received
    [ 1168.129462] stephen emac_isr in do 
    [ 1168.133006] stephen emac_isr =====ok=== 
    [ 1168.137005] stephen emac_isr =====ISR_TX_PKT===status=8000 
    [ 1168.142652] stephen emac_isr enable the interrupt
    but there is no irq for rx,so the mac did not checked the data from phy,loopback test failed
    when in loopback test ,all reg value is:
    [ 1180.371345] stephen dp83811-reg[0x00]=6100 
    [ 1180.375538] stephen dp83811-reg[0x01]=65 
    [ 1180.379626] stephen dp83811-reg[0x02]=2000 
    [ 1180.383287] stephen dp83811-reg[0x03]=a253 
    [ 1180.388254] stephen dp83811-reg[0x09]=3000 
    [ 1180.392344] stephen dp83811-reg[0x0a]=100 
    [ 1180.396562] stephen dp83811-reg[0x0d]=401f 
    [ 1180.400400] stephen dp83811-reg[0x0e]=a1 
    [ 1180.405156] stephen dp83811-reg[0x11]=10b 
    [ 1180.409756] stephen dp83811-reg[0x12]=0 
    [ 1180.413382] stephen dp83811-reg[0x13]=4000 
    [ 1180.418089] stephen dp83811-reg[0x14]=0 
    [ 1180.421390] stephen dp83811-reg[0x15]=0 
    [ 1180.425697] stephen dp83811-reg[0x16]=160 
    [ 1180.429568] stephen dp83811-reg[0x17]=4041 
    [ 1180.433722] stephen dp83811-reg[0x18]=10 
    [ 1180.437765] stephen dp83811-reg[0x1b]=7d 
    [ 1180.442127] stephen dp83811-reg[0x1c]=5ee 
    [ 1180.445777] stephen dp83811-reg[0x1e]=0 
    [ 1180.449705] stephen dp83811-reg[0x1f]=0 
    [ 1180.453750] stephen dp83811-reg[ext1f-0x133]=75ff 
    [ 1180.458686] stephen dp83811-reg[ext1f-0x16b]=0 
    [ 1180.463379] stephen dp83811-reg[ext1f-0x180]=0 
    [ 1180.468347] stephen dp83811-reg[ext1f-0x181]=0 
    [ 1180.472458] stephen dp83811-reg[ext1f-0x18a]=0 
    [ 1180.477558] stephen dp83811-reg[ext1f-0x18b]=1a 
    [ 1180.482304] stephen dp83811-reg[ext1f-0x18c]=0 
    [ 1180.486620] stephen dp83811-reg[ext1f-0x197]=13c 
    [ 1180.491740] stephen dp83811-reg[ext1f-0x198]=34b 
    [ 1180.496725] stephen dp83811-reg[ext1f-0x400]=1020 
    [ 1180.501565] stephen dp83811-reg[ext1f-0x401]=a 
    [ 1180.507473] stephen dp83811-reg[ext1f-0x402]=383 
    [ 1180.513638] stephen dp83811-reg[ext1f-0x432]=0 
    [ 1180.524397] stephen dp83811-reg[ext1f-0x446]=77 
    [ 1180.544567] stephen dp83811-reg[ext1f-0x448]=0 
    [ 1180.553483] stephen dp83811-reg[ext1f-0x456]=1008 
    [ 1180.561475] stephen dp83811-reg[ext1f-0x459]=0 
    [ 1180.570326] stephen dp83811-reg[ext1f-0x460]=2610 
    [ 1180.580149] stephen dp83811-reg[ext1f-0x461]=410 
    [ 1180.596316] stephen dp83811-reg[ext1f-0x462]=0 
    [ 1180.604721] stephen dp83811-reg[ext1f-0x463]=1 
    [ 1180.613568] stephen dp83811-reg[ext1f-0x467]=300 
    [ 1180.625531] stephen dp83811-reg[ext1f-0x469]=40 
    [ 1180.629732] stephen dp83811-reg[ext1f-0x480]=2 
    [ 1180.655579] stephen dp83811-reg[ext1f-0x481]=a2 
    [ 1180.665334] stephen dp83811-reg[ext1f-0x482]=7007 
    [ 1180.674523] stephen dp83811-reg[ext1f-0x483]=3 
    [ 1180.678634] stephen dp83811-reg[ext1f-0x484]=221 
    [ 1180.695420] stephen dp83811-reg[ext1f-0x485]=1078 
    [ 1180.704750] stephen dp83811-reg[ext1f-0x486]=a05 
    [ 1180.713475] stephen dp83811-reg[ext1f-0x487]=a00 
    [ 1180.728541] stephen dp83811-reg[ext1f-0x489]=1 
    [ 1180.734739] stephen dp83811-reg[ext1f-0x493]=14 
    [ 1180.740185] stephen dp83811-reg[ext1f-0x496]=44c 
    [ 1180.744737] stephen dp83811-reg[ext1f-0x497]=1c0 
    [ 1180.749760] stephen dp83811-reg[ext1f-0x4a0]=a1 
    [ 1180.754585] stephen dp83811-reg[ext1f-0x4a1]=0 
    [ 1180.758697] stephen dp83811-reg[ext1f-0x4a2]=0 
    [ 1180.764504] stephen dp83811-reg[ext1f-0x4a3]=0 
    [ 1180.768622] stephen dp83811-reg[ext1f-0x4a4]=0 
    [ 1180.773701] stephen dp83811-reg[ext1f-0x4a5]=0 
    [ 1180.778535] stephen dp83811-reg[ext1f-0x4a6]=0 
    [ 1180.782645] stephen dp83811-reg[ext1f-0x4a7]=0 
    [ 1180.788415] stephen dp83811-reg[ext1f-0x4a8]=0 
    [ 1180.792518] stephen dp83811-reg[ext1f-0x4a9]=0 
    [ 1180.798480] stephen dp83811-reg[ext1f-0x4aa]=0 
    [ 1180.802750] stephen dp83811-reg[ext1f-0x4ab]=0 
    [ 1180.808745] stephen dp83811-reg[ext1f-0x4ac]=0 
    [ 1180.813319] stephen dp83811-reg[ext1f-0x4ad]=0 
    [ 1180.817743] stephen dp83811-reg[ext1f-0x4ae]=0 
    [ 1180.822362] stephen dp83811-reg[ext1f-0x4af]=0 
    [ 1180.827110] stephen dp83811-reg[ext1f-0x4b0]=0 
    [ 1180.831497] stephen dp83811-reg[ext1f-0x4b1]=0 
    [ 1180.836420] stephen dp83811-reg[ext1f-0x4b2]=0 
    [ 1180.840522] stephen dp83811-reg[ext1f-0x4b3]=0 
    [ 1180.845622] stephen dp83811-reg[ext1f-0x4b4]=0 
    [ 1180.850250] stephen dp83811-reg[ext1f-0x4b5]=0 
    [ 1180.854717] stephen dp83811-reg[ext1f-0x4b6]=0 
    [ 1180.859270] stephen dp83811-reg[ext1f-0x4b7]=0 
    [ 1180.863685] stephen dp83811-reg[ext1f-0x4b8]=0 
    [ 1180.873338] stephen dp83811-reg[ext1f-0x4b9]=0 
    [ 1180.877761] stephen dp83811-reg[ext1f-0x4ba]=0 
    [ 1180.882379] stephen dp83811-reg[ext1f-0x4bb]=0 
    [ 1180.886697] stephen dp83811-reg[ext1f-0x4bc]=0 
    [ 1180.891711] stephen dp83811-reg[ext1f-0x4bd]=0 
    [ 1180.896431] stephen dp83811-reg[ext1f-0x4be]=0 
    [ 1180.900695] stephen dp83811-reg[ext1f-0x4bf]=0 
    [ 1180.906107] stephen dp83811-reg[ext1f-0x4c0]=0 
    [ 1180.911297] stephen dp83811-reg[ext1f-0x4c1]=0 
    [ 1180.916222] stephen dp83811-reg[ext1f-0x4c2]=0 
    [ 1180.920555] stephen dp83811-reg[ext1f-0x4c3]=0 
    [ 1180.925495] stephen dp83811-reg[ext1f-0x4c4]=0 
    [ 1180.930144] stephen dp83811-reg[ext1f-0x4c5]=0 
    [ 1180.934693] stephen dp83811-reg[ext1f-0x4c6]=0 
    [ 1180.939205] stephen dp83811-reg[ext1f-0x4c7]=0 
    [ 1180.943678] stephen dp83811-reg[ext1f-0x4c8]=0 
    [ 1180.948402] stephen dp83811-reg[ext1f-0x4c9]=0 
    [ 1180.952515] stephen dp83811-reg[ext1f-0x4ca]=0 
    [ 1180.957657] stephen dp83811-reg[ext1f-0x4cb]=0 
    [ 1180.962363] stephen dp83811-reg[ext1f-0x4cc]=c 
    [ 1180.966780] stephen dp83811-reg[ext1f-0x4e0]=0 
    [ 1180.971718] stephen dp83811-reg[ext1f-0x4e1]=dd00 
    [ 1180.976551] stephen dp83811-reg[ext1f-0x4e3]=dd00 
    [ 1180.981325] stephen dp83811-reg[ext1f-0x4e5]=c3 
    [ 1180.986229] stephen dp83811-reg[ext01-0x007]=3d 
    [ 1180.990598] stephen dp83811-reg[ext01-0x00b]=800 
    [ 1180.996246] stephen dp83811-reg[ext01-0x012]=1 
    [ 1181.000577] stephen dp83811-reg[ext01-0x834]=c000 
    [ 1181.005763] stephen dp83811-reg[ext01-0x836]=0 

    what's wrong with this issue? how to solve it?

    =====
    hi 
    hi loopback is ok ,when looback failed ,The tx of the phy on our hardware connects the rx of the CPU,The rx of the phy on our hardware connects to the tx of the CPU.loopback is Ok after changing the connection mode-----The tx of the phy on our hardware connects the tx of the CPU,The rx of the phy on our hardware connects to the rx of the CPU.but in normal mode ,ping pc and mdm9607,it's still failed,pls give me some advices

  • hi loopback is ok ,when looback failed ,The tx of the phy on our hardware connects the rx of the CPU,The rx of the phy on our hardware connects to the tx of the CPU.loopback is Ok after changing the connection mode-----The tx of the phy on our hardware connects the tx of the CPU,The rx of the phy on our hardware connects to the rx of the CPU.but in normal mode ,ping pc and mdm9607,it's still failed,pls give me some advices
  • Hi,

    You mentioned loopback is OK. Just to be clear here,

    1. Phy was configured in MII Loopback.
    2. Packets were trasnmitted from CPU.
    3. All the packets were recieved back to CPU.


    Next thing we need to check is analog interface on the line side.

    1. Do you see Link-UP when connected to Link Partner Phy ?
    2. Can you configure the Link Partner Phy in Reverse loopback and send packets from the CPU ? and check whether MAC is able to recieve the packets back ?

    Regards,
    Geet
  • hi now the mdm9x07 can ping to pc

    1:insmod /usr/lib/modules/qcom_emac.ko 
    2:echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_ignore 
    3:ifconfig eth0 
    4:ifconfig eth0 -arp 
    5:ifconfig eth0 down 
    6:ifconfig eth0 hw ether 00:80:48:BA:d1:30 
    7:ifconfig eth0 up 
    8:ethtool -s eth0 autoneg off speed 100 duplex full 
    9:ifconfig eth0 192.168.255.10 
    i must add : 
    echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_ignore and 
    :ifconfig eth0 -arp 
    otherwise ping is failed,this why?

    and in linux3.18

    in dp8ctc811.c

    must change phy_write_mmd to phy_write_mmd_indirect

    and change phy_read_mmd to phy_read_mmd_indirect.

    in dp83811_driver must add .read_status = genphy_read_status,

  • We will take an note of above information and inform linux driver team. Let me know if any other additional help you need.

    Regards,
    Geet
  • Hi,

    I am closing this thread. Incase you need further assistance, kindly open new thread and provide link to this thread.

    Regards,
    Geet