diff options
author | Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> | 2018-10-24 19:18:28 +0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2018-11-29 01:46:26 +0000 |
commit | 23b1afe4be644997817541159f346ea3d2d2ab8f (patch) | |
tree | 379fdc92bf4b89071eff28a34c72830130be2fc7 /src/soc/mediatek/mt8183/include | |
parent | a6db8f3cc3879cc1650f8f42dcec7074dd3f8604 (diff) | |
download | coreboot-23b1afe4be644997817541159f346ea3d2d2ab8f.tar.xz |
mediatek/mt8183: Add MT6358 PMIC support
PMIC provides power features like auxadc, buck/ldo,
interrupt-controller..etc
BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui
Change-Id: Ic247faf73517f6512f9c9a69ba0254c749d68d4c
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/29422
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8183/include')
-rw-r--r-- | src/soc/mediatek/mt8183/include/soc/mt6358.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/include/soc/mt6358.h b/src/soc/mediatek/mt8183/include/soc/mt6358.h new file mode 100644 index 0000000000..02937bac9a --- /dev/null +++ b/src/soc/mediatek/mt8183/include/soc/mt6358.h @@ -0,0 +1,42 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 MediaTek Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __SOC_MEDIATEK_MT6358_H__ +#define __SOC_MEDIATEK_MT6358_H__ + +enum { + PMIC_SWCID = 0x000a, + PMIC_VM_MODE = 0x004e, + PMIC_TOP_RST_MISC = 0x014c, + PMIC_TOP_RST_MISC_SET = 0x014e, + PMIC_TOP_RST_MISC_CLR = 0x0150, + PMIC_TOP_TMA_KEY = 0x03a8, + PMIC_PWRHOLD = 0x0a08, + PMIC_CPSDSA4 = 0x0a2e, + PMIC_VDRAM1_VOSEL_SLEEP = 0x160a, + PMIC_SMPS_ANA_CON0 = 0x1808, +}; + +struct pmic_setting { + unsigned short addr; + unsigned short val; + unsigned short mask; + unsigned char shift; +}; + +void mt6358_init(void); +void pmic_set_power_hold(bool enable); + +#endif /* __SOC_MEDIATEK_MT6358_H__ */ |