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.

How to set a MDIO Phy address in DTS file.

Hello

My 6638 custom board has 4 Ethernet Interface. Phy interface connected to 88e1111 and 88e1111 direct connected to SOC.

88e1111s have own Phy Address (Not MAC Address) each other. I want to set a88e1111 phy address int Linux DTS file. but I can't find any recommend Document.

Please let me know How to set Phy address in DTS file.

Regards.

Shin.

  • Hi Shin,

    There is no phy address in the dts file. For a guide on how to setup the ethernet (emac, mdio, phy, etc) in dts, refer to
    Documentation/devicetree/bindings/net/ethernet.txt
    Documentation/devicetree/bindings/net/davinci-mdio.txt
    Documentation/devicetree/bindings/net/davinci_emac.txt
    Documentation/devicetree/bindings/net/phy.txt

    Also you can use any of the reference dts files: keystone-k2e-evm.dts, keystone-k2g-evm.dts etc..

    Best Regards,
    Yordan
  • Thanks for your reply.

    I read these document, and I set davinci_mdio, referenced k2e-net.dtsi. but Ethernet is not working in Linux kernel.
    Here is log file.

    [ 436.811259] mdio_bus 2090f00.mdio: cannot get PHY at address 4
    [ 436.817121] mdio_bus 2090f00.mdio: cannot get PHY at address 2
    [ 436.822980] mdio_bus 2090f00.mdio: cannot get PHY at address 1
    [ 436.828834] mdio_bus 2090f00.mdio: cannot get PHY at address 0

    They can't find PHY address, I think.

    I set address using "reg" keyword in mdio/phyX.

    How to know all phy addresses connected Device?

    Regards.
    Shin.
  • Can you please check the "k2hk-evm.dts" file which has the MDIO definition.

    &mdio {
    status = "ok";
    ethphy0: ethernet-phy@0 {
    compatible = "marvell,88E1111", "ethernet-phy-ieee802.3-c22";
    reg = <0>;
    };

    ethphy1: ethernet-phy@1 {
    compatible = "marvell,88E1111", "ethernet-phy-ieee802.3-c22";
    reg = <1>;
    };
    };