AM62A7: AM62A7: - Micrel KSZ9031 Ethernet Phy configuration issue with AM652A7

Part Number: AM62A7


Tool/software:

Hello TI,

We are using Micrel KSZ9031 Ethernet phy with our custom am62a7 board.

We are using yocto SDK and GCP environment.

I have made active micrel KSZ9031 phy in kernel configuration.

Problems:-

1. when i have tried to change configuration in dts file. then the log is not showing Micrel KSZ9031 Ethernet Phy configuration. below is the log

2. when i did not do any changes in kernel configuration and dts configuration then it is showing below log

Can you please support on ethernet on Micrel KSZ9031. What changes we need to do in dts file, in kernel configuration and other stuff.

My ethernet is connected on RGMII1.

I have added RGMII pin and MDIO pins in dts from device tree and it is correct.

If my logs showing phy Micrel KSZ9031 and after that if i am trying to ping and see the ip address it is not showing any IP address and LINK is also not detected in my side.

But if am trying to do the same thing in EVM and follow the steps then it is pink and LINK is also detected.

Can you Please support on that.

  • Adding more logs for your reference.

    DTS Configuration

  • Hi,

    With the screenshot of the DTS entry is the Micrel PHY showing up in the boot log?  

    The other question is when the Micrel PHY is showing up in the boot log is the PHY connecting with the a link partner? Or are you ever seeing a detected link reported by ethtool?

    This should work now the kernel driver is enabled. 

    Best Regards,

    Schuyler

  • Hello,

    With the screenshot of the DTS entry is the Micrel PHY showing up in the boot log?  

    When i try to enter micrel PHY on DTS file then the boot log is not showing Micrel PHY in Boot log.

    And when i put previous setting (NO Micrel PHY Setting ) then only Boot log is Showing Micrel PHY.

    The other question is when the Micrel PHY is showing up in the boot log is the PHY connecting with the a link partner?

    I have always connected ethernet cable with link partner (our router/switch) and our AM62A7 board.

    are you ever seeing a detected link reported by ethtool?

    No in boot logs i have never seen link detected in ethtool.. It is always showing no link detected.

    The problem is when i try to enable micrel PHY in dts then it is not showing micrtel phy in boot log.

    and when i have removed or comment the micrel PHY in dts then it is showing micrel PHY in boot log.

    I do not understand i have to add micrel phy changes in dts or not.

    Below logs for more information.

    Log1 when not micrel PHY code in dts, Boot log is showing micrel PHY 

    Log2 when micrel PHY code in dts, Boot log is not showing micrel PHY.

    Thanks 

  • HI,

    Waiting for your support.

    Thanks 

    Pankaj Verma

  • Hi,

     The difference I see now is the PHY addresses are different between the two PHY nodes, the first one 0 and the second one is 7. This would explain why there is not a PHY identification in the boot log. That does not explain in the first part of the post, there the PHY addresses are the same. Please try setting the second definition for the micrel from 7 to 0. 

    Best Regards,

    Schuyler

  • HI Patton, 

    Thanks for your quick reply,

    For your kind information the problem is solved from my end,

    Below are the .dts file setting and also need to enable micrel phy in kernel configuration. 

    ////////////////////////////////DTS FILE SETTING//////////////////////////////////////////////////////////

    main_rgmii1_pins_default: main-rgmii1-pins-default {
    pinctrl-single,pins = <
    AM62AX_IOPAD(0x14c, PIN_INPUT, 0) /* (AB16) RGMII1_RD0 */
    AM62AX_IOPAD(0x150, PIN_INPUT, 0) /* (V15) RGMII1_RD1 */
    AM62AX_IOPAD(0x154, PIN_INPUT, 0) /* (W15) RGMII1_RD2 */
    AM62AX_IOPAD(0x158, PIN_INPUT, 0) /* (V14) RGMII1_RD3 */
    AM62AX_IOPAD(0x148, PIN_INPUT, 0) /* (AA16) RGMII1_RXC */
    AM62AX_IOPAD(0x144, PIN_INPUT, 0) /* (AA15) RGMII1_RX_CTL */
    AM62AX_IOPAD(0x134, PIN_INPUT, 0) /* (Y17) RGMII1_TD0 */
    AM62AX_IOPAD(0x138, PIN_INPUT, 0) /* (V16) RGMII1_TD1 */
    AM62AX_IOPAD(0x13c, PIN_INPUT, 0) /* (Y16) RGMII1_TD2 */
    AM62AX_IOPAD(0x140, PIN_INPUT, 0) /* (AA17) RGMII1_TD3 */
    AM62AX_IOPAD(0x130, PIN_INPUT, 0) /* (AB17) RGMII1_TXC */
    AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */
    >;
    };

    ksz9031_reset_pins_default: ksz9031_reset-default-pins {
    pinctrl-single,pins = <
    AM62AX_IOPAD(0x0084, PIN_OUTPUT, 7) /* (L18) GPMC0_ADVn_ALE.GPIO0_32 */
    >;
    };

    &cpsw_port1 {
    status = "okay";
    // phy-mode = "rgmii-rxid";
    // phy-handle = <&cpsw3g_phy0>;
    /*Micrel setting*/
    phy-handle = <&eth_phy0>;
    phy-mode = "rgmii-id";
    };

    &cpsw_port2 {
    status = "disabled";
    };

    &cpsw3g_mdio {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_mdio1_pins_default>;
    // cpsw3g_phy0: ethernet-phy@0 {
    // reg = <0>;
    // ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    // ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    // ti,min-output-impedance;
    // };

    eth_phy0: ethernet-phy@0 { // Or the correct PHY address for your hardware
    compatible = "ethernet-phy-ieee802.3-c22", "micrel,ksz9031";
    // device_type = "ethernet-phy";
    reg = <0>; // The MDIO address of the PHY
    interrupt-parent = <&main_gpio1>;
    interrupts = <31 IRQ_TYPE_LEVEL_LOW>; /* Example: PHY IRQ on MAIN_GPIO1_31 */
    pinctrl-names = "default";
    pinctrl-0 = <&ksz9031_reset_pins_default>;
    reset-gpios = <&main_gpio0 32 GPIO_ACTIVE_LOW>; /* Example: Reset on MCU_GPIO0_32 */
    reset-assert-us = <1000>;
    reset-deassert-us = <50000>;
    };

    };

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    The above solution is for those people, who will work in same KSZ9031 IC in future.

    Now the Link is UP and the server ip is also ping properly.

    I hope in future we will get quick support from TI.

    Thanks 

    Pankaj Verma