AM437X pru网络问题

Other Parts Discussed in Thread: TLK105L, AM4372

各位好:
       本公司设计的板卡有两路网口,一路是千兆的以太网,使用网卡芯片KSZ9031接到ARM43777的rgmii1接口上,mdio_clk和mdio_data分别连接B17和A17使用CPSW驱动,该网口能正常工作。
另一路是PRU的网络使用网卡芯片TLK105L接到ARM43777的pru1_mii1接口上,dio_clk和mdio_data分别连接A12和B12使用prueth驱动,在系统启动后无法识别到该网卡,串口终端报了prueth pruss1_eth: unable to get pruss handle错误。设备树中参照了TI的开发板增加了pru网络的配置,linux内核使用的是4.4.12的RT Linux内核,lsmod看出pru网络相关驱动也已经加载。
完整的终端打印的启动log信息及设备树配置文件见附件,请帮助分析下可能是什么问题,非常感谢!
pru网络打印的错误信息:
[    7.341569] prueth pruss1_eth: unable to get pruss handle
[    7.365143]  remoteproc0: powering up wkup_m3
[    7.393374]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 216260
[    7.394150]  remoteproc0: remote processor wkup_m3 is now up
[    7.394289] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x191

如下ifconfig只有一块网卡
root@am437x-evm:~# ifconfig
eth0      Link encap:Ethernet  HWaddr A0:F6:FD:1B:77:68  
          inet addr: 192.168.200.121 Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr:fe80::a2f6:fdff:fe1b:7768/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:777 errors:0 dropped:54 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:48430 (47.2 KiB)  TX bytes:1552 (1.5 kiB)
          Interrupt:239

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:700 (700.0 B)  TX bytes:700 (700.0 B)

am437x-gp-evm.dts设备树中pru网络配置:
/* Dual-MAC Ethernet application node on PRU-ICSS1 */
pruss1_eth {
  compatible = "ti,am4372-prueth";
  pruss = <&pruss1>;
  sram = <&ocmcram_nocache>;
  interrupt-parent = <&pruss1_intc>;
  pinctrl-0 = <&pruss1_eth_default>;
  pinctrl-names = "default";
  pruss1_emac0: ethernet-mii0 {
   phy-handle = <&pruss1_eth0_phy>;
   phy-mode = "mii";
   interrupts = <20>, <22>;
   interrupt-names = "rx", "tx";
   /* Filled in by bootloader */
   local-mac-address = [00 00 00 00 00 00];
  };
};

