[PATCH v2 00/14] power: domain: mediatek: refactor driver and add MT8188 support

Julien Stephan jstephan at baylibre.com
Thu Jul 9 14:58:06 CEST 2026


This series adds power domain support for the MediaTek MT8188 SoC, used
by the Genio 510 (mt8370) and Genio 700 (mt8390) EVKs.

The existing MediaTek scpsys power domain driver is a single file
driver, that supports MT7622/MT7623/MT7629 SoCs.
MT8188 is much more complex and adding it to the current driver will
make it really big and difficult to maintain.

The series is organised as follows:

 - First, some cleanup:
   - drop CONFIG_MTK_POWER_DOMAIN from the defconfigs whose device
     trees have no matching scpsys node. It builds only dead code.
   - remove the enum-based per-SoC dispatch, keeping the per-SoC
     information in the match data.
   - keep the Makefile and Kconfig sorted,

 - Then preparatory refactoring with no functional change:
   - prefix the power_domain_ops callbacks with mtk_,
   - split the monolithic driver into per-SoC drivers
     sharing a common core (selected through a hidden MTK_POWER_DOMAIN
     symbol), and wrap each SoC's domain table in a struct scp_soc_data
     that also carries its size.

 - Extend core driver:
   - rename the flat probe to mtk_scpsys_probe
   - add support for the power-controller model, i.e. per-domain power
     status register offsets, ordered bus-protection steps, per-domain
     clocks and parent domains, and a probe that walks the controller's
     subnodes to build the domain tree.

 - Add the MT8188 power domain driver and enable it on the Genio 510 and
   Genio 700 EVKs.

The existing MT7622/MT7623/MT7629 drivers are functionally unchanged.

Tested on Genio 700 board.

Note: when booting the following warnings are displayed:

  mt8188_power_domain power-controller: power-domain at 22: failed to get subsys clk at index 0: -19
  mt8188_power_domain power-controller: failed to add child domain: power-domain at 22
  mt8188_power_domain power-controller: power-domain at 30: failed to get subsys clk at index 0: -19
  mt8188_power_domain power-controller: failed to add child domain: power-domain at 30
  mt8188_power_domain power-controller: power-domain at 24: failed to get subsys clk at index 0: -19
  mt8188_power_domain power-controller: failed to add child domain: power-domain at 24
  mt8188_power_domain power-controller: power-domain at 21: failed to get subsys clk at index 0: -19
  mt8188_power_domain power-controller: failed to add child domain: power-domain at 21
  mt8188_power_domain power-controller: power-domain at 13: failed to get clk at index 2: -19
  mt8188_power_domain power-controller: failed to add child domain: power-domain at 13

Theses warnings are harmless. They exist because the clock driver is
missing some clock definitions, such as audio. These clock definition can
be added later, when needed.

This series depends on [1] to fix a pericfg-ao clock and on [2] to apply
MAINTAINERS changes properly.

[1]: https://lore.kernel.org/all/20260701-mt8188-clk-add-missing-clock-in-pericfg-ao-v1-1-13109b199248@baylibre.com/

[2]: https://lore.kernel.org/all/20260617024105.152655-1-marek.vasut%2Brenesas@mailbox.org/

Signed-off-by: Julien Stephan <jstephan at baylibre.com>
---
Changes in v2:
- As suggested by David, I used mt7622 naming instead of mt7629 to
  follow the fallback compatible from upstream dt.
- In the same way, I did the same with mt7623 and mt2701
- Link to v1: https://patch.msgid.link/20260708-mt8188-add-power-domain-v1-0-0e930b4f714e@baylibre.com

