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.

TMDS64GPEVM: eth1 port is cpsw instead of prueth

Part Number: TMDS64GPEVM

I am running tisdk-default-image-am64xx-evm on a AM64xx-evm board booting from SD-Card.

I was expecting port eth1 (top port on dual port connector) to be connected to PRU like eth2 (bottom port) but instead it loads the driver cpsw like the single port eth0.

See below the boot log:

....

[ 11.801214] icssg-prueth icssg1-eth: TI PRU ethernet driver initialized: single EMAC mode

...

[ 15.664737] remoteproc remoteproc11: powering up 300b4000.pru
[ 15.674475] remoteproc remoteproc11: Booting fw image ti-pruss/am65x-sr2-pru0-prueth-fw.elf, size 37264
[ 15.674548] remoteproc remoteproc11: unsupported resource 5
[ 15.674578] remoteproc remoteproc11: remote processor 300b4000.pru is now up
[ 15.674626] remoteproc remoteproc12: powering up 30084000.rtu
[ 15.681564] remoteproc remoteproc12: Booting fw image ti-pruss/am65x-sr2-rtu0-prueth-fw.elf, size 30832
[ 15.681634] remoteproc remoteproc12: remote processor 30084000.rtu is now up
[ 15.681687] remoteproc remoteproc13: powering up 3008a000.txpru
[ 15.683374] remoteproc remoteproc13: Booting fw image ti-pruss/am65x-sr2-txpru0-prueth-fw.elf, size 36656
[ 15.683447] remoteproc remoteproc13: remote processor 3008a000.txpru is now up
[ 15.698775] pps pps1: new PPS source ptp2
[ 15.746077] TI DP83869 300b2400.mdio:0f: attached PHY driver [TI DP83869] (mii_bus:phy_addr=300b2400.mdio:0f, irq=POLL)
[ 15.746367] net eth2: started
[ 15.939268] TI DP83869 0.1:03: attached PHY driver [TI DP83869] (mii_bus:phy_addr=0.1:03, irq=POLL)
[ 15.961264] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
[ 16.031455] TI DP83867 8000f00.mdio:00: attached PHY driver [TI DP83867] (mii_bus:phy_addr=8000f00.mdio:00, irq=POLL)
[ 16.034524] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down

1. Is it possible to have PRU Dual MAC firmware loaded by Linux remoteproc on eth1 and eth2 instead of PRU single EMAC on eth2 and cpsw on eth1?

Maybe by changing uEnv.txt to add k3-am642-evm-icssg1-dualemac.dtbo device-tree overlay? How?

2. Or do I need Linux remoteproc to load an r5 firmware program that loads PRU Dual MAC firmware or Switch firmware or Industrial comm like the examples in mcu_plus_sdk? 

In that case how to prevent Linux from loading the PRU firmware? Create/modify the device tree file, how?

Thank you.

  • Hello,

    It looks like there is a way to switch between CPSW and PRU Ethernet on one of the RJ45 ports according to the AM64x EVM User's Guide (https://www.ti.com/lit/spruix0), section "Ethernet Interface"

    Try selecting a PRU Ethernet overlay devicetree binary at boot time. Does that give you two PRU Ethernet ports and one CPSW port?
    https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/08_02_00_17/exports/docs/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet.html?hig#mii-support

    Regards,

    Nick

  • That worked thank you, except the name of the overlay file was slightly different:

    setenv name_overlays k3-am642-evm-icssg1-dualemac.dtbo instead of setenv name_overlays k3-am642-evm-icssg1-dualemac-mii.dtbo as per the dev's guide.

    Thank you,

    Decameron

  • Hello Decameron,

    Thank you for responding back with your solution! I will file a ticket to update the documentation so it is more clear that the Linux SDK configures the CPSW by default, and one of those two overlays must be applied to configure the PRU Ethernet.

    Regards,

    Nick

  • This is the info that we will add to documentation somewhere:

    On AM64x EVM, one Ethernet port is connected to CPSW, one Ethernet port is connected to PRU Ethernet, and one Ethernet port can be muxed to either CPSW or PRU Ethernet depending on the device tree settings.
    The Ethernet port is muxed to CPSW by default in the AM64x EVM device tree file k3-am642-evm.dts. In order to mux the Ethernet port to PRU Ethernet, override the mux settings by applying one of these two overlay files in uboot:
    k3-am642-evm-icssg1-dualemac.dtbo (both PRU Ethernet PHYs set to RGMII)
    k3-am642-evm-icssg1-dualemac-mii.dtbo (both PRU Ethernet PHYs set to MII)

    For example, to use MII interface the k3-am642-evm-icssg1-dualemac-mii.dtbo overlay file has to be applied using the following command in uboot.
    setenv bootcmd 'run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; setenv name_overlays k3-am642-evm-icssg1-dualemac-mii.dtbo; run get_overlay_${boot}; run run_kern'

  • Hi Nick,
    Is 2x ETH via PRU-ICSS and 1x ETH via CPSW the only supported config?
    Or can the SW (and the AM64x EVM) be configured for 2xETH on CPSW and 1x Eth on PRU-ICSS?

    If there is a limitation can you please described where the limitation is (like for example ICSS-firmware that will always try to access the two EMAC ports even if not enable in HW, the Linux side low level code (like Linux config) does not have the granularity to config one single PUR EMAC, ..etc).

    Thanks in avdance,

    A.

  • Hello A,

    Both configurations are supported. Please take another look at this response for how to switch between them:
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1137215/tmds64gpevm-eth1-port-is-cpsw-instead-of-prueth/4223083#4223083

    The history of dual EMAC vs single EMAC PRU Ethernet

    A couple of years ago when we first added PRU Ethernet on AM335x PRU-ICSS, it was dual EMAC only (i.e., software required two PRU Ethernet ports), and then in a later software release we added the option to only use one PRU Ethernet port. However, on the current SDK releases on AM64x, you do not need to do anything special to use just one PRU Ethernet port. If only one Ethernet port is defined, then the driver will work in single EMAC mode automatically.

    Regards,

    NIck