pruss1_eth_default: pruss1_eth_default {
  pinctrl-single,pins = <
  0x58 ( PIN_INPUT | MUX_MODE5 ) /* (E8) gpmc_a6.pr1_mii_mt1_clk */
  0x54 ( PIN_OUTPUT | MUX_MODE5 ) /* (E7) gpmc_a5.pr1_mii1_txd0 */
  0x50 ( PIN_OUTPUT | MUX_MODE5 ) /* (D7) gpmc_a4.pr1_mii1_txd1 */
  0x4c ( PIN_OUTPUT | MUX_MODE5 ) /* (A4) gpmc_a3.pr1_mii1_txd2 */
  0x48 ( PIN_OUTPUT | MUX_MODE5 ) /* (C6) gpmc_a2.pr1_mii1_txd3 */
  0x6c ( PIN_INPUT | MUX_MODE5 ) /* (D8) gpmc_a11.pr1_mii1_rxd0 */
  0x68 ( PIN_INPUT | MUX_MODE5 ) /* (G8) gpmc_a10.pr1_mii1_rxd1 */
  0x64 ( PIN_INPUT | MUX_MODE5 ) /* (B4) gpmc_a9.pr1_mii1_rxd2 */
  0x60 ( PIN_INPUT | MUX_MODE5 ) /* (F7) gpmc_a8.pr1_mii1_rxd3 */
  0x40 ( PIN_OUTPUT | MUX_MODE5 ) /* (C3) gpmc_a0.pr1_mii1_txen */
  0x5c ( PIN_INPUT | MUX_MODE5 ) /* (F6) gpmc_a7.pr1_mii_mr1_clk */
  0x44 ( PIN_INPUT | MUX_MODE5 ) /* (C5) gpmc_a1.pr1_mii1_rxdv */
  0x74 ( PIN_INPUT | MUX_MODE5 ) /* (B3) gpmc_wpn.pr1_mii1_rxer */
  0x24c (PIN_INPUT | MUX_MODE5 ) /* (E24) gpio5_13.pr1_mii1_rxlink */
  0x244 (PIN_INPUT | MUX_MODE5 ) /* (F23) gpio5_11.pr1_mii1_crs */
  >;
};
pruss1_mdio_default: pruss1_mdio_default {
  pinctrl-single,pins = <
   //AM4372_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5))  /* (A12)gpmc_clk.pr1_mdio_mdclk */
   //AM4372_IOPAD(0x888, (PIN_INPUT  | MUX_MODE8))  /* (B12)xdma_event_intr0.pr1_mdio_data */
                        //AM4372_IOPAD(0xa6c, (PIN_INPUT_PULLUP | MUX_MODE7))     /* spi2_cs0.gpio3_25 */
                      0x8c ( PIN_OUTPUT | MUX_MODE5 ) /* (A12) gpmc_clk.pr1_mdio_mdclk */
   0x88 ( PIN_INPUT | MUX_MODE5 ) /* (B12) gpmc_csn3.pr1_mdio_data */
   0x248( PIN_OUTPUT | MUX_MODE7)     /* gpio5_12 */
   //0x248( PIN_INPUT_PULLUP | MUX_MODE7)     /* gpio5_12 */
  >;
};

& pruss_soc_bus {
status = "okay";
pruss1: pruss@54400000 {
  status = "okay";
  pru1_0: pru@54434000 {
   status = "okay";
  };
  pru1_1: pru@54438000 {
   status = "okay";
  };
};
pruss0: pruss@54440000 {
  status = "okay";
  pru0_0: pru@54474000 {
   status = "okay";
  };
  pru0_1: pru@54478000 {
   status = "okay";
  };
};
};

& pruss1_mdio {
pinctrl-0 = <&pruss1_mdio_default>;
pinctrl-names = "default";
status = "okay";
reset-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
reset-delay-us = <2>; /* PHY datasheet states 1uS min */
pruss1_eth0_phy: ethernet-phy@1 {
  reg = <1>;
};
};

am4372.dtsi中pru网络配置:

