Lines Matching +full:hhi +full:- +full:sysctrl
1 // SPDX-License-Identifier: GPL-2.0
11 #include <power-domain-uclass.h>
24 /* HHI Offsets */
49 struct meson_gx_pwrc_vpu_priv *priv = dev_get_priv(power_domain->dev); in meson_gx_pwrc_vpu_on()
52 regmap_update_bits(priv->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_on()
58 regmap_update_bits(priv->regmap_hhi, HHI_VPU_MEM_PD_REG0, in meson_gx_pwrc_vpu_on()
64 regmap_update_bits(priv->regmap_hhi, HHI_VPU_MEM_PD_REG1, in meson_gx_pwrc_vpu_on()
70 regmap_update_bits(priv->regmap_hhi, HHI_MEM_PD_REG0, in meson_gx_pwrc_vpu_on()
76 ret = reset_assert_bulk(&priv->resets); in meson_gx_pwrc_vpu_on()
80 regmap_update_bits(priv->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_on()
83 ret = reset_deassert_bulk(&priv->resets); in meson_gx_pwrc_vpu_on()
87 ret = clk_enable_bulk(&priv->clks); in meson_gx_pwrc_vpu_on()
96 struct meson_gx_pwrc_vpu_priv *priv = dev_get_priv(power_domain->dev); in meson_gx_pwrc_vpu_off()
99 regmap_update_bits(priv->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_off()
105 regmap_update_bits(priv->regmap_hhi, HHI_VPU_MEM_PD_REG0, in meson_gx_pwrc_vpu_off()
110 regmap_update_bits(priv->regmap_hhi, HHI_VPU_MEM_PD_REG1, in meson_gx_pwrc_vpu_off()
115 regmap_update_bits(priv->regmap_hhi, HHI_MEM_PD_REG0, in meson_gx_pwrc_vpu_off()
121 regmap_update_bits(priv->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_off()
125 clk_disable_bulk(&priv->clks); in meson_gx_pwrc_vpu_off()
133 /* #power-domain-cells is 0 */ in meson_gx_pwrc_vpu_of_xlate()
135 if (args->args_count != 0) { in meson_gx_pwrc_vpu_of_xlate()
136 debug("Invalid args_count: %d\n", args->args_count); in meson_gx_pwrc_vpu_of_xlate()
137 return -EINVAL; in meson_gx_pwrc_vpu_of_xlate()
152 { .compatible = "amlogic,meson-gx-pwrc-vpu" },
163 priv->regmap_ao = syscon_node_to_regmap(dev_get_parent(dev)->node); in meson_gx_pwrc_vpu_probe()
164 if (IS_ERR(priv->regmap_ao)) in meson_gx_pwrc_vpu_probe()
165 return PTR_ERR(priv->regmap_ao); in meson_gx_pwrc_vpu_probe()
167 ret = ofnode_read_u32(dev->node, "amlogic,hhi-sysctrl", in meson_gx_pwrc_vpu_probe()
174 return -EINVAL; in meson_gx_pwrc_vpu_probe()
176 priv->regmap_hhi = syscon_node_to_regmap(hhi_node); in meson_gx_pwrc_vpu_probe()
177 if (IS_ERR(priv->regmap_hhi)) in meson_gx_pwrc_vpu_probe()
178 return PTR_ERR(priv->regmap_hhi); in meson_gx_pwrc_vpu_probe()
180 ret = reset_get_bulk(dev, &priv->resets); in meson_gx_pwrc_vpu_probe()
184 ret = clk_get_bulk(dev, &priv->clks); in meson_gx_pwrc_vpu_probe()