From 2f3e53e62092ab17973a29e85a350aaf1c64430b Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 24 May 2016 16:05:23 -0700 Subject: apalis_imx6: fix Ethernet when using gigabit switch U-Boot on Apalis iMX6 has a known problem: Apparently Apalis iMX6 does not works with Gigabit switches... Limiting speed to 10/100Mbps, and setting master mode, seems to be the only way to have a successful PHY auto negotiation. How to fix: Understand why Linux kernel do not have this issue. However, the current work around did not take effect since the generic phy config function (which gets called after the board level work-around) reenabled gigabit advertisment again. Use the newly introduced environment variable to disable gigabit Ethernet advertisement. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher --- board/toradex/apalis_imx6/apalis_imx6.c | 8 -------- include/configs/apalis_imx6.h | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index bcaab9ca58..8519e4e6f9 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -200,14 +200,6 @@ iomux_v3_cfg_t const usdhc3_pads[] = { int mx6_rgmii_rework(struct phy_device *phydev) { - /* - * Bug: Apparently Apalis iMX6 does not works with Gigabit switches... - * Limiting speed to 10/100Mbps, and setting master mode, seems to - * be the only way to have a successful PHY auto negotiation. - * How to fix: Understand why Linux kernel do not have this issue. - */ - phy_write(phydev, MDIO_DEVAD_NONE, MII_CTRL1000, 0x1c00); - /* control data pad skew - devaddr = 0x02, register = 0x04 */ ksz9031_phy_extended_write(phydev, 0x02, MII_KSZ9031_EXT_RGMII_CTRL_SIG_SKEW, diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 3769709394..5f24951fc7 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -287,6 +287,7 @@ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off vmalloc=400M\0" \ "dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \ + "disable_giga=1\0" \ EMMC_BOOTCMD \ "fdt_file=" FDT_FILE "\0" \ MEM_LAYOUT_ENV_SETTINGS \ -- cgit v1.2.3