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.

Linux/66AK2L06: How to configure DP83867 Ethernet PHY in the device tree

Part Number: 66AK2L06

Tool/software: Linux

Hello,

please tell someone simply how to configure the DP83867 PHY chip in the device tree. I am configuring a custom K2L board. The EVMs use Marvell PHY chip, but we are using TI's DP83867. The documentation tells only partly how to configure it, but I haven't yet understood all of it. I can use the network in u-boot, so I know the hardware works, but I want to have it available in Linux as well.

In "keystone-k2l-netcp.dtsi" have already set up the ethernet-phy like:

    ethernet-phy@0 {
        reg = <0>;
        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
        ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    };

But setting the mdio in "keystone-k2l-evm.dts" is not well described in the documentation from my opinion. By wild guessing I have tried this:

&mdio {
    ethphy0: ethernet-phy@0 {
        status = "ok";
        reg = <0>;
        compatible = "ti,dp83867", "ethernet-phy-ieee802.3-c22";
        ti,rx-internal-delay = <0x8>;
        ti,tx-internal-delay = <0xa>;
        ti,fifo-depth = <0x01>;
    };
    ethphy1: ethernet-phy@1 {
        status = "disabled";
        reg = <1>;
        compatible = "ti,dp83867", "ethernet-phy-ieee802.3-c22";
        ti,rx-internal-delay = <0x8>;
        ti,tx-internal-delay = <0xa>;
        ti,fifo-depth = <0x01>;
    };

Originally it was written for Marvell like:

    ethphy0: ethernet-phy@0 {
        compatible = "marvell,88E1514", "marvell,88E1510", "ethernet-phy-ieee802.3-c22";
        reg = <0>;
    };

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

In the "make menuconfig" I have replaced the Marvell PHY by the DP83867 and also enabled all the common GbE and PHY choices I have seen there without much understanding what they all do.

Please point out what I am doing wrong.

Best regards,

Ari

  • Hi Ari,

    See this thread:
    e2e.ti.com/.../553819

    Also I am moving this to the Keystone forum.

    Best Regards,
    Yordan
  • Hi Yordan,

    but hey! That is my own ancient post concerning the almost the same topic. I have already solved the issue by updating the kernel to Processor SDK kernel 4.4.

    But still I cannot configure the device tree. I don't think I can leave it as it is in the release package because the release package uses Marvell chip, but I have to use TI PD83867. I just don't know for sure what to write into the "mdio" section where it reads "Marvell" stuff. I can only guess what to put there, but I prefer to know and understand what to write.

    Is this question really so obvious for most of the users there is no need to explain it in the  user guides and driver manuals? At least for me this is not clear at all.

    Best regards,

    Ari

  • Hi, Ari,

    Sorry, we don't have experience with DP83867 PHY and are not sure what are involved. You may want to find which EVM uses that PHY and see how it is configured in Linux if that EVM supports LInux.

    The basic concept of mdio is an interface to pass commands to PHY. You will need to check with the DP83867 datasheet to see what it takes to get initialized, and set up in the mdio. Usually, it should work as in the example dts file but changing the compatible.

    Rex

  • Hello Rex,

    I got some "second hand" information that DP83867 does not need any "compatible" in the device tree because the PHY_ID is read from the PHY itself. So it is enough to define the compatible as:

    compatible = "ethernet-phy-ieee802.3-c22";

    Best regards,

    Ari

  • Hi Ari,

    Thank you for posting this information.

    Best Regards,