Hello hsin-hsiung wang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/46397
to review the following change.
Change subject: soc/mediatek/mt8192: add 6359p driver support for romstage ......................................................................
soc/mediatek/mt8192: add 6359p driver support for romstage
Add 6359p driver support for romstage.
TEST=Boots correctly on asurada p0.
Signed-off-by: Hsin-Hsiung Wang hsin-hsiung.wang@mediatek.com Change-Id: I46bca69836d41e7c35b196d91d9fbdbdb7d71df7 --- M src/mainboard/google/asurada/romstage.c M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/include/soc/mt6359p.h M src/soc/mediatek/mt8192/mt6359p.c 4 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/46397/1
diff --git a/src/mainboard/google/asurada/romstage.c b/src/mainboard/google/asurada/romstage.c index 3d03bd4..bd5cd74 100644 --- a/src/mainboard/google/asurada/romstage.c +++ b/src/mainboard/google/asurada/romstage.c @@ -6,6 +6,7 @@ #include <soc/dramc_param.h> #include <soc/emi.h> #include <soc/mmu_operations.h> +#include <soc/mt6359p.h>
/* This must be defined in chromeos.fmd in same name and size. */ #define CALIBRATION_REGION "RW_DDR_TRAINING" @@ -43,6 +44,7 @@
void platform_romstage_main(void) { + mt6359p_romstage_init(); mt_mem_init(&dparam_ops); mtk_mmu_after_dram(); } diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index e7ff25d..657aa8e 100755 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -33,6 +33,7 @@ romstage-y += ../common/timer.c romstage-y += ../common/uart.c romstage-y += pmif.c pmif_clk.c pmif_spi.c pmif_spmi.c +romstage-y += mt6359p.c
ramstage-y += auxadc.c ramstage-y += flash_controller.c diff --git a/src/soc/mediatek/mt8192/include/soc/mt6359p.h b/src/soc/mediatek/mt8192/include/soc/mt6359p.h index ce7ef24..c0f01a0 100644 --- a/src/soc/mediatek/mt8192/include/soc/mt6359p.h +++ b/src/soc/mediatek/mt8192/include/soc/mt6359p.h @@ -41,6 +41,7 @@ #define VM18_VOL_REG_SHIFT 8
void mt6359p_init(void); +void mt6359p_romstage_init(void); void mt6359p_buck_set_voltage(u32 buck_id, u32 buck_uv); u32 mt6359p_buck_get_voltage(u32 buck_id); void mt6359p_set_vm18_voltage(u32 vm18_uv); diff --git a/src/soc/mediatek/mt8192/mt6359p.c b/src/soc/mediatek/mt8192/mt6359p.c index c70485d..2eb3f60 100644 --- a/src/soc/mediatek/mt8192/mt6359p.c +++ b/src/soc/mediatek/mt8192/mt6359p.c @@ -457,3 +457,12 @@ pmic_lp_setting(); pmic_wk_vs2_voter_setting(); } + +void mt6359p_romstage_init(void) +{ + if (pmif_arb == NULL) { + pmif_arb = get_pmif_controller(PMIF_SPI, 0); + if (pmif_arb == NULL) + die("ERROR - Failed to get pmif controller\n"); + } +}
Yidi Lin has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/46397 )
Change subject: soc/mediatek/mt8192: add 6359p driver support for romstage ......................................................................
Abandoned