[PATCH v2 2/6] soc: mediatek: pm-domains: Add buck isolation setting in power domain

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Wed Dec 21 02:20:53 PST 2022


Il 21/12/22 04:44, Allen-KH Cheng ha scritto:
> In MT8192, we need to disable EXT_BUCK_ISO before turning on the ADSP
> power pm-domains (mtcmos).
> 
> Add the MTK_SCPD_EXT_BUCK_ISO flag to control the buck isolation
> setting in the mediatek power domain driver.
> 
> Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains")
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng at mediatek.com>
> ---
>   drivers/soc/mediatek/mtk-pm-domains.c | 8 ++++++++
>   drivers/soc/mediatek/mtk-pm-domains.h | 1 +
>   2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c
> index 09e3c38b8466..63f1e183f645 100644
> --- a/drivers/soc/mediatek/mtk-pm-domains.c
> +++ b/drivers/soc/mediatek/mtk-pm-domains.c
> @@ -218,6 +218,10 @@ static int scpsys_power_on(struct generic_pm_domain *genpd)
>   	if (ret)
>   		goto err_reg;
>   
> +	if (MTK_SCPD_CAPS(pd, MTK_SCPD_EXT_BUCK_ISO))

if (pd->data->ext_buck_iso_offs && MTK_SCPD_CAPS(pd, MTK_SCPD_EXT_BUCK_ISO))
	regmap_[...etc]

...so that we validate that ext_buck_iso_offs is actually present (as I
suppose that this is supposed to *never* be 0x0).

Regards,
Angelo



More information about the Linux-mediatek mailing list