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.

AM5749: IDK574x: PR1 Ethernet hardware modifications

Part Number: AM5749
Other Parts Discussed in Thread: SYSCONFIG, TLK105L

Hello,

Is there any documentation about hardware modifications to switch from 2 Gigabit Ethernet ports to 2 PR1 Ethernet port on IDK574x board?
This should allow to test with 4 Industrial Ethernet ports.

There is a existing devicetree onverlay for the am571x-idk (am571x-idk-icss1eth.dtso) that can be used to modify the am574x-idk devicetree.
The uboot pinmux needs to be updated with sysconfig to remove GMAC interface and enable PRUSS1_MDIO.

But after that, one of the phy is not detected:

davinci_mdio 4b232400.mdio: davinci mdio revision 1.6, bus freq 1000000
libphy: 4b232400.mdio: probed
mdio_bus 4b232400.mdio: MDIO device at address 0 is missing.
PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]
davinci_mdio 4b232400.mdio: phy[1]: device 4b232400.mdio:01, driver TI TLK10X 10/100 Mbps PHY
davinci_mdio 4b2b2400.mdio: davinci mdio revision 1.6, bus freq 1000000
libphy: 4b2b2400.mdio: probed
davinci_mdio 4b2b2400.mdio: phy[0]: device 4b2b2400.mdio:00, driver TI TLK10X 10/100 Mbps PHY
davinci_mdio 4b2b2400.mdio: phy[1]: device 4b2b2400.mdio:01, driver TI TLK10X 10/100 Mbps PHY

Is something is missing?

Best regards,
Romain

  • Romain Naour said:
    Is there any documentation about hardware modifications to switch from 2 Gigabit Ethernet ports to 2 PR1 Ethernet port on IDK574x board?

    AM574x Industrial Development Kit (IDK) Evaluation Module (EVM) (Rev. B) contains:

    The TMDSIDK574 User's Guide doesn't go into detail on how to change the hardware to enable the PRU1 Ethernet ports.

    However, from the AM574x Industrial Development Kit (IDK) Schematic it should be possible to determine which resistors to remove and which to add, in order to

    • Disconnect the two KSZ9031 transceivers for the GbE Ethernet ports
    • Connect the the two TLK105L transceivers for the PCU-ICSS ports on PRU1

    Looking at the schematic, I would expect all four TLK105L transceivers for the PCU-ICSS ports to respond to MDIO requests in the default configuration as the TMDSIDK574 is shipped. It is the other TLK105L MII signals which are not connected to the TLK105L's on PRU1 in the default configuration,

    If GPIO_PRU1_ETH0_RESETn is low, that would hold the TLK105L U9 in reset which might explain the "mdio_bus 4b232400.mdio: MDIO device at address 0 is missing" message.

  • Hello,

    Thanks for the feedback!

    Indeed, it was an issue with GPIO_PRU1_ETH0_RESETn signal that keep the TLK105L U9 in reset.

    Herer is my updated am574x-idk.dts

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
     */
    
    
    /dts-v1/;
    
    #include "dra74x-p.dtsi"
    #include "dra7-mmc-iodelay.dtsi"
    #include "dra76x-mmc-iodelay.dtsi"
    #include "am572x-idk-common.dtsi"
    
    / {
    	model = "TI AM5748 IDK";
    	compatible = "ti,am5728-idk", "ti,dra762", "ti,dra7";
    
    	aliases {
    		ethernet4 = &pruss1_emac0;
    		ethernet5 = &pruss1_emac1;
    	};
    
    	/* Dual mac ethernet application node on icss1 */
    	pruss1_eth: pruss1_eth {
    		status = "okay";
    		compatible = "ti,am57-prueth";
    		prus = <&pru1_0>, <&pru1_1>;
    		firmware-name = "ti-pruss/am57xx-pru0-prueth-fw.elf",
    				"ti-pruss/am57xx-pru1-prueth-fw.elf";
    		sram = <&ocmcram1>;
    		interrupt-parent = <&pruss1_intc>;
    		mii-rt = <&pruss1_mii_rt>;
    		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];
    		};
    	};
    };
    
    &qspi {
    	spi-max-frequency = <96000000>;
    	m25p80@0 {
    		spi-max-frequency = <96000000>;
    	};
    };
    
    &mmc1 {
    	pinctrl-names = "default", "hs";
    	pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
    	pinctrl-1 = <&mmc1_pins_hs>;
    };
    
    &mmc2 {
    	pinctrl-names = "default", "hs", "ddr_3_3v";
    	pinctrl-0 = <&mmc2_pins_default>;
    	pinctrl-1 = <&mmc2_pins_default>;
    	pinctrl-2 = <&mmc2_pins_default>;
    };
    
    &emif1 {
    	status = "okay";
    };
    
    &pruss2_mdio {
    	reset-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>,
    		      <&gpio5 9 GPIO_ACTIVE_LOW>;
    	reset-delay-us = <2>;   /* PHY datasheet states 1uS min */
    };
    
    // gpio5.6 MCASP1_AXR4 E12 GPIO_PRU1_ETH0_RESETn
    // gpio5.7 MCASP1_AXR5 F13 GPIO_PRU1_ETH1_RESETn
    &pruss1_mdio {
    	status = "okay";
    	reset-gpios = <&gpio5 6 GPIO_ACTIVE_LOW>,
    		      <&gpio5 7 GPIO_ACTIVE_LOW>;
    	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>;
    	};
    };
    
    // IDK-574x modified to use PRU1 eth0 and PRU1 eth1, so we have to disable
    // these 2 Gigabite Ethernet.
    &cpsw_emac0 {
    	status = "disabled";
    };
    
    &cpsw_emac1 {
    	status = "disabled";
    };
    
    &davinci_mdio {
    	status = "disabled";
    };
    
    &mac {
    	status = "disabled";
    };
    

    For some reason the reset gpio gpio5.6 doesn't release the phy properly as is.
    I had to force the GPIO to release the phy.

    Finally, the 4 Industrial Ethernet ports are detected and available but I have to reboot twice to detect the phy at the address 0.

    # ifconfig
    eth0      Link encap:Ethernet  HWaddr 70:FF:76:1C:34:CB  
              inet addr:192.168.1.27  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::72ff:76ff:fe1c:34cb/64 Scope:Link
              inet6 addr: 2a01:cb05:8f8a:1800:72ff:76ff:fe1c:34cb/64 Scope:Global
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:386 errors:0 dropped:48 overruns:0 frame:0
              TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:67350 (65.7 KiB)  TX bytes:18899 (18.4 KiB)
    eth1      Link encap:Ethernet  HWaddr 70:FF:76:1C:34:CC  
              inet addr:10.42.0.173  Bcast:10.42.0.255  Mask:255.255.255.0
              inet6 addr: fe80::72ff:76ff:fe1c:34cc/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:10 errors:0 dropped:0 overruns:0 frame:0
              TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1775 (1.7 KiB)  TX bytes:12186 (11.9 KiB)
    eth2      Link encap:Ethernet  HWaddr 70:FF:76:1C:34:CD  
              inet6 addr: fe80::72ff:76ff:fe1c:34cd/64 Scope:Link
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:2761 (2.6 KiB)
    eth3      Link encap:Ethernet  HWaddr 70:FF:76:1C:34:CE  
              inet6 addr: fe80::72ff:76ff:fe1c:34ce/64 Scope:Link
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:12447 (12.1 KiB)

    Best regards,
    Romain