Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46406 )
Change subject: mb/google/asurada: Implement regulator control for vdd2, vddq and vmddr ......................................................................
Patch Set 5:
(4 comments)
we can unify the mapping in one place.
https://review.coreboot.org/c/coreboot/+/46406/5/src/mainboard/google/asurad... File src/mainboard/google/asurada/regulator.c:
https://review.coreboot.org/c/coreboot/+/46406/5/src/mainboard/google/asurad... PS5, Line 8: MT6360_LDO3 Probably make it clear given you're starting with 3. e.g.,
MT6360_LDO3 = 0,
https://review.coreboot.org/c/coreboot/+/46406/5/src/mainboard/google/asurad... PS5, Line 17: static int get_mt6360_regulator_id(enum mtk_regulator regulator) { switch(regulator) { case MTK_REGULATOR_Vdd1: return MT6360_DUMMY; case MTK_REGULATOR_VDD2: return MT6360_BUCK1; ... } printk(BIOS_WARNING...); return -1; }
https://review.coreboot.org/c/coreboot/+/46406/5/src/mainboard/google/asurad... PS5, Line 24: MTK_REGULATOR_VDD1: : break; do nothing?
https://review.coreboot.org/c/coreboot/+/46406/5/src/mainboard/google/asurad... PS5, Line 26: case MTK_REGULATOR_VDD2: : google_chromeec_regulator_set_voltage(MT6360_BUCK1, : voltage_mv, : voltage_mv); : break; : case MTK_REGULATOR_VDDQ: : google_chromeec_regulator_set_voltage(MT6360_LDO7, : voltage_mv, : voltage_mv); : break; : case MTK_REGULATOR_VMDDR: : google_chromeec_regulator_set_voltage(MT6360_LDO6, : voltage_mv, : voltage_mv); : break; : default: : printk(BIOS_WARNING, "Invalid regualtor ID: %d\n", regulator); : break; : } int id = get_mt6360_regulator_id(regulator);
if (id < 0) return; google_chromeec_regulator_set_voltage(id, voltage_mv, voltage_mv);