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/TMDXIDK5728: PRU Ethernet

Part Number: TMDXIDK5728
Other Parts Discussed in Thread: AM5718, AM5728

Tool/software: Linux

I checked all the newest 4.9 dts files and 4.9 Linux kernel (SDK4.02), I wouldn’t found any pin-mux setup for the Gigabit-ETH/PRUSS for am572xidk. The am572xidk by default have 2 gigabite ETH prots and two PRUSS2-ETH ports.

 

Eventually I found these pin-mux in Uboot board/ti/arm57xx/mux.data.h.

 

However, after I modified these pin-muxes, nothing happened. So I believe these pin-mux may not be applied or It may be overwrited . I am still struggling on  how to make the PRUSS1 two cores work for pru-eth.

So I am quite sure the the PRUSS1-ETHs developing was not finished. Even the pin-mux issue is fixed, I think I still have a lot of other things to fix, for example, dts file, Linux driver. Please update yout developing status for making the PRUSS1-ETH works, and give me some instrructions you have now.

  • Hi,

    Are you working with a custom board or the AM572x IDK board? You are on the right path as the pin mux is set in u-boot for the AM571x/AM572x.

    Best Regards,
    Schuyler
  • Hi,
    I am using your original AM572x IDK board.

    I figured out that the pin-mux is in board/ti/arm57xx/mux.data.h, but looks you guys didn't setup the pruss1-eth pin-mux as a choice, becuase it shared with Gigabyte ports. So we have to change the pin-mux ourself.

    I saw difereneces after a change of the pin-muxes, becuase these pin-mux was complied in MLO file instead of u-boot.img. So after I replaced the MLO file, I do see one gigabyte ports not working properly. However, the pruss1-eth nothing to work, even the link up not working.

    I am quite believe there are more thing to fix except the pin-mux which you didn't fix in the current 4.02SDK to make the pruss1-eth work. I guess something in dts file, and in Linux drivers.

    Can you give me more detailed instructions, what need I to modify to make the pruss1-th work?
  • Hi Denis,

    I apologize I should have seen this sooner. Unfortunately there is not a set of instructions that are available for enabling PRUSS1-eth. The hardware users guide for the IDK board indicates that the PRU is muxed with the CPSW ports. The document here on page 18 describes the no support on PRU1 eth in the default configuration.

    www.ti.com/.../sprui64b.pdf

    To enable the PRU1 will require board modifications and there are currently not any instructions on how to do that or the accompanying DTS changes required.

    Based on your question it looks like you would like to test a 6 port configuration. Please note the AM5718 IDK board does have support for a 6 port configuration if the LCD panel is not used. TI recommends using this board to evaluate 6 port functionality.

    Best Regards,
    Schuyler
  • Is it possible to contact your developer to see if they can supply more instructions for this issue? We are rush in fixing this problem. Any idea or sugggestion from your developer will be helpful. Thanks a lot

  • Hi,
    The original question you asked made me think you are working with the AM5728 IDK board. Are you working on a custom board?

    On the AM5728 IDK board there has not been any development done to support the PRU1 Ethernet for Linux. Therefore there are not any instructions that were developed for modifying the board or software wise. Do to the way the pin mux for the board was done enabling the PRU1 Eth ports would require giving up the CPSW ports, in effect there would only be 4 Ethernet ports available. Are you trying to have 6 Ethernet ports?

    Best Regards,
    Schuyler
  • Yes, I am using your brand new AM5728 IDK board, not a custom board.

    I need one Gigabit port and 3 pru-eth ports, totally I need 4 Eth ports instead of 6.
  • Hi,

    What type of network traffic will be running on the 3 PRU Eth ports? Currently the only TI EVM that will support your needs for 3 PRU ETH and 1 Gbps ports is the AM5718 IDK board, it has 4 PRU Eth ports and 2 Gbps ports.

    Best Regards,
    Schuyler
  • I was told that your am5728idk board harware should support 4 pru-Eth ports without any issue, the only thing need to do is the software change. Please confirm if this information is correct or not.

    If the above sentence is correct, then all my work should continue, otherwise I am wasting my time. I am trying to change the software  to make the am5728idk board work for 3 pru-eth and 1 Gigabite ports.

    so far I changed the pin-mux in u-boot, and changed the dts files. What I did is disbaling the Gigabite port 1 and enabling pruss1-port1 (another pruss1-port0 I don't need). The results I got is the pruss1-port1 can get physical link up if connected to the network. But it never can go through any ethernet traffic. The fiurther check shows that the interrupt for rx and tx never fired.

    Here is the dts file am57xx-idsk-common.dtsi file related change ( The other changes I think should be ok, such as the mdio interrupt, I saw the pruss1-port1 mdio interrupts did fired).

            pruss1_eth: pruss1_eth {
                    status = "okay";
                    compatible = "ti,am57-prueth";
                    pruss = <&pruss1>;
                    sram = <&ocmcram1>;
                    interrupt-parent = <&pruss1_intc>;
                    /*rx-queue-size = /bits/ 16 <254 134 134 254 48>;*/ /* RED */
                    /*rx-queue-size = /bits/ 16 <194 194 194 194 48>;*/ /* EMAC */
                    /* map is lowpcp-to->hipcp where val 3=q4, 2=q3, 1=q2, 0=q1 */
                    /*pcp-rxq-map = /bits/ 8 <3 3 2 2 1 1 0 0>;*/

                    pruss1_emac0: ethernet-mii0 {
                            phy-handle = <&pruss1_eth0_phy>;
                            phy-mode = "mii";
                            interrupts = <20>, <22>, <23>;
                            interrupt-names = "rx", "tx", "ptp_tx";
                            /* Filled in by bootloader */
                            local-mac-address = [00 00 00 00 00 00];
                            /*tx-queue-size = /bits/ 16 <97 97 97 97 48>;*/
                    };

                   pruss1_emac1: ethernet-mii1 {
                            phy-handle = <&pruss1_eth1_phy>;
                            phy-mode = "mii";
                            interrupts = <21>, <23>, <24>;
                            interrupt-names = "rx", "tx", "ptp_tx";
                            /* Filled in by bootloader */
                            local-mac-address = [00 00 00 00 00 00];
                            /*tx-queue-size = /bits/ 16 <97 97 97 97 48>;*/
                    };
            };

    This peice of dts code I copied from the pruss2 directly, only change the corresponding pruss2 to be pruss1. And leave  all the interupts the same number with the pruss2, I think they are the same, but not sure, please confirm.

     

    If the above setup for pruss1 are correct, why the 20, 21 , 22, 23 interrupts fired for pruss2 ports correctly and never fired for pruss1 ports?

  • Hi Denis,

    The posts on 3/20 and 3/21 in this thread indicated that TI does not support anything more than 2 PRU ports and 2 CPSW ports (Gbps) on the AM5728 IDK. There has not been any development work to support to enable PRU Eth1 on the board. There are HW modifications and SW modifications required that require development time and testing that TI is not planning to do.

    There is the option of using the AM5718 IDK which does fully enable both PRU1 and PRU2 eth ports as well as the 2 Gbps ports which would work for the application you have described.

    Best Regards,
    Schuyler
  • Ok, I understood. But We are trying to fix it ourselves and need some clue from you.

    For the previouse posting,am5728idk,  the interrupts 20, 21, 22, 23, 24 work fine for RUSS2 2 cores, but not wokring for PRUSS1. Why 20,21, 22,23,24 interupts numbers used here for all the PRUSS, I couldn't find any documentation say why use these interrupt numbers, please explain how it works.(The 5718 idk use 20, 21, 22, 23, 24 interrupts for PRUSS1 and PRUSS2). And I figured out that these 5 interrupts not go through your crossbar interupt mapping.

    And please give some clue how to fix it, either in software or in hardware as well?

  • Hi,

    Per the previous posts TI does not support PRU1 on the AM572x8-IDK , there has not been any verification of if the board HW will work in a Linux or RTOS context. At this time TI does not plan to investigate if Ethernet operation using PRU1 on the AM5728-IDK board is possible. TI recommends for application evaluations using both PRUs for Ethernet on a TI EVM in an Ethernet context is the AM5718-IDK EVM.

    Best Regards,
    Schuyler