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.

AM57x PRU-ICSS Ethernet network unreachable

Other Parts Discussed in Thread: AM5718, DRA72, DRA722, AM5728, DRA742, TLK105L

our board schematic is reference IDK board. 

The device tree is added with the code below:

/* Dual-MAC Ethernet application node on PRU-ICSS2 */
pruss2_eth {
compatible = "ti,am57-prueth";
pruss = <&pruss2>;
sram = <&ocmcram1>;
interrupt-parent = <&pruss2_intc>;

pruss2_emac0: ethernet-mii0 {
phy-handle = <&pruss2_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];
};

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

Compile and generate a new device tree file, restart the board.

It is found that two network devices eth2 and eth3 are generated

Set the ip address and netmask for eth2:

ifconfig eth2 192.168.0.112 netmask 255.255.255.0

 route add default  gw 192.168.0.1

Execute the ifconfig command to print the information as follows

eth2            Link encap:Ethernet HWaddr 22:7B:C3:F7:DE:28
                    inet addr:192.168.0.112  Bcast:192.168.0.255  Mask:255.255.255.0
                   RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000
                  RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth3          Link encap:Ethernet HWaddr 32:FD:E0:4F:95:1E
                  UP BROADCAST MULTICAST MTU:1500 Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                 collisions:0 txqueuelen:1000
                 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

 The ping command found network impassability

root@am57xx-evm:~# ping 192.168.0.249

PING 192.168.0.249 : 56 data bytes