pruss_soc_bus: pruss_soc_bus@54426000 {
   compatible = "ti,am4372-pruss-soc-bus";
   reg = <0x54426000 0x2000>;
   ti,hwmods = "pruss";
   #address-cells = <1>;
   #size-cells = <1>;
   ranges;
   status = "disabled";

   pruss1: pruss@54400000 {
    compatible = "ti,am4372-pruss";
    reg = <0x54400000 0x2000>,
          <0x54402000 0x2000>,
          <0x54410000 0x8000>,
          <0x54426000 0x2000>,
          <0x5442e000 0x31c>,
          <0x54432000 0x58>;
    reg-names = "dram0", "dram1", "shrdram2", "cfg",
         "iep", "mii_rt";
    #address-cells = <1>;
    #size-cells = <1>;
    ranges;
    status = "disabled";

    pruss1_intc: intc@54420000 {
     compatible = "ti,am4372-pruss-intc";
     reg = <0x54420000 0x2000>;
     reg-names = "intc";
     interrupts =
         <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
     interrupt-names = "host2", "host3",
         "host4", "host5",
         "host6", "host8",
         "host9";
     interrupt-controller;
     #interrupt-cells = <1>;
    };

    pru1_0: pru@54434000 {
     compatible = "ti,am4372-pru";
     reg = <0x54434000 0x3000>,
           <0x54422000 0x400>,
           <0x54422400 0x100>;
     reg-names = "iram", "control", "debug";
     label = "pru0";
     interrupt-parent = <&pruss1_intc>;
     interrupts = <16>, <17>;
     interrupt-names = "vring", "kick";
     status = "disabled";
    };

    pru1_1: pru@54438000 {
     compatible = "ti,am4372-pru";
     reg = <0x54438000 0x3000>,
           <0x54424000 0x400>,
           <0x54424400 0x100>;
     reg-names = "iram", "control", "debug";
     label = "pru1";
     interrupt-parent = <&pruss1_intc>;
     interrupts = <18>, <19>;
     interrupt-names = "vring", "kick";
     status = "disabled";
    };

    pruss1_mdio: mdio@54432400 {
     compatible = "ti,davinci_mdio";
     reg = <0x54432400 0x90>;
     clocks = <&dpll_core_m4_ck>;
     clock-names = "fck";
     bus_freq = <1000000>;
     #address-cells = <1>;
     #size-cells = <0>;
     status = "disabled";
    };
   };

   pruss0: pruss@54440000 {
    compatible = "ti,am4372-pruss";
    reg = <0x54440000 0x1000>,
          <0x54442000 0x1000>,
          <0x54466000 0x2000>,
          <0x5446e000 0x31c>,
          <0x54472000 0x58>;
    reg-names = "dram0", "dram1", "cfg",
         "iep", "mii_rt";
    #address-cells = <1>;
    #size-cells = <1>;
    ranges;
    status = "disabled";

    pruss0_intc: intc@54460000 {
     compatible = "ti,am4372-pruss-intc";
     reg = <0x54460000 0x2000>;
     reg-names = "intc";
     interrupts =
         <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH
          GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
     interrupt-names = "host2", "host3",
         "host4", "host5",
         "host6", "host8",
         "host9";
     interrupt-controller;
     #interrupt-cells = <1>;
    };

    pru0_0: pru@54474000 {
     compatible = "ti,am4372-pru";
     reg = <0x54474000 0x1000>,
           <0x54462000 0x400>,
           <0x54462400 0x100>;
     reg-names = "iram", "control", "debug";
     label = "pru0";
     interrupt-parent = <&pruss0_intc>;
     interrupts = <16>, <17>;
     interrupt-names = "vring", "kick";
     status = "disabled";
    };

    pru0_1: pru@54478000 {
     compatible = "ti,am4372-pru";
     reg = <0x54478000 0x1000>,
           <0x54464000 0x400>,
           <0x54464400 0x100>;
     reg-names = "iram", "control", "debug";
     label = "pru1";
     interrupt-parent = <&pruss0_intc>;
     interrupts = <18>, <19>;
     interrupt-names = "vring", "kick";
     status = "disabled";
    };
   };
  };


root@am437x-evm:~# lsmod
Module                  Size  Used by
atemsys                12408  0
pvrsrvkm              406858  0
dwc3                   62533  0
udc_core               12079  1 dwc3
pm33xx                  3658  0
ti_am335x_adc           5643  0
ti_am335x_tsc           5965  0
snd_soc_simple_card     7736  0
prueth                 14377  0
ti_emif_sram            6064  1 pm33xx
wkup_m3_ipc             7616  1 pm33xx
snd_soc_tlv320aic3x    48260  1
pru_rproc               9865  1 prueth
omap_rng                4353  0
am437x_vpfe            23581  0
edt_ft5x06             10689  0
omap_aes_driver        18260  0
rng_core                7698  1 omap_rng
ov2659                  9618  0
pruss                  11281  2 pru_rproc,prueth
dwc3_omap               4553  0
omap_des               11214  0
extcon                 13929  2 dwc3,dwc3_omap
wkup_m3_rproc           3669  1
remoteproc             26956  5 pruss,wkup_m3_rproc,pru_rproc,prueth,wkup_m3_ipc
virtio                  6677  1 remoteproc
virtio_ring            12035  1 remoteproc
omap_sham              20318  0
c_can_platform          6638  0
c_can                   9450  1 c_can_platform
can_dev                12254  1 c_can
cryptodev              38437  0
ti_am335x_tscadc        6106  2 ti_am335x_adc,ti_am335x_tsc
omap_wdt                4655  0
设备树及板卡启动串口打印.zip