summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Stephan <[email protected]>2026-04-09 15:30:40 -0500
committerDavid Lechner <[email protected]>2026-04-29 09:27:05 -0500
commita97c82bfdf52aab727ecb4ce3a81ef585e4c55d3 (patch)
tree3e8a347c6df6539815305ddd1ea6f198965e8e31
parente262eb4cfe46a6feef554dfb68d721ab83930711 (diff)
power: pmic: mtk-pwrap: add MT8195 support
Add mt8195 support. Support comes directly from commit e88edc977b00 ("soc: mediatek: pwrap: add pwrap driver for MT8195 SoC") from the Linux Kernel. Signed-off-by: Julien Stephan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: David Lechner <[email protected]>
-rw-r--r--drivers/power/pmic/mtk-pwrap.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/power/pmic/mtk-pwrap.c b/drivers/power/pmic/mtk-pwrap.c
index 9a249c796e7..47347785519 100644
--- a/drivers/power/pmic/mtk-pwrap.c
+++ b/drivers/power/pmic/mtk-pwrap.c
@@ -278,6 +278,23 @@ static int mt8189_regs[] = {
[PWRAP_WACS2_RDATA] = 0x8A8,
};
+static int mt8195_regs[] = {
+ [PWRAP_INIT_DONE2] = 0x0,
+ [PWRAP_STAUPD_CTRL] = 0x4C,
+ [PWRAP_TIMER_EN] = 0x3E4,
+ [PWRAP_INT_EN] = 0x420,
+ [PWRAP_INT_FLG] = 0x428,
+ [PWRAP_INT_CLR] = 0x42C,
+ [PWRAP_INT1_EN] = 0x450,
+ [PWRAP_INT1_FLG] = 0x458,
+ [PWRAP_INT1_CLR] = 0x45C,
+ [PWRAP_WACS2_CMD] = 0x880,
+ [PWRAP_SWINF_2_WDATA_31_0] = 0x884,
+ [PWRAP_SWINF_2_RDATA_31_0] = 0x894,
+ [PWRAP_WACS2_VLDCLR] = 0x8A4,
+ [PWRAP_WACS2_RDATA] = 0x8A8,
+};
+
static int mt8365_regs[] = {
[PWRAP_MUX_SEL] = 0x0,
[PWRAP_WRAP_EN] = 0x4,
@@ -848,6 +865,14 @@ static struct pmic_wrapper_type pwrap_mt8189 = {
.caps = PWRAP_CAP_ARB,
};
+static const struct pmic_wrapper_type pwrap_mt8195 = {
+ .regs = mt8195_regs,
+ .arb_en_all = 0x777f, /* NEED CONFIRM */
+ .spi_w = PWRAP_MAN_CMD_SPI_WRITE,
+ .wdt_src = PWRAP_WDT_SRC_MASK_ALL,
+ .caps = PWRAP_CAP_ARB,
+};
+
static const struct pmic_wrapper_type pwrap_mt8365 = {
.regs = mt8365_regs,
.arb_en_all = 0x3ffff,
@@ -859,6 +884,7 @@ static const struct pmic_wrapper_type pwrap_mt8365 = {
static const struct udevice_id mtk_pwrap_ids[] = {
{ .compatible = "mediatek,mt8188-pwrap", .data = (ulong)&pwrap_mt8188 },
{ .compatible = "mediatek,mt8189-pwrap", .data = (ulong)&pwrap_mt8189 },
+ { .compatible = "mediatek,mt8195-pwrap", .data = (ulong)&pwrap_mt8195 },
{ .compatible = "mediatek,mt8365-pwrap", .data = (ulong)&pwrap_mt8365 },
{ }
};