From 422774a4bc0143005a6fc6dddddf756976771a5fab169e8ef0f0f42abc4b0194 Mon Sep 17 00:00:00 2001 From: Matthias Brugger Date: Fri, 21 Feb 2020 13:12:01 +0000 Subject: [PATCH] Accepting request 777962 from hardware:boot:staging OBS-URL: https://build.opensuse.org/request/show/777962 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=86 --- ...-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch | 37 +++++++++++++++++++ u-boot.changes | 8 ++++ u-boot.spec | 1 + 3 files changed, 46 insertions(+) create mode 100644 0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch diff --git a/0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch b/0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch new file mode 100644 index 0000000..f1ecb02 --- /dev/null +++ b/0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch @@ -0,0 +1,37 @@ +From 1a8daf7eef525b8c0c54f6b6274d0bb64f2787cc Mon Sep 17 00:00:00 2001 +From: Nicolas Saenz Julienne +Date: Thu, 20 Feb 2020 17:36:31 +0100 +Subject: [PATCH] net: bcmgenet: Don't set ID_MODE_DIS when not using RGMII + +As per Linux's driver, ID_MODE_DIS is only set when the PHY interface is +RGMII. Don't enable it for the rest of setups. + +This has been seen to misconfigure RPi4's PHY when booting Linux. + +Upstream submission: +https://patchwork.ozlabs.org/patch/1241570/ + +Fixes: d53e3fa385 ("net: Add support for Broadcom GENETv5 Ethernet +controller") +Signed-off-by: Nicolas Saenz Julienne +Signed-off-by: Matthias Brugger +--- + drivers/net/bcmgenet.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c +index 8f4848aec6..e971b556ac 100644 +--- a/drivers/net/bcmgenet.c ++++ b/drivers/net/bcmgenet.c +@@ -448,7 +448,10 @@ static int bcmgenet_adjust_link(struct bcmgenet_eth_priv *priv) + } + + clrsetbits_32(priv->mac_reg + EXT_RGMII_OOB_CTRL, OOB_DISABLE, +- RGMII_LINK | RGMII_MODE_EN | ID_MODE_DIS); ++ RGMII_LINK | RGMII_MODE_EN); ++ ++ if (phy_dev->interface == PHY_INTERFACE_MODE_RGMII) ++ setbits_32(priv->mac_reg + EXT_RGMII_OOB_CTRL, ID_MODE_DIS); + + writel(speed << CMD_SPEED_SHIFT, (priv->mac_reg + UMAC_CMD)); + diff --git a/u-boot.changes b/u-boot.changes index 572cc8e..a3ae0e4 100644 --- a/u-boot.changes +++ b/u-boot.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Feb 21 12:43:10 UTC 2020 - Matthias Brugger + +Fix ethernet on RPi4 (bsc#1164512) +Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2020.01 +* Patches added: + 0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch + ------------------------------------------------------------------- Mon Feb 17 16:56:17 UTC 2020 - Guillaume GARDET diff --git a/u-boot.spec b/u-boot.spec index 6a199eb..264f2a5 100644 --- a/u-boot.spec +++ b/u-boot.spec @@ -218,6 +218,7 @@ Patch0014: 0014-Kconfig-add-btrfs-to-distro-boot.patch Patch0015: 0015-configs-Re-sync-with-CONFIG_DISTRO_.patch Patch0016: 0016-configs-am335x_evm-disable-BTRFS.patch Patch0017: 0017-net-phy-Fix-overlong-PHY-timeout.patch +Patch0018: 0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch # Patches: end BuildRequires: bc BuildRequires: bison