summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8195/include
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.com>2021-07-13 17:18:40 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-07-21 15:46:09 +0000
commitcd67657dea6e4c5ca1f068ebf16623924e1b001d (patch)
treee0ac58cfd1083027ee31008cb227f68943c61b5b /src/soc/mediatek/mt8195/include
parent881df06124844957fa68fac289f862a5d87a2e86 (diff)
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 <rex-bc.chen@mediatek.com> Change-Id: I9437edb9776442759ce04c31d315c3760078ffb3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56434 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8195/include')
-rw-r--r--src/soc/mediatek/mt8195/include/soc/mt6360.h42
1 files changed, 21 insertions, 21 deletions
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