[PATCH 06/12] power: domain: mediatek: split into per-SoC drivers

David Lechner dlechner at baylibre.com
Wed Jul 8 23:12:59 CEST 2026


On 7/8/26 8:07 AM, Julien Stephan wrote:
> In order to prepare addition of future SoC, split the current driver
> into common shared code and SoC specific drivers:
> 
>   - mtk-power-domain.c now only holds the common register access and
>     power on/off/request/probe logic plus the shared power_domain_ops.
>   - mtk-power-domain.h exposes the register definitions, the mtk_scp_domain
>     data structures and the core helpers to the per-SoC drivers.
>   - mt7623-power-domain.c and mt7629-power-domain.c each hold their own
>     domain table and U_BOOT_DRIVER registration. The mt7629 driver also
>     matches the mt7622 compatible, preserving the previous behaviour.
> 
> Update the mt7622, mt7623 and mt7629 defconfigs to select the matching
> per-SoC driver.
> 
> No functional change intended.
> 

...

> diff --git a/drivers/power/domain/Kconfig b/drivers/power/domain/Kconfig
> index a96c3fb979c..409d84628e3 100644
> --- a/drivers/power/domain/Kconfig
> +++ b/drivers/power/domain/Kconfig
> @@ -83,12 +83,29 @@ config MESON_SECURE_POWER_DOMAIN
>  	  Enable support for manipulating Amlogic Meson Secure power domains.
>  	  Support for Amlogic A1 series.
>  
> -config MTK_POWER_DOMAIN
> -	bool "Enable the MediaTek power domain driver"
> +config MT7623_POWER_DOMAIN
> +	bool "Enable the MediaTek power domain driver for MT7623 compatible SoC"
>  	depends on POWER_DOMAIN && ARCH_MEDIATEK
> +	select MTK_POWER_DOMAIN
>  	help
>  	  Enable support for manipulating MediaTek power domains via MMIO
> -	  mapped registers.
> +	  mapped registers for MT7623 compatible SoC. The driver powers
> +	  the SoC power domains on and off and handles the associated bus
> +	  protection bits.
> +
> +config MT7629_POWER_DOMAIN

As in the other patch I comment on, this would make more sense as
MT7622_POWER_DOMAIN since that is the fallback compatible.

> +	bool "Enable the MediaTek power domain driver for MT7629 compatible SoC"
> +	depends on POWER_DOMAIN && ARCH_MEDIATEK
> +	select MTK_POWER_DOMAIN
> +	help
> +	  Enable support for manipulating MediaTek power domains via MMIO
> +	  mapped registers for MT7629 compatible SoC. The driver powers
> +	  the SoC power domains on and off and handles the associated bus
> +	  protection bits. It is also used on MT7622.
> +
> +config MTK_POWER_DOMAIN
> +	bool
> +	depends on POWER_DOMAIN && ARCH_MEDIATEK
>  
>  config QCOM_RPMH_POWER_DOMAIN
>  	bool "Enable the QCOM RPMH Power domain driver"
> diff --git a/drivers/power/domain/Makefile b/drivers/power/domain/Makefile
> index f3cce2b104e..641071c2359 100644
> --- a/drivers/power/domain/Makefile
> +++ b/drivers/power/domain/Makefile
> @@ -14,6 +14,8 @@ obj-$(CONFIG_IMX8MP_MEDIAMIX_BLKCTRL) += imx8mp-mediamix.o
>  obj-$(CONFIG_MESON_EE_POWER_DOMAIN) += meson-ee-pwrc.o
>  obj-$(CONFIG_MESON_GX_VPU_POWER_DOMAIN) += meson-gx-pwrc-vpu.o
>  obj-$(CONFIG_MESON_SECURE_POWER_DOMAIN) += meson-secure-pwrc.o
> +obj-$(CONFIG_MT7623_POWER_DOMAIN) += mt7623-power-domain.o
> +obj-$(CONFIG_MT7629_POWER_DOMAIN) += mt7629-power-domain.o

And same with the file name.

>  obj-$(CONFIG_MTK_POWER_DOMAIN) += mtk-power-domain.o
>  obj-$(CONFIG_QCOM_RPMH_POWER_DOMAIN) += qcom-rpmhpd.o
>  obj-$(CONFIG_RENESAS_R8A78000_POWER_DOMAIN) += renesas-r8a78000-power-domain.o


More information about the U-Boot mailing list