i.MX6UL single ethernet interface

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6UL single ethernet interface

2,265 Views
Contributor II


Hi, we have a custom design that uses the Dart-6UL (i.mx6ul) from Variscite.  The development board has two Ethernet interfaces, and our custom hardware has a single Ethernet interface with a phy connected to the 2nd port.  When in u-boot, the link lights work fine, we can ping sites from u-boot, and tftpboot works.  When in Linux, the phy registers, but never detects when an ethernet cable is plugged in.  Because ethernet works in u-boot, we think the hardware is OK.  Could the lack of a phy on eth0 cause the phy on eth1 not to work?  I've tried modifying the device tree file, but have not found any changes that work yet.  I'm also a bit puzzled by the fec configure in the device tree files (copied below).  Why are both phys listed in the fec2 section, instead of one in each section?

&fec1 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_enet1>;

  phy-mode = "rmii";

  phy-handle = <&ethphy0>;

  status = "okay";

};

&fec2 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_enet2>;

  phy-mode = "rmii";

  phy-handle = <&ethphy1>;

  status = "okay";

  mdio {

  #address-cells = <1>;

  #size-cells = <0>;

  ethphy0: ethernet-phy@2 {

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

  reg = <2>;

  };

  ethphy1: ethernet-phy@1 {

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

  reg = <1>;

  };

  };

};

Labels (1)
5 Replies

102 Views
Contributor I

Hi

   Have you solved the problem since then?I had a similar problem on the imx6ull

   Looking forward to your reply.

0 Kudos

102 Views
Contributor I

i have a same problem. Have you solved the problem since then?

0 Kudos

102 Views
Contributor II

This appears to be an issue with the first two Variscite modules -- we tried two more, and they work fine with no DT modifications.  It is still a puzzle to me why the Ethernet port works fine in u-boot, but fails in Linux.  We did program the i.MX6UL fuses using the following command to boot from SD on our custom board:

fuse prog 0 5 0x40

But, did not seem to change anything related to Ethernet on boards 3 & 4.

0 Kudos

102 Views
Contributor II

With this DT change, I was able to disable the eth0 phy, and eth1 worked fine on the dev board.  However it still does not work on our custom hardware with no phy on eth0.  Both boards output the following kernel messages:

root@imx6ul-var-dart:~# dmesg | grep fec

libphy: fec_enet_mii_bus: probed

fec 20b4000.ethernet eth0: registered PHC device 0

fec 2188000.ethernet eth1: registered PHC device 1

CLIFF: fec_enet_mii_probe

fec 20b4000.ethernet eth0: no PHY, assuming direct connection to switch

fec 20b4000.ethernet eth0: could not attach to PHY

CLIFF: fec_enet_mii_probe

fec 20b4000.ethernet eth0: no PHY, assuming direct connection to switch

fec 20b4000.ethernet eth0: could not attach to PHY

CLIFF: fec_enet_mii_probe

fec 2188000.ethernet eth1: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)

&fec1 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_enet1>;

  phy-mode = "rmii";

  phy-reset-gpios=<&gpio5 0 1>;

  phy-reset-duration=<100>;

  phy-handle = <&ethphy0>;

  status = "okay";

};

&fec2 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_enet2>;

  //phy-mode = "rmii";

  //phy-handle = <&ethphy1>;

  phy-reset-gpios=<&gpio1 10 1>;

  phy-reset-duration=<100>;

  status = "okay";

  mdio {

  #address-cells = <1>;

  #size-cells = <0>;

  ethphy0: ethernet-phy@1 {

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

  reg = <1>;

  };

/*

  ethphy1: ethernet-phy@3 {

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

  reg = <3>;

  };

*/

  };

};

0 Kudos

102 Views
Contributor II

I was hoping something like this would work, but with this change, neither port on the dev board works:

I do notice a difference in the phy detection -- before this change, I get:

fec 2188000.ethernet eth1: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)

After this change, I get:

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

Notice, the Phy changed from Micrel KSZ8081 to Generic PHY.

With the original DT configured for two ports, I get:

fec 20b4000.ethernet eth0: registered PHC device 0

fec 2188000.ethernet eth1: registered PHC device 1

fec 20b4000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:03, irq=-1)

fec 2188000.ethernet eth1: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)

Its interesting that both phys are mapped to controller at 20b4000.  Perhaps this is how the mdio bus is wired internally or something ...

Below is a change to attempt to disable one port.

&fec1 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_enet1>;

  phy-mode = "rmii";

  phy-reset-gpios=<&gpio5 0 1>;

  phy-reset-duration=<100>;

  phy-handle = <&ethphy0>;

  status = "okay";

  mdio {

  ethphy0: ethernet-phy@1 {

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

  reg = <1>;

  };

  };

};

/*

&fec2 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_enet2>;

  phy-mode = "rmii";

  phy-handle = <&ethphy1>;

  phy-reset-gpios=<&gpio1 10 1>;

  phy-reset-duration=<100>;

  status = "okay";

  mdio {

  #address-cells = <1>;

  #size-cells = <0>;

  ethphy0: ethernet-phy@1 {

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

  reg = <1>;

  };

  ethphy1: ethernet-phy@3 {

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

  reg = <3>;

  };

  };

};

*/

0 Kudos