To: u-boot at lists.denx.de
Cc: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream at mediatek.com>
Cc: Jaehoon Chung <jh80.chung at samsung.com>
Cc: Peng Fan <peng.fan at nxp.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: Julien Stephan <jstephan at baylibre.com>
Cc: Tien Fong Chee <tien.fong.chee at altera.com>
Cc: Chris-QJ Chen <chris-qj.chen at mediatek.com>
Cc: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
Cc: Brian Sune <briansune at gmail.com>
Cc: "Markus Schneider-Pargmann (TI.com)" <msp at baylibre.com>
Cc: Johan Jonker <jbx6244 at gmail.com>
Cc: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi at altera.com>
Cc: Marek Vasut <marek.vasut+renesas at mailbox.org>
Cc: Sumit Garg <sumit.garg at oss.qualcomm.com>
Cc: Aswin Murugan <aswin.murugan at oss.qualcomm.com>
Cc: Neil Armstrong <neil.armstrong at linaro.org>
Cc: Sam Shih <sam.shih at mediatek.com>
Cc: Sam Protsenko <semen.protsenko at linaro.org>
Cc: Ryder Lee <ryder.lee at mediatek.com>
Cc: Weijie Gao <weijie.gao at mediatek.com>
Cc: Chunfeng Yun <chunfeng.yun at mediatek.com>
Cc: Igor Belwon <igor.belwon at mentallysanemainliners.org>
Cc: David Lechner <dlechner at baylibre.com>
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: Simon Glass <sjg at chromium.org>
Cc: Kory Maincent <kory.maincent at bootlin.com>
Cc: Kuan-Wei Chiu <visitorckw at gmail.com>
Cc: Bastien Curutchet <bastien.curutchet at bootlin.com>
Cc: Raymond Mao <raymond.mao at riscstar.com>
Cc: Casey Connolly <casey.connolly at linaro.org>
Cc: Macpaul Lin <Macpaul.Lin at mediatek.com>
Cc: Carlo Caione <ccaione at baylibre.com>
Cc: Julien Masson <jmasson at baylibre.com>

---
Julien Stephan (14):
      power: domain: keep Makefile and Kconfig sorted
      configs: mediatek: drop unused CONFIG_MTK_POWER_DOMAIN
      power: domain: mediatek: use MT7622 naming instead of MT7629
      power: domain: mediatek: use MT2701 naming instead of MT7623
      power: domain: mediatek: remove enum scp_domain_type
      power: domain: mediatek: prefix internal identifiers with mtk_
      power: domain: mediatek: constify scp_domain_data instances
      power: domain: mediatek: split into per-SoC drivers
      power: domain: mediatek: wrap domain tables in struct scp_soc_data
      power: domain: mediatek: rename mtk_power_domain_probe to mtk_scpsys_probe
      power: domain: mediatek: rename struct mtk_scp_domain to mtk_scpsys
      power: domain: mediatek: add support for the power-controller model
      power: domain: mediatek: add MT8188 power domain driver
      configs: mediatek: enable MT8188 power domain

 MAINTAINERS                                |   1 +
 configs/mt7622_rfb_defconfig               |   2 +-
 configs/mt7623a_unielec_u7623_02_defconfig |   2 +-
 configs/mt7623n_bpir2_defconfig            |   2 +-
 configs/mt7629_rfb_defconfig               |   2 +-
 configs/mt7981_emmc_rfb_defconfig          |   2 -
 configs/mt7981_rfb_defconfig               |   2 -
 configs/mt7981_sd_rfb_defconfig            |   2 -
 configs/mt7986_rfb_defconfig               |   2 -
 configs/mt7986a_bpir3_emmc_defconfig       |   2 -
 configs/mt7986a_bpir3_sd_defconfig         |   2 -
 configs/mt7987_emmc_rfb_defconfig          |   2 -
 configs/mt7987_rfb_defconfig               |   2 -
 configs/mt7987_sd_rfb_defconfig            |   2 -
 configs/mt7988_rfb_defconfig               |   2 -
 configs/mt7988_sd_rfb_defconfig            |   2 -
 configs/mt8188.config                      |   2 +
 drivers/power/domain/Kconfig               |  89 ++--
 drivers/power/domain/Makefile              |  15 +-
 drivers/power/domain/mt2701-power-domain.c |  89 ++++
 drivers/power/domain/mt7622-power-domain.c |  56 +++
 drivers/power/domain/mt8188-power-domain.c | 665 +++++++++++++++++++++++++++++
 drivers/power/domain/mtk-power-domain.c    | 576 ++++++++++++++-----------
 drivers/power/domain/mtk-power-domain.h    | 131 ++++++
 24 files changed, 1352 insertions(+), 302 deletions(-)
---
base-commit: 8101ed2547180109903e9c7a2ecc8e0679c7ec35
change-id: 20260702-mt8188-add-power-domain-488f0c2daaed
prerequisite-message-id: 20260701-mt8188-clk-add-missing-clock-in-pericfg-ao-v1-1-13109b199248 at baylibre.com
prerequisite-patch-id: be920ef2f5c93fb8111072d8fb30411d227a52de

Best regards,
--  
Julien Stephan <jstephan at baylibre.com>



More information about the U-Boot mailing list