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.

AM6548: PRU Eth: Unable to get PRU0 : -19

Part Number: AM6548

Hi,

I am trying to get the PRU ethernet drivers to function using linux SDK 8.0. I am running into an issue when on bootup, or whenever I try to manually start the icssg-prueth module, I get the error code: "icssg-prueth pruss2_eth: unable to get PRU0: -19". My device tree for the prueth is as follows, I copied it from an example:

/* Dual Ethernet application node on PRU-ICSSG2 */
pruss2_eth: pruss2_eth {
compatible = "ti,am654-icssg-prueth";
pinctrl-names = "default";
pinctrl-0 = <&icssg2_rgmii_pins_default>;
sram = <&msmc_ram>;

prus = <&pru2_0>, <&rtu2_0>, <&tx_pru2_0>, <&pru2_1>, <&rtu2_1>, <&tx_pru2_1>;
firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
"ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
"ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
"ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
"ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
"ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
ti,pruss-gp-mux-sel = <2>, /* MII mode */
<2>,
<2>,
<2>, /* MII mode */
<2>,
<2>;
mii-g-rt = <&icssg2_mii_g_rt>;
mii-rt = <&icssg2_mii_rt>;
dma-coherent;
dmas = <&main_udmap 0xc300>, /* egress slice 0 */
<&main_udmap 0xc301>, /* egress slice 0 */
<&main_udmap 0xc302>, /* egress slice 0 */
<&main_udmap 0xc303>, /* egress slice 0 */
<&main_udmap 0xc304>, /* egress slice 1 */
<&main_udmap 0xc305>, /* egress slice 1 */
<&main_udmap 0xc306>, /* egress slice 1 */
<&main_udmap 0xc307>, /* egress slice 1 */

<&main_udmap 0x4300>, /* ingress slice 0 */
<&main_udmap 0x4301>, /* ingress slice 1 */
<&main_udmap 0x4302>, /* mgmnt rsp slice 0 */
<&main_udmap 0x4303>; /* mgmnt rsp slice 1 */
dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
"tx1-0", "tx1-1", "tx1-2", "tx1-3",
"rx0", "rx1",
"rxmgm0", "rxmgm1";

pruss2_emac0: ethernet-mii0 {
phy-handle = <&pruss2_eth0_phy>;
phy-mode = "rgmii-rxid";
interrupts-extended = <&icssg2_intc 24>;
syscon-rgmii-delay = <&scm_conf 0x4120>;
iep = <&icssg2_iep0>;
/* Filled in by bootloader */
local-mac-address = [00 00 00 00 00 00];
};

pruss2_emac1: ethernet-mii1 {
phy-handle = <&pruss2_eth1_phy>;
phy-mode = "rgmii-rxid";
interrupts-extended = <&icssg2_intc 25>;
syscon-rgmii-delay = <&scm_conf 0x4124>;
/* Filled in by bootloader */
local-mac-address = [00 00 00 00 00 00];
};
};

//pinmux stuff...

&icssg2_mdio {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&icssg2_mdio_pins_default>;

pruss2_eth0_phy: ethernet-phy@0 {
reg = <0>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
};

pruss2_eth1_phy: ethernet-phy@3 {
reg = <3>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
};
};

I'm not sure where to go from here. I tried manually loading and starting the pru firmware and then rmmod the icssg-prueth and restart it as follows but still get the same error:

echo 'ti-pruss/am65x-sr2-pru0-prueth-fw.elf' > /sys/class/remoteproc/remoteproc13/firmware
echo 'ti-pruss/am65x-sr2-rtu0-prueth-fw.elf' > /sys/class/remoteproc/remoteproc14/firmware
echo 'ti-pruss/am65x-sr2-txpru0-prueth-fw.elf' > /sys/class/remoteproc/remoteproc15/firmware
echo 'ti-pruss/am65x-sr2-pru1-prueth-fw.elf' > /sys/class/remoteproc/remoteproc16/firmware
echo 'ti-pruss/am65x-sr2-rtu1-prueth-fw.elf' > /sys/class/remoteproc/remoteproc17/firmware
echo 'ti-pruss/am65x-sr2-txpru1-prueth-fw.elf' > /sys/class/remoteproc/remoteproc18/firmware

echo 'start' > /sys/class/remoteproc/remoteproc13/state
echo 'start' > /sys/class/remoteproc/remoteproc14/state
echo 'start' > /sys/class/remoteproc/remoteproc15/state
echo 'start' > /sys/class/remoteproc/remoteproc16/state
echo 'start' > /sys/class/remoteproc/remoteproc17/state
echo 'start' > /sys/class/remoteproc/remoteproc18/state

Any suggestions? I am guessing I am missing something simple here. Thanks!

  • Hello,

    Apologies for the delayed response. I am on vacation through the rest of August, so the next response will be delayed as well.

    Note that the Linux Ethernet driver expects to own the PRU cores. So if you try to use the sysfs interface to manually turn the cores off and on, Linux will get confused.

    If everything is set up properly, I would expect the PRU Ethernet firmware to be loaded during boot time. You should be able to use ifconfig -a to see the PRU Ethernet interfaces, and use ifconfig commands to bring up the interfaces if they are not already up.

    Regards,

    Nick

  • Hi Nick,

    Thanks for the reply. As it turns out it was an error in my device tree. The PRU cores must've not been getting registered correctly with linux. Fixing the device tree solved my problem.

  • Keith,

    thanks for closing the loop here, this is always very much appreciated.

    Regards, Andreas