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/DP83822I: device tree configuration for TI DP838xx drivers

Part Number: DP83822I
Other Parts Discussed in Thread: AMIC110

Tool/software: Linux

Hi, my company is evaluating the DP83822I as an ethernet PHY solution for an upcoming product, however we are having issues getting the PHY to function with the TI Linux drivers. I suspect we have an issue with our device tree configuration, and was hoping to find a reference device tree config for the TI driver. Does anyone know where I can find such a reference? We are using a Samsung Artik530S for our Linux module, but any embedded Linux reference using the DP83822 PHY should be helpful for us to determine the correct device tree configuration.

Below is a snippet of the relevant portion of our device tree as it is currently:

gmac0:ethernet@c0060000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gmac_pins>;

			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;

			snps,phy-addr = <1>;
			snps,reset-gpio = <&gpio_a 4 0>;
			snps,reset-active-low;
			snps,reset-delays-us = <0 100000 300000>;

			mdio {
				#address-cells = <1>;
				#size-cells = <0>;

				ethernet_phy: ethernet-phy@1 {
					reg = <3>;
					fixed-link {
						speed = <100>;
						half-duplex;
					};
				};
			};
};
  • One more detail about the specific failure we observe. When we boot our Linux module, and try to bring up the eth0 interface, we get the following error:

    [root@artik ~]# ifconfig eth0 up
    [64603.645000] eth0: Could not attach to PHY
    [64603.650000] stmmac_open: Cannot attach to PHY (error: -95)
    SIOCSIFFLAGS: Operation not supported

    I have also attempted to debug the PHY with phytool, but any time I attempt to read registers, I get the following error:

    [root@artik phytool]# ./phytool read eth0/0:3/1
    error: phy_read (-22)

  • Hi John,

    If you are looking for any Linux reference design that uses the DP83822, then we have the AMIC110 ICE: www.ti.com/.../tmdxice110
    It uses a sitara process and two DP83822 PHYs. It also has a SDK available for download.

    -Regards,
    Aniruddha
  • Thanks for the quick response Aniruddha. The reference design above looks potentially helpful, but I cannot find any description of a Linux configuration for this design. The SDK and all other documentation I can find use an RTOS, not Linux.

    My goal is to confirm my device tree and driver configuration in Linux. Is there a Linux build for this ICE design?

  • Hi, any update on this?

  • Can someone from TI please point me to a working Linux reference using the TI DP83822I? This issue is delaying our production run.
  • Hi John,

    Linux build for the AMIC reference design is bit out of the scope for this forum. I will move this thread to the processor forum for better visibility.

    -Regards
    Aniruddha
  • Thank you for escalating this issue. I look forward to someone who can help us understand the device tree configuration for the necessary to use the DP83822 Linux driver.

  • Hi John,

    Unfortunately I will not be able to support you since this is not a TI processor being used for this product. I will have to pass you back to the PHY team for continuing support.

    I can offer some DTS examples to review of TI PHYs that are in use on a couple of TI EVMs.  The examples will not be fixed PHY or half duplex. You will have to download a TI SDK to get the example TI PHYs. I would recommend the AM572x  since these have TI PHYs on them, specifically the DP83867. This PHY example though is not the DP83848/DP83822 PHY that you are looking for.  You can download the TI SDK for free from here.

    The other suggestion I have is the possibility of the errors coming from the MAC driver of the processor. This is a guess on my part but perhaps not all MAC drivers in the kernel tree support fixed link mode. This message looks like the driver is trying to find a PHY and it cannot find a reference to it.  

    [64603.645000] eth0: Could not attach to PHY

    [64603.650000] stmmac_open: Cannot attach to PHY (error: -95)

    SIOCSIFFLAGS: Operation not supported

    Best Regards,

    Schuyler

  • Hi John,
    Were you able to resolved your issue?
    Best Regards,
    Schuyler
  • Hi,

    Since we have heard back from you in some time we are assuming that you found a way to move past the issue. I am marking the thread closed and resolved for now. If the issue is not resolved feel free to reply back or open a new thread.

    Best Regards,
    Schuyler