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.

PROCESSOR-SDK-AM437X: Single PRU Ethernet configuration

Part Number: PROCESSOR-SDK-AM437X

The linux-rt-4.18.38 support 2 prueths  with am437x-idk-evm in default. 

But we want to support one prueth,  and remove prueth0 node in dts like following:

/* Dual-MAC Ethernet application node on PRU-ICSS1 */
pruss1_eth: pruss1_eth {
    compatible = "ti,am4376-prueth";
    prus = <&pru1_0>, <&pru1_1>;
    firmware-name = "ti-pruss/am437x-pru0-prueth-fw.elf",
                    "ti-pruss/am437x-pru1-prueth-fw.elf";
    sram = <&ocmcram>;
    interrupt-parent = <&pruss1_intc>;
    mii-rt = <&pruss1_mii_rt>;

    pinctrl-0 = <&pruss1_eth_default>;
    pinctrl-names = "default";
    interrupts = <20>, <21>;
    interrupt-names = "rx_red_hp", "rx_red_lp";

    /*

    pruss1_emac0: ethernet-mii0 {
         phy-handle = <&pruss1_eth0_phy>;
         phy-mode = "mii";
         interrupts = <20>, <22>, <23>, <26>;
         interrupt-names = "rx", "tx", "hsrprp_ptp_tx", "emac_ptp_tx";
         /* Filled in by bootloader */
         local-mac-address = [00 00 00 00 00 00];
    };

    */

    pruss1_emac1: ethernet-mii1 {
    phy-handle = <&pruss1_eth1_phy>;
    phy-mode = "mii";
    interrupts = <21>, <23>, <24>, <27>;
    interrupt-names = "rx", "tx", "hsrprp_ptp_tx", "emac_ptp_tx";
    /* Filled in by bootloader */
    local-mac-address = [00 00 00 00 00 00];
  };
};

&pruss1_mdio {
       pinctrl-0 = <&pruss1_mdio_default>;
       pinctrl-names = "default";
       status = "okay";

       reset-delay-us = <2>; /* PHY datasheet states 1uS min */

       /*

       pruss1_eth0_phy: ethernet-phy@0 {
              reg = <0>;
       };

       */

       pruss1_eth1_phy: ethernet-phy@1 {
              reg = <1>;
       };
};

But the kernel throw panic info when init prueth device.  

And how to support only one prueth ?   Thanks!

  • Hello Xujin,

    linux-rt-4.18.38 is not a TI supported software release. Please note that the TI kernel includes prueth driver code that has not yet been upstreamed, so I might see different behavior than you do. I am looking at SDK 5.3, Linux 4.14 when answering this post.

    Device tree changes: please reference Documentation/devicetree/bindings/net/ti-prueth.txt

    1) aliases - remove the PRU that is not being used. See bindings documentation for example.

    2) pruss1_eth - remove the firmware-name for the PRU that is not being used. See bindings documentation for an example.

    If those changes do not enable single EMAC mode, please attach the terminal output with your kernel panic.

    Regards,

    Nick 

    Edited Nov 6 2019

  • Hello Xujin,

    I assume you resolved your issue. If not, feel free to reply and continue the conversation.

    Regards,

    Nick