PROCESSOR-SDK-AM62X: Errata changes for MDIO Manual Mode enablement not working

Part Number: PROCESSOR-SDK-AM62X

Tool/software:

Hi,

We are using AM62x board for our development. We have integrated the MDIO Manual mode enablement workaround changes mentioned by TI in "https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/latest/exports/docs/api_guide_am64x/enetmdio_manualmode.html#autotoc_md1990" into VxWorks, based on SDK8.0. After applying the patch, we are seeing “ping” through Ethernet does not work.

Kindly suggest, if any other fix or mitigation is available to resolve this issue. Please consider the compatibility of this errata on other applicable boards like AM64x and AM65x.

Thanks,

Aditya

  • Hi Aditya A,

    Thanks for your query.

    based on SDK8.0.

    Any specific reason to use MCU+SDK 8.0 ?

    After applying the patch, we are seeing “ping” through Ethernet does not work.

    Before applying manual mode patch, it was a working setup?

    Can you share UART console logs for both working and non-working setup ?

    Regards

    Ashwani

  • Hi Ashwani,

    Customer is on SDK 8.0 and only requires the MDIO Manual Mode workaround changes on top of it. The setup was working fine before the manual mode patch was applied.

    I need to regenerate the logs for the issue, but the issue is with "ping" as below. Does MDIO manual mode enable disrupt any PHY operations?

    -> ping "192.168.3.25"
    
    Pinging 192.168.3.25 (192.168.3.25) with 64 bytes of data:
    
    --- 192.168.3.25 ping statistics ---
    1 packets transmitted, 0 received, 100% packet loss, time 1016 ms
    value = -1 = 0xffffffff

    Regards,

    Aditya

  • The setup was working fine before the manual mode patch was applied.

    Thanks for confirmation.

    Does MDIO manual mode enable disrupt any PHY operations

    Can you check communication with PHY? (Are you able to read and write PHY registers ?)

    MAC loopback is working fine with manual mode enabled ?

    PHY loopback is working fine with manual mode enabled ?

    Can you share UART console logs for both working and non-working setup ?

    UART console logs during device getting up.

    I need to regenerate the logs for the issue

    I will wait for them. Working setup logs as well.

    FYI, I am on leave next week. So expect some delayed response (by end of 1st week of november).

    Regards

    Ashwani

  • Hello Ashwani,

    I regenerated the working and the Non-working logs for the MDIO Manual mode patch now.

    Could you please share specific expectation of the below tests.

    MAC loopback is working fine with manual mode enabled ? PHY loopback is working fine with manual mode enabled ?

    Thanks,

    Aditya

  • MAC loopback is working fine with manual mode enabled ? PHY loopback is working fine with manual mode enabled ?

    Great..MAC and PHY loopback working fine with manual mode enabled. This looks related to working logs ?

    I regenerated the working and the Non-working logs for the MDIO Manual mode patch now.

    What about non-working logs ?

    Regards

    Ashwani

  • Hi Ashwani,

    Please find the below information on logs(Host PC: 192.0.0.2, Target: 192.0.0.3). 

    Working log:

    -> ifconfig
    lo0 Link type:Local loopback
    inet 127.0.0.1 mask 255.255.255.255
    inet6 unicast fe80::1%lo0 prefixlen 64 automatic
    inet6 unicast ::1 prefixlen 128
    UP RUNNING LOOPBACK MULTICAST NOARP ALLMULTI
    MTU:1500 metric:1 VR:0 ifindex:1
    RX packets:4 mcast:2 errors:0 dropped:0
    TX packets:4 mcast:2 errors:0
    collisions:0 unsupported proto:0
    RX bytes:474 TX bytes:474

    cpsw0 Link type:Ethernet HWaddr 34:08:e1:80:86:01
    capabilities: VLAN_MTU
    inet 192.0.0.3 mask 255.255.255.0 broadcast 192.0.0.255
    inet6 unicast fe80::3608:e1ff:fe80:8601%cpsw0 prefixlen 64 tentative automatic
    UP RUNNING SIMPLEX BROADCAST MULTICAST
    MTU:1500 metric:1 VR:0 ifindex:2
    RX packets:2 mcast:1 errors:0 dropped:0
    TX packets:4 mcast:3 errors:0
    collisions:0 unsupported proto:0
    RX bytes:146 TX bytes:300

    value = 0 = 0x0

    -> ping "192.0.0.2"

    Pinging host (192.0.0.2) with 64 bytes of data:
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=0 time<1ms

    --- host ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0 ms
    rtt min/avg/max = 0/0/0 ms
    value = 0 = 0x0
    -> ping "192.0.0.2", 10

    Pinging host (192.0.0.2) with 64 bytes of data:
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=0 time<1ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=1 time=16ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=2 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=3 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=4 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=5 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=6 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=7 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=8 time=33ms
    Reply from 192.0.0.2 bytes=64 ttl=128 seq=9 time=33ms

    --- host ping statistics ---
    10 packets transmitted, 10 received, 0% packet loss, time 9033 ms
    rtt min/avg/max = 0/28/33 ms
    value = 0 = 0x0
    ->

    Not Working log: 

    -> ifconfig
    lo0 Link type:Local loopback
    inet 127.0.0.1 mask 255.255.255.255
    inet6 unicast fe80::1%lo0 prefixlen 64 automatic
    inet6 unicast ::1 prefixlen 128
    UP RUNNING LOOPBACK MULTICAST NOARP ALLMULTI
    MTU:1500 metric:1 VR:0 ifindex:1
    RX packets:11 mcast:3 errors:0 dropped:0
    TX packets:11 mcast:3 errors:0
    collisions:0 unsupported proto:0
    RX bytes:512 TX bytes:512

    cpsw0 Link type:Ethernet HWaddr 34:08:e1:80:86:01
    capabilities: VLAN_MTU
    inet 192.0.0.3 mask 255.255.255.0 broadcast 192.0.0.255
    inet6 unicast fe80::3608:e1ff:fe80:8601%cpsw0 prefixlen 64 tentative automatic
    UP SIMPLEX BROADCAST MULTICAST
    MTU:1500 metric:1 VR:0 ifindex:2
    RX packets:0 mcast:0 errors:0 dropped:0
    TX packets:0 mcast:0 errors:0
    collisions:0 unsupported proto:0
    RX bytes:0 TX bytes:0

    value = 0 = 0x0

    -> ping "192.0.0.2"

    Pinging host (192.0.0.2) with 64 bytes of data:

    --- host ping statistics ---
    1 packets transmitted, 0 received, 100% packet loss, time 1033 ms
    value = 4294967295 = 0xffffffff
    -> ping "192.0.0.3"

    Pinging vxTarget (192.0.0.3) with 64 bytes of data:
    Reply from 192.0.0.3 bytes=64 ttl=64 seq=0 time<1ms

    --- vxTarget ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0 ms
    rtt min/avg/max = 0/0/0 ms
    value = 0 = 0x0
    -> ping "192.0.0.2", 10

    Pinging host (192.0.0.2) with 64 bytes of data:

    --- host ping statistics ---
    10 packets transmitted, 0 received, 100% packet loss, time 10300 ms
    value = 4294967295 = 0xffffffff
    ->

    Thank you.

  • Hi Ashwani, on MAC and PHY loopback, Test is not run with MDIO manual mode enabled. Is it only to check the transmitted packet is received back?

  • So, above logs 

    Working logs without MDIO manual mode patch + MCU-SDK 8.0 installer

    and

    Non-working logs with MDIO manual mode patch + MCU-SDK 8.0 installer.

    on MAC and PHY loopback, Test is not run with MDIO manual mode enabled. Is it only to check the transmitted packet is received back?

    I mean, can you confirm PHY configuration is proper after manual mode patch ?

    Please share UART console logs on AM243x side as well.

    Can you check HOST, CPSW and PHY stats to confirm where ping packets getting dropped at PHY or MAC level ?

    Regards

    Ashwani

  • Hello Ashwani,

    MDIO is used for PHY data transfer (Both read and write directions based on the configuration). TI suggests that if the silicon is affected with MDIO errata i2329, then use MDIO Manual mode as software workaround. Manual Mode is intended to be used by software for slow speed general purpose IO operations and not for MDIO PHY operations as mentioned in TRM. Could you please clarify on this point?

    6.4.12.2.5 Manual Mode

    Manual Mode allows software to directly control the serial clock output (MDCLK_O), the serial data output enable (MDIO_OE_N), and the serial data output (MDIO_O). The serial data input can also be read (MDIO_I). This mode is enabled when the [31] MANUALMODE bit is set in the MDIO MDIO_POLL_REG register. Manual Mode is intended to be used by software for slow speed general purpose IO operations and not for MDIO PHY operations.

    Thank you.

  • Could you please clarify on this point?

    AM64x MCU+ SDK: MDIO Manual Mode Enablement

    Please share UART console logs on AM243x side as well.

    Can you check HOST, CPSW and PHY stats to confirm where ping packets getting dropped at PHY or MAC level ?

    Any update here ?

    Regards

    Ashwani

  • Hello Ashwani,

    We have captured network status from our board before and after MDIO manual changes.

    Before MDIO:

    -> netstat "-a"
    INET sockets
    Prot Recv-Q Send-Q Local Address                Foreign Address            State
    TCP 0 0                     0.0.0.0.23                      0.0.0.0.*                          LISTEN
    TCP 0 0                    128.224.19.155.23         128.224.19.15.58188     ESTABLISHED
    UDP 0 0 localhost.20005 localhost.20004

    INET6 sockets
    Prot Recv-Q Send-Q Local Address Foreign Address      State
    TCP 0 0                      ::.23                ::.*                            LISTEN
    TCP 0 0                      ::1.49636        ::1.54632                 ESTABLISHED
    TCP 0 0                      ::1.54632        ::1.49636                 ESTABLISHED

    After MDIO:

    ->netstat -a
    INET sockets
    Prot  Recv-Q Send-Q Local Address                 Foreign Address               State
    TCP   0      0               0.0.0.0.23                        0.0.0.0.*                           LISTEN
    UDP   0      0               localhost.20005               localhost.20004

    INET6 sockets
    Prot  Recv-Q Send-Q Local Address                 Foreign Address               State
    TCP   0         0             ::.23                                 ::.*                                  LISTEN

    I could see TCP connection not established after changes.

    Thank you.

  • Hi ,

    You are wortking on "MCU-PLUS-SDK-AM62X" or "PROCESSOR-SDK-LINUX-AM62X " ?

    Regards

    Ashwani

  • Hello Ashwani,

    We are working on PROCESSOR-SDK-LINUX-AM62X.

    Thank you.

  • Hello Ashwani,

    Could you please let us know, for the enablement of MDIO manual mode and working with PHY operation, which source file we can refer from the latest PROCESSOR-SDK-LINUX-AM62X? This will help us to proceed further to implement same feature on VxWorks. 

    We could see multiple source files under: 

    board-support\linux-extras-6.1.83+gitAUTOINC+ffc2ff4d45-ti\drivers\net\mdio directory.

    As you can see from this conversation that we have already implemented the workaround mentioned under errata i2329 but still facing issues, we wanted to upgrade our driver wrt latest PROCESSOR-SDK-LINUX-AM62X. Could you please suggest us on this.

    Thanks & Best Regards,

    Revashankar

  • Hello Ashwani,

    Could you please support us on above question? Also, could you please confirm if we need to upgrade Firmware also to use MDIO in Manual mode with PHY operations. Thanks!!

    Best Regards,

    Revashankar 

  • Hi,

    These are the files related to MDIO that TI devices use.

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/net/ethernet/ti/davinci_mdio.c

    When the mode is set to manual mode the driver will then bit bang functions defined as part of the kernel. Look for functions with this in the name mdiobb.

    This is file in the kernel that is being called, the mdiobb functions are defined here.

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/net/mdio/mdio-bitbang.c

    Best Regards,

    Schuyler

  • Hi Schuyler,

    Thank you for the update on the files. Looks like our vxWorks drivers for MDIO are in sync with latest SDK. Could you please confirm if we need to do a Firmware upgrade to work MDIO in manual mode with PHY operations.

    If firmware upgrade is really required, could you please help on this. Thanks!!

    Best Regards,

    Revashankar

  • Hi Schuyler,

    Could you please update us on Firmware upgrade, if it is required? Thanks!!

    Best Regards,

    Revashankar

  • Hi,

    When using Linux there is not any FW dependency with the A53 cpsw and mdio driver. Just to make sure I am answering the question do you have a specific FW you are referring to? If you are referring to the SYSFW there is not a dependency here as the clock is generated by the Linux kernel code.

    Best Regards,

    Schuyler

  • Hi Schuyler,

    Thank you for the update on Firmware. Actually, MDIO works fine for us in Auto mode. When we apply solution for errata i2329 for MDIO to work in manual mode, cpsw is not up. When we referred AM64x INDUSTRIAL COMMUNICATIONS SDK: PRU-ICSS Firmware for MDIO Manual Mode, it suggests Firmware update from previous SDK version to latest version (Please refer SDK9.0 VS SDK8.6 CHANGES section of the link).

    It also suggests the usage Details: How to use the PRU MDIO manual-mode firmware to make PHY register accesses.

    Our drivers are in sync with latest Linux SDK with the workaround mentioned in the errata, but we do not have updated Firmware. This is the delta we could figure out when compare with Linux working setup for MDIO working in manual mode.

    Could you please guide us on this. 

    Best Regards,

    Revashankar

  • Hi,

    Thank you for clarifying which FW you are referring to. The original post described the AM62 EVM is in use here, this processor does not have a PRU_ICSSG module in it and therefore no FW update would be required. As I look through this post though I see mentioned of AM64 as well. Is only the AM62 processor being used here?

    Best Regards,

    Schuyler

  • Hi Schuyler,

    Thanks for the updates. Yes, we are looking for the manual mode compatibility of this errata on all the applicable boards like AM62x, AM64x and AM65x. However, at the moment we are running our test on AM62x board. Since, you mentioned that there is no firmware upgrade required for this, let us investigate further and comeback on this. Thanks!!

    Best Regards,

    Revashankar

  • Hi Schuyler,

    Thank you for your support. We are able to run MDIO in manual mode now. 

    Best Regards,

    Revashankar