summaryrefslogtreecommitdiffstats
path: root/src/mainboard
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2021-07-16 20:04:26 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-07-21 15:46:53 +0000
commit86c50e11ced7d7e3ae62b90a4a0dcdae8d740247 (patch)
tree21cc1222df5db7a4cb8dcc166eef2984b9614e61 /src/mainboard
parentcd67657dea6e4c5ca1f068ebf16623924e1b001d (diff)
downloadcoreboot-86c50e11ced7d7e3ae62b90a4a0dcdae8d740247.tar.gz
coreboot-86c50e11ced7d7e3ae62b90a4a0dcdae8d740247.tar.bz2
coreboot-86c50e11ced7d7e3ae62b90a4a0dcdae8d740247.zip
soc/mediatek/mt8195: modify mt6360 interface
With the new definition of mt6360_regulator_id, merge the MT6360 LDO and PMIC interfaces into one. Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: I7ccc32cb0a9481d5f55349c152267a44fe09d20a Reviewed-on: https://review.coreboot.org/c/coreboot/+/56435 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/cherry/mainboard.c4
-rw-r--r--src/mainboard/google/cherry/regulator.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/google/cherry/mainboard.c b/src/mainboard/google/cherry/mainboard.c
index 21ab24c58af5..76aa59b5bb4f 100644
--- a/src/mainboard/google/cherry/mainboard.c
+++ b/src/mainboard/google/cherry/mainboard.c
@@ -127,8 +127,8 @@ static void configure_sdcard(void)
mtk_i2c_bus_init(7);
mt6360_init(7);
- mt6360_ldo_enable(MT6360_LDO3, 1);
- mt6360_ldo_enable(MT6360_LDO5, 1);
+ mt6360_enable(MT6360_LDO3, 1);
+ mt6360_enable(MT6360_LDO5, 1);
}
/* Set up backlight control pins as output pin and power-off by default */
diff --git a/src/mainboard/google/cherry/regulator.c b/src/mainboard/google/cherry/regulator.c
index b59a643069aa..0c1f7feb05ed 100644
--- a/src/mainboard/google/cherry/regulator.c
+++ b/src/mainboard/google/cherry/regulator.c
@@ -57,7 +57,7 @@ void mainboard_set_regulator_vol(enum mtk_regulator regulator,
id = get_mt6360_regulator_id(regulator);
if (id >= 0) {
- mt6360_pmic_set_voltage(id, voltage_uv);
+ mt6360_set_voltage(id, voltage_uv);
return;
}
@@ -85,7 +85,7 @@ uint32_t mainboard_get_regulator_vol(enum mtk_regulator regulator)
id = get_mt6360_regulator_id(regulator);
if (id >= 0)
- return mt6360_pmic_get_voltage(id);
+ return mt6360_get_voltage(id);
id = get_mt6359p_regulator_id(regulator);
if (id >= 0)
@@ -113,7 +113,7 @@ int mainboard_enable_regulator(enum mtk_regulator regulator, uint8_t enable)
id = get_mt6360_regulator_id(regulator);
if (id >= 0) {
- mt6360_pmic_enable(id, enable);
+ mt6360_enable(id, enable);
return 0;
}
@@ -131,7 +131,7 @@ uint8_t mainboard_regulator_is_enabled(enum mtk_regulator regulator)
id = get_mt6360_regulator_id(regulator);
if (id >= 0)
- return mt6360_pmic_is_enabled(id);
+ return mt6360_is_enabled(id);
printk(BIOS_ERR,
"Failed to query regulator ID: %d\n; assuming disabled",