mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
soc: mediatek: pm-domains: Add buck isolation setting in power domain
In some chipsets, we need to disable EXT_BUCK_ISO before turning on the specific power pm-domains (mtcmos), such as ADSP in MT8192 and CAM_VCORE in MT8188. Add the MTK_SCPD_EXT_BUCK_ISO flag to control the buck isolation setting in the mediatek power domain driver. Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230117032640.13504-3-allen-kh.cheng@mediatek.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
This commit is contained in:
parent
1e28f6a35f
commit
7d1ae5926d
@ -219,6 +219,10 @@ static int scpsys_power_on(struct generic_pm_domain *genpd)
|
||||
if (ret)
|
||||
goto err_reg;
|
||||
|
||||
if (pd->data->ext_buck_iso_offs && MTK_SCPD_CAPS(pd, MTK_SCPD_EXT_BUCK_ISO))
|
||||
regmap_clear_bits(scpsys->base, pd->data->ext_buck_iso_offs,
|
||||
pd->data->ext_buck_iso_mask);
|
||||
|
||||
/* subsys power on */
|
||||
regmap_set_bits(scpsys->base, pd->data->ctl_offs, PWR_ON_BIT);
|
||||
regmap_set_bits(scpsys->base, pd->data->ctl_offs, PWR_ON_2ND_BIT);
|
||||
@ -273,6 +277,10 @@ static int scpsys_power_off(struct generic_pm_domain *genpd)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (pd->data->ext_buck_iso_offs && MTK_SCPD_CAPS(pd, MTK_SCPD_EXT_BUCK_ISO))
|
||||
regmap_set_bits(scpsys->base, pd->data->ext_buck_iso_offs,
|
||||
pd->data->ext_buck_iso_mask);
|
||||
|
||||
clk_bulk_disable_unprepare(pd->num_subsys_clks, pd->subsys_clks);
|
||||
|
||||
/* subsys power off */
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define MTK_SCPD_DOMAIN_SUPPLY BIT(4)
|
||||
/* can't set MTK_SCPD_KEEP_DEFAULT_OFF at the same time */
|
||||
#define MTK_SCPD_ALWAYS_ON BIT(5)
|
||||
#define MTK_SCPD_EXT_BUCK_ISO BIT(6)
|
||||
#define MTK_SCPD_CAPS(_scpd, _x) ((_scpd)->data->caps & (_x))
|
||||
|
||||
#define SPM_VDE_PWR_CON 0x0210
|
||||
|
Loading…
Reference in New Issue
Block a user