From 6553b1caed792ff3d3eed36be7ccb2162bbe9945 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 22 Jul 2023 15:50:27 +0100 Subject: uboot-mediatek: update to version 2023.07.02 Release 2023.07 got tagged wrongly and replaced by follow-up release 2023.07.02. Now using upstream DTS for BPi-R3. Removed two patches which made it upstream, refreshed the rest. Signed-off-by: Daniel Golle --- ...iatek-set-R1-R0-in-case-pullen-pullsel-su.patch | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 package/boot/uboot-mediatek/patches/001-pinctrl-mediatek-set-R1-R0-in-case-pullen-pullsel-su.patch (limited to 'package/boot/uboot-mediatek/patches/001-pinctrl-mediatek-set-R1-R0-in-case-pullen-pullsel-su.patch') diff --git a/package/boot/uboot-mediatek/patches/001-pinctrl-mediatek-set-R1-R0-in-case-pullen-pullsel-su.patch b/package/boot/uboot-mediatek/patches/001-pinctrl-mediatek-set-R1-R0-in-case-pullen-pullsel-su.patch deleted file mode 100644 index 988c78cdfb..0000000000 --- a/package/boot/uboot-mediatek/patches/001-pinctrl-mediatek-set-R1-R0-in-case-pullen-pullsel-su.patch +++ /dev/null @@ -1,88 +0,0 @@ -From patchwork Wed Apr 12 20:36:43 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Daniel Golle -X-Patchwork-Id: 1768270 -Return-Path: -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Date: Wed, 12 Apr 2023 21:36:43 +0100 -From: Daniel Golle -To: u-boot@lists.denx.de, Sam Shih , - GSS_MTK_Uboot_upstream , - Chunfeng Yun , - Weijie Gao , Ryder Lee , - Frank Wunderlich -Cc: Steven Liu =?utf-8?b?KOWKieS6uuixqik=?= , - John Crispin -Subject: [PATCH] pinctrl: mediatek: set R1/R0 in case pullen/pullsel succeeded -Message-ID: -MIME-Version: 1.0 -Content-Disposition: inline -X-BeenThere: u-boot@lists.denx.de -X-Mailman-Version: 2.1.39 -Precedence: list -List-Id: U-Boot discussion -Sender: "U-Boot" - -Commit dafe0fbfb0f3 ("pinctrl: mediatek: rewrite mtk_pinconf_set and -related functions") changed the logic deciding to set R0 and R1 -registers for V1 devices. - -Before: - /* Also set PUPD/R0/R1 if the pin has them */ - err = mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_PUPD, !pullup); - if (err != -EINVAL) { - mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_R0, r0); - mtk_hw_set_value(dev, pin, PINCTRL_PIN_REG_R1, r1); - } - -After: - /* try pupd_r1_r0 if pullen_pullsel return error */ - err = mtk_pinconf_bias_set_pullen_pullsel(dev, pin, disable, pullup, - val); - if (err) - return mtk_pinconf_bias_set_pupd_r1_r0(dev, pin, disable, - pullup, val); - -Tracing mtk_pinconf_bias_set_pullen_pullsel shows that the function -always either returns 0 in case of success or -EINVAL in case any error -has occurred. Hence the logic responsible of the decision to program R0 -and R1 has been inverted. - -This leads to problems on BananaPi R2 (MT7623N) when booting from -SDMMC, it turns out accessing eMMC no longer works since -U-Boot 2022.07: - -MT7623> mmc dev 0 -Card did not respond to voltage select! : -110 - -The problem wasn't detected for a long time as both eMMC and SDMMC work -fine if they are used to boot from, and hence R0 and R1 were already -setup by the bootrom and/or preloader. - -Fix the logic to restore the originally intended and correct behavior -and also change the descriptive comment accordingly. - -Fixes: dafe0fbfb0f3 ("pinctrl: mediatek: rewrite mtk_pinconf_set and related functions") -Signed-off-by: Daniel Golle ---- - drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c -@@ -349,10 +349,10 @@ int mtk_pinconf_bias_set_v1(struct udevi - { - int err; - -- /* try pupd_r1_r0 if pullen_pullsel return error */ -+ /* set pupd_r1_r0 if pullen_pullsel succeeded */ - err = mtk_pinconf_bias_set_pullen_pullsel(dev, pin, disable, pullup, - val); -- if (err) -+ if (!err) - return mtk_pinconf_bias_set_pupd_r1_r0(dev, pin, disable, - pullup, val); - -- cgit v1.2.3