AM57xx PRU-ICSS network unreachable  reasons?

  • The Ethernet experts have been notified. They will respond here, but there may be a delay due to holidays in the USA this week.
  • Hi user4205571,

    It seems that the eth2 configuration is applied properly. I suggest you to check the network cable and device port. Also check the Linux kernel log "dmesg" command output. If all seems correct make the following test:
    Connect the AM57xx board network cable to PC. Configure the PC ethernet interface to be in same subnet with the board. Install on the PC Wireshark and start a capture. Ping the PC from the board. Save and attach the capture.
    Wireshark can be downloaded from: www.wireshark.org/download.html


    BR
    Tsvetolin Shulev

  • Hi :
    1、 When plugging the network cable, dmesg command to see the following print
    [ 19.267102] net eth2: started
    [ 19.275920] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
    [ 81.199667] eth2: Link is Up - 100Mbps/Full - flow control rx/tx
    [ 81.206097] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
    [ 93.783138] eth2: Link is Down
    [ 93.783148] eth2: No link to transmit
    [ 93.783153] eth2: No link to transmit
    [ 93.783157] eth2: No link to transmit
    [ 93.783161] eth2: No link to transmit
    [ 93.783164] eth2: No link to transmit
    [ 93.783167] eth2: No link to transmit
    [ 93.783171] eth2: No link to transmit
    [ 93.783174] eth2: No link to transmit
    [ 93.783177] eth2: No link to transmit
    [ 93.783178] eth2: No link to transmit
    [ 218.897225] eth2: Link is Up - 100Mbps/Full - flow control rx/tx
    [ 270.591781] eth2: Link is Down
    [ 291.583605] eth2: Link is Up - 100Mbps/Full - flow control rx/tx

    Use the oscilloscope to measure the signal:
    RXD [0: 1], RX_DV has the signal
    TXD [0: 3], TX_EN has no signal
    The TX_CLK and RX_CLK clocks are 25MHZ
  • HI:
    I am using the Linux Processor SDK (V3.0.0.4). Will pru generate eth2 and eth3 , it can directly network of ping. What do you need to do??
  • Can you verify that you have 'ti,am5728-idk' or 'ti,am5718-idk' in the compatibility string of your device tree? E.g:

    compatible = "ti,am5718-idk", "ti,am5718", "ti,dra722", "ti,dra72", "ti,dra7";

    Also, can you post the output of the following command:

    ls /dev/ | grep pru

    Jason Reeder

  • HI:
    ls /dev/ | grep pru
    rpmsg_pru32
    rpmsg_pru33
  • HI
    The following is my “dmesg | grep pru ” command
    root@am57xx-evm:~# dmesg | grep pru
    [ 5.563577] ti-pruss 4b280000.pruss: creating PRU cores and other child platform devices
    [ 6.022271] remoteproc4: 4b2b4000.pru0 is available
    [ 6.086001] pru-rproc 4b2b4000.pru0: PRU rproc node /ocp/pruss@4b280000/pru0@4b2b4000 probed successfully
    [ 6.108810] remoteproc5: 4b2b8000.pru1 is available
    [ 6.179428] pru-rproc 4b2b8000.pru1: PRU rproc node /ocp/pruss@4b280000/pru1@4b2b8000 probed successfully
    [ 6.953822] prueth pruss2_eth: port 1: using random MAC addr: f2:c0:60:f7:35:75
    [ 7.048733] prueth pruss2_eth: port 2: using random MAC addr: 42:43:c0:32:54:f5
    [ 7.129582] prueth pruss2_eth: TI PRU ethernet driver initialized
    [ 7.366547] remoteproc5: powering up 4b2b8000.pru1
    [ 7.387767] remoteproc5: Booting fw image am57xx-pru2_1-fw, size 80768
    [ 7.387801] ti-pruss 4b280000.pruss: configured system_events = 0x0800000000000000 intr_channels = 0x00000002 host_intr = 0x00000002
    [ 7.387805] remoteproc5: remote processor 4b2b8000.pru1 is now up
    [ 7.390105] remoteproc4: powering up 4b2b4000.pru0
    [ 7.390238] remoteproc4: Booting fw image am57xx-pru2_0-fw, size 80760
    [ 7.390269] ti-pruss 4b280000.pruss: configured system_events = 0x1000000000000000 intr_channels = 0x00000001 host_intr = 0x00000001
    [ 7.390273] remoteproc4: remote processor 4b2b4000.pru0 is now up
    [ 7.913309] virtio_rpmsg_bus virtio3: creating channel rpmsg-pru addr 0x20
    [ 7.975176] virtio_rpmsg_bus virtio4: creating channel rpmsg-pru addr 0x21
    [ 8.200596] rpmsg_pru rpmsg7: new rpmsg_pru device: /dev/rpmsg_pru32
    [ 8.247335] rpmsg_pru rpmsg8: new rpmsg_pru device: /dev/rpmsg_pru33
  • Do you have 'ti,am5728-idk' or 'ti,am5718-idk' in the compatibility string of your device tree? See the top of this AM527x IDK dts file as an example: http://git.ti.com/ti-linux-kernel/ti-linux-kernel/blobs/ti-lsk-linux-4.4.y/arch/arm/boot/dts/am572x-idk.dts

    It appears that your PRUs are being loaded with the general purpose firmwares instead of the PRU Ethernet firmwares. The PRU RemoteProc driver checks for the 'ti,am5728-idk' in the compatibility string of the device tree to determine whether or not to load the general purpose firmware into the PRU or the PRU Ethernet firmware.

    Jason Reeder

  • HI
    I have added “ti,am5728-idk” in the compatibility string of your device tree
    model = "TI AM5728 IGH-X15";
    compatible = "ti,am572x-igh-x15", "ti,am5728-idk" , "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";

    Also found eth2 and eth3

    eth2 Link encap:Ethernet HWaddr 36:45:0E:A1:FF:7E
    inet6 addr: fe80::3445:eff:fea1:ff7e/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1 errors:0 dropped:0 overruns:0 frame:1
    TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:727 (727.0 B) TX bytes:5065 (4.9 KiB)

    eth3 Link encap:Ethernet HWaddr 8A:0E:D1:8E:D2:9A
    inet6 addr: fe80::880e:d1ff:fe8e:d29a/64 Scope:Link
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:4 errors:0 dropped:0 overruns:0 frame:4
    TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:3447 (3.3 KiB) TX bytes:6271 (6.1 KiB)

    Why not get to the ip address, the network of ping nowhere???
  • Hi
    I have added “ti,am5728-idk” in the compatibility string of your device tree,

    The rpmsg_pru32 and rpmsg_pru33 devices are not found。
    root@am57xx-evm:~# ls /dev/ | grep rpmsg
    rpmsg-dce
    rpmsg_pru30
    rpmsg_pru31

    Virtio_rpmsg_bus No channel is created

    root@am57xx-evm:~# dmesg | grep pru
    [ 5.689249] ti-pruss 4b200000.pruss: creating PRU cores and other child platform devices
    [ 5.719437] ti-pruss 4b280000.pruss: creating PRU cores and other child platform devices
    [ 5.943486] remoteproc4: 4b234000.pru0 is available
    [ 6.043450] pru-rproc 4b234000.pru0: PRU rproc node /ocp/pruss@4b200000/pru0@4b234000 pr
    obed successfully
    [ 6.076919] remoteproc5: 4b238000.pru1 is available
    [ 6.141220] pru-rproc 4b238000.pru1: PRU rproc node /ocp/pruss@4b200000/pru1@4b238000 pr
    obed successfully
    [ 6.174535] remoteproc6: 4b2b4000.pru0 is available
    [ 6.239374] pru-rproc 4b2b4000.pru0: PRU rproc node /ocp/pruss@4b280000/pru0@4b2b4000 pr
    obed successfully
    [ 6.285027] remoteproc7: 4b2b8000.pru1 is available
    [ 6.386234] pru-rproc 4b2b8000.pru1: PRU rproc node /ocp/pruss@4b280000/pru1@4b2b8000 pr
    obed successfully
    [ 6.707735] prueth pruss2_eth: port 1: using random MAC addr: c2:e3:83:4b:58:8b
    [ 6.788846] prueth pruss2_eth: port 2: using random MAC addr: 9e:d3:7e:e1:4f:80
    [ 6.869996] prueth pruss2_eth: TI PRU ethernet driver initialized
    [ 7.102683] remoteproc7: powering up 4b2b8000.pru1
    [ 7.107566] remoteproc7: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 3645
    [ 7.159656] ti-pruss 4b280000.pruss: configured system_events = 0x0060000000a00000 intr_
    channels = 0x0000012a host_intr = 0x0000022a
    [ 7.159661] remoteproc7: remote processor 4b2b8000.pru1 is now up
    [ 7.193089] remoteproc6: powering up 4b2b4000.pru0
    [ 7.193149] remoteproc6: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 3645
    [ 7.193175] ti-pruss 4b280000.pruss: configured system_events = 0x0000060000500000 intr_
    channels = 0x00000095 host_intr = 0x00000115
    [ 7.193179] remoteproc6: remote processor 4b2b4000.pru0 is now up
    [ 7.418749] remoteproc4: powering up 4b234000.pru0
    [ 7.487419] remoteproc4: Booting fw image am57xx-pru1_0-fw, size 80760
    [ 7.541843] ti-pruss 4b200000.pruss: configured system_events = 0x1000000000000000 intr_
    channels = 0x00000001 host_intr = 0x00000001
    [ 7.596922] remoteproc4: remote processor 4b234000.pru0 is now up
    [ 7.624004] virtio_rpmsg_bus virtio3: creating channel rpmsg-pru addr 0x1e
    [ 7.660291] remoteproc5: powering up 4b238000.pru1
    [ 7.676385] remoteproc5: Booting fw image am57xx-pru1_1-fw, size 80768
    [ 7.698130] ti-pruss 4b200000.pruss: configured system_events = 0x0800000000000000 intr_
    channels = 0x00000002 host_intr = 0x00000002
    [ 7.755857] remoteproc5: remote processor 4b238000.pru1 is now up
    [ 7.767230] virtio_rpmsg_bus virtio4: creating channel rpmsg-pru addr 0x1f
    [ 8.105425] rpmsg_pru rpmsg7: new rpmsg_pru device: /dev/rpmsg_pru30
    [ 8.141527] rpmsg_pru rpmsg8: new rpmsg_pru device: /dev/rpmsg_pru31
  • From the log above it looks like the PRU Ethernet firmwares are being loaded into PRUSS2 PRU0 and PRUSS2 PRU 1 now:

    [ 7.107566] remoteproc7: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 3645

    [ 7.193149] remoteproc6: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 3645

    Are you able to get an IP address and ping now?

    Jason Reeder

    PS. /dev/rpmsg_pru30 and /dev/rpmsg_pru31 are coming from the out-of-box generic PRU firmwares that are being loaded into PRUSS1 PRU0 and PRUSS1 PRU1. This should not interfere with PRUSS2 performing its Ethernet responsibilities in any way.

  • Hi
    The TXD_EN, TX_CLK, RX_CLK, RXD [3: 0] signals are currently being detected using the oscilloscope. but TXD [3: 0] does not detect the signal
    Why ip address or can not be obtained, the network of ping nowhere??
  • Can you confirm that you configured the pin mux correctly for the PRU Ethernet pins? In the example provided in the Linux Processor SDK on the IDK boards this is accomplished during U-Boot. This might explain why you don't see signals on all of the Ethernet pins.

    Check out the '{u-boot directory}/board/ti/am57xx/board.c' and '{u-boot directory}/board/ti/am57xx/mux_data.h' files.

    Jason Reeder

  • HI:
    yes, I am configured the pin mux correctly for the PRU Ethernet pins.
    Our board power management solutions and IDK different, we use beagle's power management program, which will be affected??
  • Can you share your 'pruss2_mdio' pieces of your device tree as well? In the Processor SDK these are spread out across dra7.dtsi, am57xx-idk-common.dtsi, and am572x-idk.dts. I'm mostly interested in making sure that the 'reset-gpios' and 'reset-delay-us' properties are being set correctly (similar to the am572x-idk.dts file).

    Jason Reeder
  • HI Jason

    Here is what my device tree adds , which am572x-igh-x15 is our own board,

    compatible = "ti,am572x-igh-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";

    /* Dual-MAC Ethernet application node on PRU-ICSS2 */
    pruss2_eth {
    compatible = "ti,am57-prueth";
    pruss = <&pruss2>;
    sram = <&ocmcram1>;
    interrupt-parent = <&pruss2_intc>;

    pruss2_emac0: ethernet-mii0 {
    phy-handle = <&pruss2_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];
    };

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

    &pruss2 {
    status = "okay";
    pru2_0: pru0@4b2b4000 {
    interrupt-parent = <&pruss2_intc>;
    interrupts = <16>, <17>;
    interrupt-names = "vring", "kick";
    status = "okay";
    };

    pru2_1: pru1@4b2b8000 {
    interrupt-parent = <&pruss2_intc>;
    interrupts = <18>, <19>;
    interrupt-names = "vring", "kick";
    status = "okay";
    };
    };

    &pruss2_mdio {
    status = "okay";

    reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>,
    <&gpio2 19 GPIO_ACTIVE_LOW>;
    reset-delay-us = <2>; /* PHY datasheet states 1uS min */

    pruss2_eth0_phy: ethernet-phy@0 {
    reg = <0>;
    interrupt-parent = <&gpio2>;
    interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
    };

    pruss2_eth1_phy: ethernet-phy@1 {
    reg = <1>;
    interrupt-parent = <&gpio2>;
    interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
    };
    };


    Here is the path where I added the firmware in drivers/remoteproc/pru_rproc.c

    /*
    * use a different firmware name for PRU cores supporting
    * PRUSS ethernet on specific boards
    */
    if (of_machine_is_compatible("ti,am3359-icev2") ||
    of_machine_is_compatible("ti,am437x-idk-evm") ||
    of_machine_is_compatible("ti,am5728-idk") ||
    of_machine_is_compatible("ti,am5718-idk") ||
    of_machine_is_compatible("ti,am572x-igh-x15")) {
    if (use_eth_fw && (pdata->caps & PRU_FUNC_CAPS_ETHERNET)){
    use_eth = true;
    }
    }
  • Hi: Jason
    You can give a pru-eth firmware source??

    I can not find my device tree or the driver have any questions
    I suspect that OCMC or power management issues?
  • I spoke with the driver developers about your issue and they had the following questions:

    • What do you mean when you say 'we use beagle's power management program'?
      • If you are using power management we will need to be sure that the SRAM usage of the PRU Ethernet does not overlap with your power management.
    • Did you make any changes to the schematics on your board for the PRU Ethernet section when compared to our AM572x IDK board?
      • Would you be able to provide the PRU Ethernet portion of your schematic and the full DTS source?
      • Are you using the same Ethernet PHY that was on the IDK board and is it being bootstrapped correctly?
      • Are the PHY link and speed LEDs lighting up correctly on the RJ-45 connector?
    • You are using the kernel and file system provided in v3.0.0.4 of the Linux Processor SDK correct?
    • Can you provide your code where you are configuring your pin muxing of the PRU Ethernet pins?

    Jason Reeder

  • Hi jason

        The following is the schematic diagram of our board, We are not using the network port rj45 We are using HR911205C。the other part of the same IDK schematics 

        

    I am using the kernel and file system provided in v3.0.0.4 of the Linux Processor SDK 

    Attachment package contains the device tree source code, pin multiplexing configuration, the schematic diagram

      am728_igh.tar.gz

     

     

     

     

     

     

     

  • One thing that stands out is that you are boot strapping both of your PRU_ETH PHYs to address 0x01 on the PR2_MDIO bus. Table 5-1 in section 5.1.1 of the TLK105L datasheet (http://www.ti.com/lit/gpn/tlk105l) shows that the COL pin is the boot strap pin for PHYAD0. Both of your COL pins on your TLK105L connections are being set HIGH at reset which would make both of your PHYs respond to MDIO data sent to address 0x01.

    From your labels in your schematic it looks like you wanted to mimic the addressing on the IDK board where PR2_ETH0 is address 0x00 and PR2_ETH1 is address 0x01. See the differences in the COL pin strapping in the IDK schematic (http://www.ti.com/lit/pdf/tidrlh4) on pages 13 and 14. PR2_ETH0 has a 2.2k pull down resistor on the COL line that sets its address as 0x00 where PR2_ETH1 matches your schematic (no pull down) and gets set to address 0x01.

    Let me know if this helps.

    Jason Reeder

  • Hi jason

        As shown in our schematic section, the PR2_ETH0 has a pull-down on the COL pin with the 2.2K resistor set to address 0x00. PR2_ETH1 is the pull-up 2.2K resistor set address 0x01,

       I also made the following changes to ensure that the schematic diagram and IDK consistent:

         1,  Replace the L12 and L13 inductors with 0 ohm resistors  (pin 14)
         2,  the MDIO pull-up 2.2K resistor (pin 19)
         3,  the C367 and C368 capacitor removed (pin 18)

       Where is the PRU_ETH PHYs address set in the software section?

         

  • HI Jason

    IDK and EVM hardware GU found in the IDK board on the VDD_CORE set voltage is 1.15V, Beagle board VDD_CORE set voltage is 1.06V.This will have an impact on the PRU it?

    http://www.ti.com.cn/tool/cn/tmdxidk5728?keyMatch=AM5728%20IDK&tisearch=Search-CN-Everything

       

             http://processors.wiki.ti.com/index.php/AM572x_General_Purpose_EVM_HW_User_Guide

          

  • HI
    What do you mean"If you are using power management we will need to be sure that the SRAM usage of the PRU Ethernet does not overlap with your power management."?
  • My mistake, I had missed your pull down resistor on PR2_ETH0. This looks correct.

    My question about the power management was a misunderstanding. We thought you were talking about power management firmware that might be sharing SRAM space with the PRU Ethernet driver. But, it is now clear that you are talking about the Power Management IC on the board.

    I've got a few more request from the driver developers:

    • Please apply the attached patch (/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_debug_2D00_phy_2D00_spit_2D00_out_2D00_some_2D00_phy_2D00_registers.patch) and then provide the PHY register dump that appears in the kernel log. This is the dump from a working am572x-idk:
      • [   10.437566] ==== PHY regs ===

        [   10.437693] BMCR(0x0): 0x3100

        [   10.437823] BMSR(0x1): 0x7849

        [   10.437953] PHYIDR1(0x2): 0x2000

        [   10.438083] PHYIDR2(0x3): 0xa212

        [   10.438213] CR1(0x9): 0x7800

        [   10.438343] PHYSCR(0x11): 0x108

        [   10.438473] RCSR(0x17): 0x41

        [   10.438603] LEDCR(0x18): 0x400

        [   10.438733] PHYCR(0x19): 0x8000

        [   10.438734] =================

        [   10.517581] ==== PHY regs ===

        [   10.517708] BMCR(0x0): 0x3100

        [   10.517838] BMSR(0x1): 0x7849

        [   10.517968] PHYIDR1(0x2): 0x2000

        [   10.518098] PHYIDR2(0x3): 0xa212

        [   10.518228] CR1(0x9): 0x7800

        [   10.518358] PHYSCR(0x11): 0x108

        [   10.518488] RCSR(0x17): 0x41

        [   10.518620] LEDCR(0x18): 0x400

        [   10.518748] PHYCR(0x19): 0x8001

        [   10.518749] =================

    • Looking at the mux_data.h file we still can't tell which list is being selected on your board. Can you share your board.c file as well?
    • We would like to check if you are using the correct firmware blobs. Can you post the md5sum of the two .elf files in your file system?
      • md5sum /lib/firmware/ti-pruss/am57xx-pru0-prueth-fw.elf
        • af69f8d9bd5cf1b5fa7fede2e7be2f56  /lib/firmware/ti-pruss/am57xx-pru0-prueth-fw.elf
      • md5sum /lib/firmware/ti-pruss/am57xx-pru1-prueth-fw.elf
        • e0dd15996b60a72b7578fa536d988b13  /lib/firmware/ti-pruss/am57xx-pru1-prueth-fw.elf

    Jason Reeder