IMX6UL Sumo migration: Unable to connect to phy error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6UL Sumo migration: Unable to connect to phy error

Jump to solution
6,747 Views
sikumar3
Contributor III

I am using IMX6ULEVK based board. While migrating from Jethro to Sumo,  I am seeing "unable to connect to Phy" message periodically in the Sumo version.

Can someone help?

Jethro - Working:

&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;

ethphy0: ethernet-phy@1 {
// compatible = "ethernet-phy-ieee802.3-c22";
compatible = "Broadcom, BCM5221";
reg = <1>;
};

2188000.ethernet supply phy not found, using dummy regulator

pps pps0: new PPS source ptp0

libphy: fec_enet_mii_bus: probed

fec 2188000.ethernet eth0: registered PHC device 0

 

fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)

IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

IPv6: ADDRCONF(NETDEV_UP): eth0.4094: link is not ready

 

Sumo - not working:

&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;

ethphy0: ethernet-phy@1 {
// compatible = "ethernet-phy-ieee802.3-c22";
compatible = "Broadcom, BCM5221";
reg = <1>;
clocks = <&clks IMX6UL_CLK_ENET2_REF>;
clock-names = "rmii-ref";
};

};

 

libphy: Fixed MDIO Bus: probed

fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator

libphy: fec_enet_mii_bus: probed

fec 2188000.ethernet eth0: registered PHC device 0

 

fec 2188000.ethernet eth0: Unable to connect to phy

Labels (1)
0 Kudos
1 Solution
6,514 Views
sikumar3
Contributor III

PHY got connected with FEC and link came up fine after adding the PHY identifier in the device tree file.

 

Thanks everyone for your support!

View solution in original post

0 Kudos
10 Replies
6,524 Views
sikumar3
Contributor III

Hi Igor,

Apologies for the delayed response!

We decided to move to Zeus rather than Sumo. I am getting the same error with Zeus uboot, kernel.


U-Boot 2019.04-lf-5.4.y_v2019.04+g228843cdf5 (Jul 20 2020 - 14:13:18 +0000)

CPU: Freescale i.MX6UL rev1.2 at 396 MHz

[ 0.000000] Linux version 5.4.3-lts-lf-5.4.y+gf8118585ee3c (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Sat Jul 25 16:33:48 UTC 2020
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d

Can you give me some directions to look into the issue?

0 Kudos
6,515 Views
sikumar3
Contributor III

PHY got connected with FEC and link came up fine after adding the PHY identifier in the device tree file.

 

Thanks everyone for your support!

0 Kudos
6,319 Views
quanganhhust
Contributor I

can you be more specific ?

0 Kudos
6,314 Views
sikumar3
Contributor III

Hi,

I have added the PHY ID (ethernet-phy-id0040.61e4) of BCM5221in the device tree to get it working!

 

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

ethphy0: ethernet-phy@1 {
+compatible = "ethernet-phy-id0040.61e4", "ethernet-phy-ieee802.3-c22";

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

// compatible = "Broadcom, BCM5221";
reg = <1>;
};

};

0 Kudos
6,524 Views
sikumar3
Contributor III

Hi,

I am using 4.14.98 and cloned using the below command.

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml

I have added couple of debugs in the kernel code and got to know that of_phy_find_device is returning NULL.

net eth0: of_phy_find_device returns NULL, interface: 7
fec 2188000.ethernet eth0:  Unable to connect to phy. fullname: /soc/aips-bus@02100000/ethernet@02188000/mdio/ethernet-phy@1
RTNETLINK answers: No such device

I will check the other imx6ul based dts files and try out those changes.

0 Kudos
6,524 Views
igorpadykov
NXP Employee
NXP Employee

please provide full logs (uboot + kernel), verify that nxp uboot used in the case:

uboot-imx - i.MX U-Boot 

Best regards
igor

0 Kudos
6,524 Views
sikumar3
Contributor III

Hi,

I am using jethro version of nxp uboot. I didn't upgrade the uboot to Sumo as I first want to check the kernel is coming up fine with this sumo version.

Please find the complete log file in the attachment.

0 Kudos
6,524 Views
igorpadykov
NXP Employee
NXP Employee

yes, this may be the reason - you used old uboot version used with L4.1.15,

please try uboot version designed for L4.14.98 usage:

uboot-imx - i.MX U-Boot

Best regards
igor

0 Kudos
6,524 Views
igorpadykov
NXP Employee
NXP Employee

Hi Sivakumar

what linux kernel and bsp used in the case, for sumo nxp has

L4.14.78 and L4.14.98 kernels :

Linux L4.14.78_1.0.0 Documentation

Linux 4.14.98_2.2.0 Documentation

May be recommended to try nxp bsps from official source.codeaurora.org/external/imx/linux-imx repository
linux-imx - i.MX Linux kernel 

For random failures one can try to tweak pad settings like "pinctrl_enet1: enet1grp":

imx6ul-14x14-evk.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
6,524 Views
sikumar3
Contributor III

Hi,

Thanks for the response!

I am using 4.14.98 cloned through the below command.

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml

The failure is consistent in my case.

I am planning to try out the changes from below dtsi file in which they use GPIO reset.

imx6ul-tx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

reg_3v3_etn: regulator-3v3etn {
compatible = "regulator-fixed";
regulator-name = "3V3_ETN";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_etnphy_power>;
gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
enable-active-high;
};


&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1 &pinctrl_enet1_mdio &pinctrl_etnphy0_rst>;
phy-mode = "rmii";
phy-reset-gpios = <&gpio5 6 GPIO_ACTIVE_LOW>;
phy-supply = <&reg_3v3_etn>;
phy-handle = <&etnphy0>;
status = "okay";

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

etnphy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_etnphy0_int>;
interrupt-parent = <&gpio5>;
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
status = "okay";
};

etnphy1: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_etnphy1_int>;
interrupt-parent = <&gpio4>;
interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
status = "okay";
};
};

0 Kudos