diff options
author | Daniel Golle <daniel@makrotopia.org> | 2023-07-22 18:55:32 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2023-08-07 16:31:27 +0100 |
commit | b7e9445d6dcea9c4a6cd5f017a797ccc269c8c7a (patch) | |
tree | f5dd9278a42cc46723e31fa509e4c35e048b3263 /package/boot/uboot-mediatek/patches/101-17-net-mediatek-optimize-the-switch-reset-delay-wait-ti.patch | |
parent | 6553b1caed792ff3d3eed36be7ccb2162bbe9945 (diff) | |
download | upstream-b7e9445d6dcea9c4a6cd5f017a797ccc269c8c7a.tar.gz upstream-b7e9445d6dcea9c4a6cd5f017a797ccc269c8c7a.tar.bz2 upstream-b7e9445d6dcea9c4a6cd5f017a797ccc269c8c7a.zip |
uboot-mediatek: add patches for MT7988 and builds for RFB
Import pending patches adding support for MT7988 and provide builds
for the reference board for all possible boot media.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot/uboot-mediatek/patches/101-17-net-mediatek-optimize-the-switch-reset-delay-wait-ti.patch')
-rw-r--r-- | package/boot/uboot-mediatek/patches/101-17-net-mediatek-optimize-the-switch-reset-delay-wait-ti.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/package/boot/uboot-mediatek/patches/101-17-net-mediatek-optimize-the-switch-reset-delay-wait-ti.patch b/package/boot/uboot-mediatek/patches/101-17-net-mediatek-optimize-the-switch-reset-delay-wait-ti.patch new file mode 100644 index 0000000000..c8823ac545 --- /dev/null +++ b/package/boot/uboot-mediatek/patches/101-17-net-mediatek-optimize-the-switch-reset-delay-wait-ti.patch @@ -0,0 +1,56 @@ +From d9a52701f6677889cc3332ab7a888f35cd69cc76 Mon Sep 17 00:00:00 2001 +From: Weijie Gao <weijie.gao@mediatek.com> +Date: Wed, 19 Jul 2023 17:16:59 +0800 +Subject: [PATCH 17/29] net: mediatek: optimize the switch reset delay wait + time + +Not all switches requires 1 second delay after deasserting reset. +MT7531 requires only maximum 200ms. + +This patch defines dedicated reset wait time for each switch chip, and will +significantly improve the boot time for boards using MT7531. + +Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> +--- + drivers/net/mtk_eth.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/net/mtk_eth.c ++++ b/drivers/net/mtk_eth.c +@@ -127,6 +127,7 @@ struct mtk_eth_priv { + u32 mt753x_smi_addr; + u32 mt753x_phy_base; + u32 mt753x_pmcr; ++ u32 mt753x_reset_wait_time; + + struct gpio_desc rst_gpio; + int mcm; +@@ -943,12 +944,12 @@ int mt753x_switch_init(struct mtk_eth_pr + reset_assert(&priv->rst_mcm); + udelay(1000); + reset_deassert(&priv->rst_mcm); +- mdelay(1000); ++ mdelay(priv->mt753x_reset_wait_time); + } else if (dm_gpio_is_valid(&priv->rst_gpio)) { + dm_gpio_set_value(&priv->rst_gpio, 0); + udelay(1000); + dm_gpio_set_value(&priv->rst_gpio, 1); +- mdelay(1000); ++ mdelay(priv->mt753x_reset_wait_time); + } + + ret = priv->switch_init(priv); +@@ -1528,11 +1529,13 @@ static int mtk_eth_of_to_plat(struct ude + priv->switch_init = mt7530_setup; + priv->switch_mac_control = mt7530_mac_control; + priv->mt753x_smi_addr = MT753X_DFL_SMI_ADDR; ++ priv->mt753x_reset_wait_time = 1000; + } else if (!strcmp(str, "mt7531")) { + priv->sw = SW_MT7531; + priv->switch_init = mt7531_setup; + priv->switch_mac_control = mt7531_mac_control; + priv->mt753x_smi_addr = MT753X_DFL_SMI_ADDR; ++ priv->mt753x_reset_wait_time = 200; + } else { + printf("error: unsupported switch\n"); + return -EINVAL; |