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.

Phy Loopback test

i've got a questions.

I'm working on a phy loopback test with the c6678, but cant get it to work.
I can to send packets to the computer and send packets from the computer to the board (simple ping).
i used the code from the ibl to get the queuemanager to work and for sending en recieving packages. but when i set the phy in loopback mode (as described in the phy datasheet) and send a packet i dont see it coming in the computer and i dont get it in my recieve queue..

i also tried to set the sgmii and the cpsw in loopback but both dont send it back into my recieve queue..

if i set the queue cpdma in loopback it works. i see the send package in the recieve queue.

i think its something with the ale look up engine but also with bypass it doesnt work.

i hope someone can help me out!

  • Can you be more specific?  Is this the SGMII SerDes Loopback mode?  And if so which one?  The standard loopback would not be putting anything out on the TX line (i.e. you wouldn't see any packets at the PC.)

    Best Regards,

    Chad

  • i am working on the same level as the bootloader. i am building a test were i want to test the Phy ethernet controller by doing a loopback test. 

    i used the code from the bootloader, were it gets the firmware by nfs, to get the queue manager system running. at first i tried to send a package (custom array with some values) by popping the queue then pushing it with wireshark i saw the package coming in. after that i pinged to board to see if the recieving function would pop a package from the rx queue. that also occurs. i see a package coming into the rx queue.

    but now i want to loopback the phy so that the package i send to the phy comes back into my rx queue. but when i setup the loopback mode in the phy (by doing mdio accesses) and send a package i dont see it coming back into my recieving queue.

    so thats my problem, i cant figure out where the package is loopbacked to and what to problem is or what i do wrong.

    (to figure out where the problem is i tried to sgmii loopback mode, gbe switch loopback mode and the pkdma loopback mode, but only the last one works.

    Best Regards,

    Dennis

  • Dennis,

    Usually, loopback is setup so that the device that's in loopback sends and receives it's own packets.

    The DSP will not do a Rx loopback to Tx which is what you're looking to do.  You would need to setup the PA to push the packet back reroute the packet back out the port instead.

    Best Regards,

    Chad

  • Hi Chad,

    So you're saying its not possible to setup the marvel phy (mac loopback mode) then send packets from the dsp thats is pushed to the ethernet controller, which will loop it back on to otherline to recieve it in the dsp.

    The point of this test is to make sure that the dsp can test the phy on recieving and sending (to make sure its working correctly). 

    Normally you send a packet (destinated for the outside) throught the phy and the outside can do the same (destinated for the dsp). I want to test this sending and recieving without external cabel/computer. So with a loopback of the packet inside the phy.

    The emac loopback example does the same right ? But i cant use that test, i'm working in a lower level in the system.

    I hope i explaint my self little bit better.

     Best Regards,

    Dennis

  • Ok, I misunderstood what you had stated.  It sounded to me on the last one when you said you were pinging the board.  That you had the PC Pinging the board and expected a loopback.  Also, I thought you were referring to the DSP's PHY being in loopback mode.  That's why I was very specific in saying that the DSP cannot do a loopback an Rx to Tx.

    I'm not sure of the Marvel PHY's loopback capabilities, as you're aware if you have their data sheet it's under NDA and I don't have a copy of it personally so I can't look at what specifically it says.  Usually these capabilities again are Tx to Rx loopback of the device itself.  Marvell may support something beyond this.

    That said, you don't need to do this to perform a PHY loopback on the DSP.  The DSP's SGMII PHY has loopback mode support built in.  This is at the analog side and is not a digital loopback of the MAC.

    Yes, there's example code but if you're building your code you should be able to do it by setting the SGMII to loopback mode. You'd need to configure the SerDes SGMII to Loopback mode and the SGMII Receive and Transmit SerDes to Loopback mode.

    Note if the Marvell PHY is supposed to support this, then it may be good to contact them as to why it's not working?  Have you probed the SGMII RX signalling (DSP perspective RX or the TX from Marvell PHY perspective) to see if there's any corresponding activity immediate after DSP SGMII TX signalling is transmitted.

    Best Regards,

    Chad