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.

SK-AM62P-LP: Errors occur after the PHY is reset

Part Number: SK-AM62P-LP

Tool/software:

Hi TI experts,

I use the TI SDK-10 and I can reproduce this issue in TI EVM SK-AM62P-LP

It will dump the following error message after I set the reset pin to 0.
After I pulled the reset pin to 1, the RJ45 LED still lights up, but it failed to obtain an IP address.

root@am62pxx-evm:~# gpioset -c gpiochip0 19=0
[ 2390.530288] ------------[ cut here ]------------
[ 2390.534926] phy_check_link_status+0x0/0xc8: returned: -5
[ 2390.540295] WARNING: CPU: 2 PID: 46 at /drivers/net/phy/phy.c:1233 phy_state_machine+0xa8/0x2dc
[ 2390.548983] Modules linked in: overlay cfg80211 rpmsg_ctrl rpmsg_char bluetooth snd_soc_hdmi_codec ecdh_generic ecc rfkill display_connector snd_soc_simple_card crct10dif_ce snd_soc_simple_card_utils pvrsrvkm(O) rtc_ti_k3 k3_j72xx_bandgap sa2ul wave5 ti_k3_r5_remoteproc videobuf2_dma_contig sii902x videobuf2_memops v4l2_mem2mem videobuf2_v4l2 rti_wdt videobuf2_common authenc videodev tidss snd_soc_tlv320aic3x_i2c mcrc64 drm_dma_helper mc snd_soc_tlv320aic3x drm_kms_helper tps6598x typec snd_soc_davinci_mcasp snd_soc_ti_udma snd_soc_ti_edma snd_soc_ti_sdma cryptodev(O) fuse drm drm_panel_orientation_quirks backlight ipv6
[ 2390.603903] CPU: 2 PID: 46 Comm: kworker/u8:2 Tainted: G           O       6.6.32-ti-g6de6e418c80e-dirty #1
[ 2390.613624] Hardware name: Texas Instruments AM62P5 SK (DT)
[ 2390.619181] Workqueue: events_power_efficient phy_state_machine
[ 2390.625092] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 2390.632039] pc : phy_state_machine+0xa8/0x2dc
[ 2390.636386] lr : phy_state_machine+0xa8/0x2dc
[ 2390.640731] sp : ffff800081a2bd70
[ 2390.644032] x29: ffff800081a2bd80 x28: 0000000000000000 x27: 0000000000000000
[ 2390.651156] x26: ffff000800014028 x25: ffff000800cb4040 x24: ffff000800013205
[ 2390.658279] x23: 00000000fffffffb x22: 0000000000000005 x21: ffff000801a95cd8
[ 2390.665403] x20: ffff000801a95d30 x19: ffff000801a95800 x18: 0000000000000006
[ 2390.672526] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800081a2b790
[ 2390.679649] x14: 0000000000000000 x13: ffff80008123ea58 x12: 0000000000000603
[ 2390.686772] x11: 0000000000000201 x10: ffff800081296a58 x9 : ffff80008123ea58
[ 2390.693895] x8 : 00000000ffffefff x7 : ffff800081296a58 x6 : 80000000fffff000
[ 2390.701018] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[ 2390.708140] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000800cb9c80
[ 2390.715264] Call trace:
[ 2390.717700]  phy_state_machine+0xa8/0x2dc
[ 2390.721698]  process_one_work+0x138/0x248
[ 2390.725703]  worker_thread+0x320/0x438
[ 2390.729443]  kthread+0x110/0x114
[ 2390.732663]  ret_from_fork+0x10/0x20
[ 2390.736231] ---[ end trace 0000000000000000 ]---
[ 2390.741137] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
[ 2390.767618] kauditd_printk_skb: 5 callbacks suppressed
[ 2390.767631] audit: type=1334 audit(1727401616.834:40): prog-id=27 op=LOAD
[ 2390.779685] audit: type=1334 audit(1727401616.838:41): prog-id=28 op=LOAD
[ 2390.786541] audit: type=1334 audit(1727401616.846:42): prog-id=29 op=LOAD

  • Hi,

    What is the test that you are trying to do? I will need to confer with the HW apps team but this looks like you are holding the PHY in reset. If that is the case then that would explain why the link is going down.

    Best Regards,

    Schuyler

  • Hi Schuyler, I want to reset my phy.

    After I pulled the reset pin '0' and then '1', the PHY stopped working.

    root@am62pxx-evm:~# gpioset -c gpiochip0 19=0
    [   43.242054] ------------[ cut here ]------------
    [   43.246686] phy_check_link_status+0x0/0xc8: returned: -5
    [   43.252051] WARNING: CPU: 1 PID: 77 at /drivers/net/phy/phy.c:1233 phy_state_machine+0xa8/0x2dc
    [   43.260740] Modules linked in: overlay cfg80211 bluetooth ecdh_generic ecc rfkill rpmsg_ctrl rpmsg_char snd_soc_hdmi_codec crct10dif_ce snd_soc_simple_card pvrsrvkm(O) snd_soc_simple_card_utils display_connector rtc_ti_k3 k3_j72xx_bandgap rti_wdt wave5 videobuf2_dma_contig videobuf2_memops snd_soc_tlv320aic3x_i2c v4l2_mem2mem snd_soc_tlv320aic3x ti_k3_r5_remoteproc videobuf2_v4l2 sa2ul videobuf2_common authenc tidss sii902x videodev drm_dma_helper drm_kms_helper mc mcrc64 snd_soc_davinci_mcasp snd_soc_ti_udma snd_soc_ti_edma snd_soc_ti_sdma tps6598x typec cryptodev(O) fuse drm drm_panel_orientation_quirks backlight ipv6
    [   43.315661] CPU: 1 PID: 77 Comm: kworker/u8:4 Tainted: G           O       6.6.32-ti-g6de6e418c80e-dirty #1
    [   43.325381] Hardware name: Texas Instruments AM62P5 SK (DT)
    [   43.330938] Workqueue: events_power_efficient phy_state_machine
    [   43.336848] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [   43.343793] pc : phy_state_machine+0xa8/0x2dc
    [   43.348139] lr : phy_state_machine+0xa8/0x2dc
    [   43.352484] sp : ffff800081c73d70
    [   43.355785] x29: ffff800081c73d80 x28: 0000000000000000 x27: 0000000000000000
    [   43.362908] x26: ffff000800014028 x25: ffff000801b53f40 x24: ffff000800012c05
    [   43.370032] x23: 00000000fffffffb x22: 0000000000000005 x21: ffff000801aef4d8
    [   43.377155] x20: ffff000801aef530 x19: ffff000801aef000 x18: 0000000000000006
    [   43.384278] x17: 0000000000000020 x16: 0000000000000002 x15: ffff800081c73790
    [   43.391401] x14: 0000000000000000 x13: ffff80008123ea58 x12: 000000000000060f
    [   43.398524] x11: 0000000000000205 x10: ffff800081296a58 x9 : ffff80008123ea58
    [   43.405647] x8 : 00000000ffffefff x7 : ffff800081296a58 x6 : 80000000fffff000
    [   43.412770] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
    [   43.419892] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0008015c0000
    [   43.427016] Call trace:
    [   43.429452]  phy_state_machine+0xa8/0x2dc
    [   43.433452]  process_one_work+0x138/0x248
    [   43.437454]  worker_thread+0x320/0x438
    [   43.441194]  kthread+0x110/0x114
    [   43.444414]  ret_from_fork+0x10/0x20
    [   43.447982] ---[ end trace 0000000000000000 ]---
    [   43.452916] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
    
    ^C
    root@am62pxx-evm:~# ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host noprefixroute
           valid_lft forever preferred_lft forever
    2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether c0:d6:0a:f0:46:07 brd ff:ff:ff:ff:ff:ff
    3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether d2:89:9c:23:3f:7f brd ff:ff:ff:ff:ff:ff
        inet6 fe80::d089:9cff:fe23:3f7f/64 scope link proto kernel_ll
           valid_lft forever preferred_lft forever
    root@am62pxx-evm:~# gpioset -c gpiochip0 19=1
    ^C
    root@am62pxx-evm:~# ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host noprefixroute
           valid_lft forever preferred_lft forever
    2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether c0:d6:0a:f0:46:07 brd ff:ff:ff:ff:ff:ff
    3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether d2:89:9c:23:3f:7f brd ff:ff:ff:ff:ff:ff
        inet6 fe80::d089:9cff:fe23:3f7f/64 scope link proto kernel_ll
           valid_lft forever preferred_lft forever
    root@am62pxx-evm:~#
    

  • Hello,

    Are you looking to do a hardware reset of the PHY or is a software reset sufficient? May we ask why are you looking to do a reset of the PHY, was there an issue with the PHY state when the board was booted up?

    -Daolin

  • Hi Daolin,

    I think this pin is for PHY H/W reset. 

    We had this design in our previous generation product, and there was no such issue (the PHY could be reset normally).
  • Hi Daolin,

    I confirm that we need to use the H/W reset function to prevent the worst-case scenario. Could you help fix this issue?

  • Hello,

    We had this design in our previous generation product, and there was no such issue (the PHY could be reset normally).

    Were you using a TI processor in this previous generation product? If so, which TI processor was it?

    Just to confirm, are you using a TI PHY? If so, is it the DP83867 PHY?

    Generally, it is not a good idea to manually reset the PHY when the Ethernet link is still up. When you do this, you've got a PHY driver and CPSW driver that would suddenly be unaware that you have manually reset the PHY.

    One thing to try is bring the Ethernet link down (ip link set dev <interface name> down) and then try your manual reset of the PHY. After this, don't forget to bring the link back up (ip link set dev <interface name> up).

    -Daolin

  • Hi Daolin,

    Thanks! 

    After I set the eth0 link to down and then up, the network works again.

    ip link set eth0 down && ip link set eth0 up