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/AM5726: Single PRU Ethernet MII

Part Number: AM5726

Tool/software: Linux

Hi,

We are using AM5726 on one of our products.

We only have a need for using 1 MII in the PRU core as an ethernet interface.

However, I see that this option doesn't seem to be supported by the PRU driver.

If I give device tree entry for only 1 MII, then I see errors during the probe of the PRU ethernet driver function.

I have also tried hacking the code to get the probe function to execute successfully, but then I don't see any Rx interrupts being raised for the PRU interface created. I see Tx interrupts being raised though.

Because of the 0 Rx interrupts, I obviously don't see any packets coming through.

Can you please let me know if there is way to only initialize 1 MII in the PRU core?

We are using the Processor SDK for Linux RT: 04_03_00_05.

Thanks,

Mukul

  • Hello Mukul,

    We added single-EMAC support to PRUETH in Linux / RT Linux SDK 5.3. Before that point, the driver was created with dual EMAC in mind.

    Are you able to move to SDK 5.3, or do you need to keep SDK 4.3?

    Regards,
    Nick
  • Hi Nick,

    We are using 4.9 kernel, so unfortunately, we will have to stick to SDK 4.3.

    Is there a possibility to get single-EMAC support on SDK 4.3?

    Thanks,
    Mukul
  • Hello Mukul,

    There are two options I see for 4.9 kernel: You can create a dummy PHY, or you can backport single EMAC support from our later releases.

    The post PRU Ethernet fails with single MAC covers the dummy PHY workaround.

    The post pruss_eth problem covers the backporting option.

    Please note: both posts reference ti-linux-kernel. Please see my answer in the post PRU Ethernet firmware repository for the difference between ti-linux-kernel and processor-sdk-linux. Solutions that work in ti-linux-kernel might require some tweaks to get working on processor-sdk-linux.

    Regards,

    Nick

  • Hi Nick,

    Thanks for your response.

    We are already using the dummy PHY solution in our setup, but we don't want to see 2 interfaces and initialize 2 MIIs when we are using only 1.

    I briefly looked at the second solution that you posted.

    We were actually using the PRU ethernet driver from 'ti-linux-kernel' but we were seeing packet drop issues with that on the PRU ethernet interfaces.

    That's why we were asked to move to the SDK 4.3 based PRU ethernet driver, which seems to resolve our issue.

    And the patches in the second solution, as you mentioned, are based on the PRU ethernet driver from 'ti-linux-kernel', which obviously won't apply cleanly. So, I am not sure, whether these changes will work on the SDK 4.3 based PRU ethernet driver.

    Has anybody tested these changes actually work on the SDK4.3 based PRU ethernet driver?

    Is there a possibility to get these single-EMAC changes with respect to the PRU driver in the SDK 4.3?

    Also, is there a change needed in the firmware to get the single-EMAC mode working?

    Thanks,

    Mukul

  • Hello Mukul,

    No changes to the PRU firmware should be required. A note of caution: TI has not tested using the non-ethernet PRU for any tasks, so I cannot advise that you do anything with that PRU in case the PRUETH firmware uses shared ICSS resources.

    The patches to backport ti-linux-kernel 4.14 to ti-linux-kernel 4.9 have been tested. However, TI does not support porting between ti-linux-kernel and processor-sdk-linux, so TI has not tested those patches on processor-sdk-linux 4.3.

    Regards,
    Nick