Attention is currently required from: Hung-Te Lin, Jarried Lin, Yu-Ping Wu.
Yidi Lin has posted comments on this change by Jarried Lin. ( https://review.coreboot.org/c/coreboot/+/85128?usp=email )
Change subject: soc/mediatek/mt8196: Add PMIC mt6363 adc driver ......................................................................
Patch Set 4:
(7 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/85128/comment/4aba3c8b_a0b3ced2?usp... : PS4, Line 7: mt6363 MT6363 ADC
https://review.coreboot.org/c/coreboot/+/85128/comment/d647bb77_4b29261c?usp... : PS4, Line 9: auxadc AUXADC
https://review.coreboot.org/c/coreboot/+/85128/comment/df0f6124_36435e29?usp... : PS4, Line 9: add Add
File src/soc/mediatek/common/include/soc/mt6363_sdmadc.h:
https://review.coreboot.org/c/coreboot/+/85128/comment/42a735e9_d8636881?usp... : PS4, Line 88: enum auxadc_val_type type); move to the next line
File src/soc/mediatek/common/mt6363_sdmadc.c:
https://review.coreboot.org/c/coreboot/+/85128/comment/be0b7e6e_eab146b0?usp... : PS4, Line 61: static struct pmif *pmif_arb = NULL; : : static u32 mt6363_auxadc_read_value(u32 reg) : { : u32 data; : : assert(pmif_arb); : pmif_arb->read(pmif_arb, SPMI_SLAVE_4, reg, &data); : return data; : } : : static void mt6363_auxadc_write_value(u32 reg, u8 reg_val) : { : assert(pmif_arb); : pmif_arb->write(pmif_arb, SPMI_SLAVE_4, reg, reg_val); : } : : static u32 mt6363_auxadc_read_value16(u32 reg) : { : u16 rdata = 0; : : assert(pmif_arb); : pmif_arb->read16(pmif_arb, SPMI_SLAVE_4, reg, &rdata); : return rdata; : } move those functions to `common/mt6363.c`.
https://review.coreboot.org/c/coreboot/+/85128/comment/d52d517e_56f9d793?usp... : PS4, Line 135: : void mt6363_sdmadc_init(void) : { : if (!pmif_arb) { : pmif_arb = get_pmif_controller(PMIF_SPMI, SPMI_MASTER_1); : assert(pmif_arb); : } : : if (pmif_arb->is_pmif_init_done(pmif_arb)) : die("ERROR - Failed to initialize pmif spi"); : : printk(BIOS_INFO, "[%s]CHIP ID = 0x%x\n", __func__, : mt6363_auxadc_read_value(PMIC_SWCID1)); : } Remove. We can just call `mt6363_init_pmif_arb`.
File src/soc/mediatek/mt8196/Makefile.mk:
https://review.coreboot.org/c/coreboot/+/85128/comment/333d88ea_b6cd2540?usp... : PS4, Line 32: romstage-y += ../common/mt6363_sdmadc.c We don't need ADC in romstage.