From cd67657dea6e4c5ca1f068ebf16623924e1b001d Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Tue, 13 Jul 2021 17:18:40 +0800 Subject: soc/mediatek/mt8195: redefine mt6360_regulator_id On MT8195 platforms with BC1.2, we have to use EC to control MT6360 so the mt6360_regulator_id is redefined to match the numbers defined in EC driver. Signed-off-by: Rex-BC Chen Change-Id: I9437edb9776442759ce04c31d315c3760078ffb3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56434 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8195/include/soc/mt6360.h | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/soc/mediatek/mt8195/include') diff --git a/src/soc/mediatek/mt8195/include/soc/mt6360.h b/src/soc/mediatek/mt8195/include/soc/mt6360.h index 77ae47dee1..e7cc9feaa1 100644 --- a/src/soc/mediatek/mt8195/include/soc/mt6360.h +++ b/src/soc/mediatek/mt8195/include/soc/mt6360.h @@ -24,20 +24,20 @@ enum { MT6360_INDEX_COUNT, }; -enum mt6360_ldo_id { - MT6360_LDO1 = 0, - MT6360_LDO2, - MT6360_LDO3, +/* + * This must match the regulator IDs defined in EC's BC1.2 MT6360 driver. + * Please do NOT change the order. + */ +enum mt6360_regulator_id { + MT6360_LDO3 = 0, MT6360_LDO5, - MT6360_LDO_COUNT, -}; - -enum mt6360_pmic_id { - MT6360_PMIC_BUCK1 = 0, - MT6360_PMIC_BUCK2, - MT6360_PMIC_LDO6, - MT6360_PMIC_LDO7, - MT6360_PMIC_COUNT, + MT6360_LDO6, + MT6360_LDO7, + MT6360_BUCK1, + MT6360_BUCK2, + MT6360_LDO1, + MT6360_LDO2, + MT6360_REGULATOR_COUNT, }; struct mt6360_i2c_data { @@ -56,14 +56,14 @@ struct mt6360_data { void mt6360_init(uint8_t bus); -void mt6360_ldo_enable(enum mt6360_ldo_id ldo_id, uint8_t enable); -uint8_t mt6360_ldo_is_enabled(enum mt6360_ldo_id ldo_id); -void mt6360_ldo_set_voltage(enum mt6360_ldo_id ldo_id, u32 voltage_uv); -u32 mt6360_ldo_get_voltage(enum mt6360_ldo_id ldo_id); +void mt6360_ldo_enable(enum mt6360_regulator_id id, uint8_t enable); +uint8_t mt6360_ldo_is_enabled(enum mt6360_regulator_id id); +void mt6360_ldo_set_voltage(enum mt6360_regulator_id id, u32 voltage_uv); +u32 mt6360_ldo_get_voltage(enum mt6360_regulator_id id); -void mt6360_pmic_enable(enum mt6360_pmic_id pmic_id, uint8_t enable); -uint8_t mt6360_pmic_is_enabled(enum mt6360_pmic_id pmic_id); -void mt6360_pmic_set_voltage(enum mt6360_pmic_id pmic_id, u32 voltage_uv); -u32 mt6360_pmic_get_voltage(enum mt6360_pmic_id pmic_id); +void mt6360_pmic_enable(enum mt6360_regulator_id id, uint8_t enable); +uint8_t mt6360_pmic_is_enabled(enum mt6360_regulator_id id); +void mt6360_pmic_set_voltage(enum mt6360_regulator_id id, u32 voltage_uv); +u32 mt6360_pmic_get_voltage(enum mt6360_regulator_id id); #endif -- cgit v1.2.3