This series adds the power domain (scpsys) driver for the MediaTek
MT8365 SoC.

The scpsys core so far only drove bus protection through the infracfg
register block. MT8365 also gates some domains through the SMI common
space and acknowledges its way-enable protections via the read-only
infracfg "nao" mirror, so the first patch extends the core to select a
per-step register block before the MT8365 driver is added on top.

The domain tables and bus protection sequences mirror the Linux
mt8365-pm-domains.h data.

This series depends on [1] for various kconfig cleanup

[1]: 
https://lore.kernel.org/all/[email protected]/#r

Signed-off-by: Julien Stephan <[email protected]>
---
Changes in v2:
- Add MTK_SCPD_STRICT_BUS_PROTECTION domain cap: some domains need subsys 
clocks enabled after bus protection release, not before.
- Fix SMI common mapping: no syscon fallback compatible, so map registers 
directly via ofnode_get_addr() instead of regmap_init_mem().
- Add probe-time validation: fail with clear error if a domain's bp_cfg 
references BUS_PROT_BLOCK_INFRA_NAO/BUS_PROT_BLOCK_SMI but the regmap wasn't 
resolved, instead of leaving a NULL to be dereferenced later.
- Fix commit message: correct Fixes: tag now points to actual upstream commit 
(ecaf11aaee98, "pmdomain: mediatek: Add support for
  WAY_EN operations").
- MT8365: fix mis-named/mis-valued PROTECTEN bits (MDMCU_M1→MM_M1, INFRA2MFG 
value corrected to BIT(25), add missing MFG_M1).
- Link to v1: 
https://patch.msgid.link/[email protected]

To: GSS_MTK_Uboot_upstream <[email protected]>
To: [email protected]
Cc: Ryder Lee <[email protected]>
Cc: Weijie Gao <[email protected]>
Cc: Chunfeng Yun <[email protected]>
Cc: Igor Belwon <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Julien Stephan <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Irving-ch Lin <[email protected]>
Cc: Julien Masson <[email protected]>

---
Julien Stephan (3):
      power: domain: mediatek: support SMI and infra-nao bus protection
      power: domain: mtk: add MT8365 power domain
      configs: mt8365: enable the power domain driver

 configs/mt8365_evk_defconfig               |   1 +
 drivers/power/domain/Makefile              |   1 +
 drivers/power/domain/mt8188-power-domain.c | 164 ++++++++++----------
 drivers/power/domain/mt8189-power-domain.c |  74 ++++-----
 drivers/power/domain/mt8365-power-domain.c | 236 +++++++++++++++++++++++++++++
 drivers/power/domain/mt8366-power-domain.c |  40 ++---
 drivers/power/domain/mtk-power-domain.c    | 166 ++++++++++++++++----
 drivers/power/domain/mtk-power-domain.h    |  66 ++++++--
 8 files changed, 564 insertions(+), 184 deletions(-)
---
base-commit: e91d0b53e2678e0e6439370ead9bf2c71404b715
change-id: 20260902-mt8365-add-power-domain-ca1946099a87
prerequisite-message-id: 
[email protected]
prerequisite-patch-id: 349b47fdcaa519c4bb9430a7d0a9cf34db04b64f
prerequisite-patch-id: 82685c1627b230ebcd75603c5b199ca61b53e53d
prerequisite-patch-id: 102fc1198a2b104b6fe2052d7258a97ab1f6033c
prerequisite-patch-id: 410192d9062fd4a4fe9152a0656cd00fa960d377
prerequisite-patch-id: 65651c5a260e0b28b3561d504b494f6625932a2f
prerequisite-patch-id: f710336972a49695622783e0724531fb2a2eb07f

Best regards,
--  
Julien Stephan <[email protected]>

Reply via email to