Re: [PATCH v4 3/3] soc: mediatek: mtk-pmic-pwrap: Add MT6789 support
From: Ilia Snezhkov
Date: Fri Nov 27 2026 - 23:33:15 EST
Hi Roman,
On Fri, 27 Nov 2026 18:12:33 +0000, Roman Vivchar wrote:
> I don't see INT_FLG and INT_CLR in the 5.10 kernel [1]. Where did you
> find them?
They come from the MediaTek PMIF bank 3 interrupt register layout that
MT6789 shares with MT6833/MT6853/MT8195:
- In mainline drivers/spmi/spmi-mtk-pmif.c (mt8195_regs[]) and
drivers/soc/mediatek/mtk-pmic-wrap.c (mt8195_regs[]), every PMIF
offset matches MT6789 (INIT_DONE=0x0, TIMER_EN=0x3E4,
WACS2=0x880..0x8A8, bank 3 IRQ enable=0x450), and bank 3's status
and clear registers sit at +0x8 / +0xC:
PMIF_IRQ_EVENT_EN_3 / PWRAP_INT1_EN = 0x450
PMIF_IRQ_FLAG_3 / PWRAP_INT1_FLG = 0x458
PMIF_IRQ_CLR_3 / PWRAP_INT1_CLR = 0x45C
- The same 5.10 tree you linked also has this exact layout in
drivers/spmi/spmi-mtk-pmif-core.c (mt6833_regs[] lines 167-169 and
mt6xxx_regs[] lines 119-121, where mt6833_regs[] in mtk-pmic-wrap.c
is identical to mt6789_regs[]).
Omitting PWRAP_INT_FLG and PWRAP_INT_CLR in the 5.10 BSP's mt6789_regs[]
leaves both entries zero-initialized (offset 0x0 = PWRAP_INIT_DONE2), so
if any interrupt enabled by PWRAP_INT_EN (0x450, mask 0x180000) fires,
pwrap_interrupt() reads/writes 0x0 instead of clearing bank 3 and leaves
the level-high IRQ asserted.
> Also, the series doesn't apply on next-20261125. It might be due to
> recent mt6572 changes. Please rebase.
Confirmed: the conflicts are from the mt6572 commits and the
dev_err_probe() conversion in pwrap_probe() on linux-next. I will rebase
the series onto linux-next, carry your Reviewed-by on patch 1/3, and
send v5.
Thanks for reviewing!
Best regards,
Ilia