soc/mediatek/mt8186: 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.1, 5.6 and 5.8 in MT8186 Functional Specification. BUG=b:218775654, b:216462313, b:212375511 TEST=SPI SI tests for AP to NOR pass for both kingler and krabby. Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: I5b6e37b0f7d4207ea35f11394d25ad1e096ac01a Reviewed-on: https://review.coreboot.org/c/coreboot/+/62472 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
ada2a63dab
commit
cb783c87d2
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <console/console.h>
|
||||
#include <device/mmio.h>
|
||||
#include <spi_flash.h>
|
||||
#include <soc/addressmap.h>
|
||||
|
@ -147,6 +148,14 @@ void mtk_snfc_init(int gpio_set)
|
|||
for (size_t i = 0; i < ARRAY_SIZE(nor_pinmux[gpio_set]); 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_WARNING,
|
||||
"%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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue