Rex-BC Chen has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74064 )
(
6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: soc/mediatek/mt8188: Set pin drive strength to 8mA for NOR
......................................................................
soc/mediatek/mt8188: Set pin drive strength to 8mA for NOR
Set NOR pin drive to 8mA to comply with HW requirement.
This implementation is according to chapter 5.8 and 5.19 in MT8188
Functional Specification.
BUG=b:270911452
TEST=boot with following logs
[DEBUG] mtk_snfc_init: got pin drive: 0x3
[DEBUG] mtk_snfc_init: got pin drive: 0x3
[DEBUG] mtk_snfc_init: got pin drive: 0x3
[DEBUG] mtk_snfc_init: got pin drive: 0x3
Change-Id: If8344449f5b34cefcaaee6936e94f7f669c7148b
Signed-off-by: Jason Chen <Jason-ch.Chen(a)mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74064
Reviewed-by: Rex-BC Chen <rex-bc.chen(a)mediatek.com>
Reviewed-by: Yidi Lin <yidilin(a)google.com>
Reviewed-by: Yu-Ping Wu <yupingso(a)google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/soc/mediatek/mt8188/spi.c
1 file changed, 36 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Yu-Ping Wu: Looks good to me, approved
Yidi Lin: Looks good to me, but someone else must approve
Rex-BC Chen: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8188/spi.c b/src/soc/mediatek/mt8188/spi.c
index 56efec5..0596bb9 100644
--- a/src/soc/mediatek/mt8188/spi.c
+++ b/src/soc/mediatek/mt8188/spi.c
@@ -6,6 +6,7 @@
*/
#include <assert.h>
+#include <console/console.h>
#include <device/mmio.h>
#include <gpio.h>
#include <soc/addressmap.h>
@@ -105,6 +106,14 @@
for (size_t i = 0; i < ARRAY_SIZE(nor_pinmux); i++) {
gpio_set_pull(ptr[i].gpio, GPIO_PULL_ENABLE, ptr[i].select);
gpio_set_mode(ptr[i].gpio, ptr[i].func);
+
+ if (gpio_set_driving(ptr[i].gpio, GPIO_DRV_8_MA) < 0)
+ printk(BIOS_ERR,
+ "%s: failed to set pin drive to 8 mA for %d\n",
+ __func__, ptr[i].gpio.id);
+ else
+ printk(BIOS_DEBUG, "%s: got pin drive: %#x\n", __func__,
+ gpio_get_driving(ptr[i].gpio));
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/74064
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If8344449f5b34cefcaaee6936e94f7f669c7148b
Gerrit-Change-Number: 74064
Gerrit-PatchSet: 11
Gerrit-Owner: jason-ch chen <Jason-ch.Chen(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Rex-BC Chen <rex-bc.chen(a)mediatek.com>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged