Lines Matching +full:hhi +full:- +full:sysctrl
5 * SPDX-License-Identifier: GPL-2.0+
25 /* HHI Offsets */
52 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_power_off()
58 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG0, in meson_gx_pwrc_vpu_power_off()
63 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG1, in meson_gx_pwrc_vpu_power_off()
68 regmap_update_bits(pd->regmap_hhi, HHI_MEM_PD_REG0, in meson_gx_pwrc_vpu_power_off()
74 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_power_off()
79 clk_disable_unprepare(pd->vpu_clk); in meson_gx_pwrc_vpu_power_off()
80 clk_disable_unprepare(pd->vapb_clk); in meson_gx_pwrc_vpu_power_off()
90 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_g12a_pwrc_vpu_power_off()
96 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG0, in meson_g12a_pwrc_vpu_power_off()
101 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG1, in meson_g12a_pwrc_vpu_power_off()
106 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG2, in meson_g12a_pwrc_vpu_power_off()
111 regmap_update_bits(pd->regmap_hhi, HHI_MEM_PD_REG0, in meson_g12a_pwrc_vpu_power_off()
117 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_g12a_pwrc_vpu_power_off()
122 clk_disable_unprepare(pd->vpu_clk); in meson_g12a_pwrc_vpu_power_off()
123 clk_disable_unprepare(pd->vapb_clk); in meson_g12a_pwrc_vpu_power_off()
132 ret = clk_prepare_enable(pd->vpu_clk); in meson_gx_pwrc_vpu_setup_clk()
136 ret = clk_prepare_enable(pd->vapb_clk); in meson_gx_pwrc_vpu_setup_clk()
138 clk_disable_unprepare(pd->vpu_clk); in meson_gx_pwrc_vpu_setup_clk()
149 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_power_on()
155 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG0, in meson_gx_pwrc_vpu_power_on()
161 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG1, in meson_gx_pwrc_vpu_power_on()
167 regmap_update_bits(pd->regmap_hhi, HHI_MEM_PD_REG0, in meson_gx_pwrc_vpu_power_on()
173 ret = reset_control_assert(pd->rstc); in meson_gx_pwrc_vpu_power_on()
177 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_gx_pwrc_vpu_power_on()
180 ret = reset_control_deassert(pd->rstc); in meson_gx_pwrc_vpu_power_on()
197 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_g12a_pwrc_vpu_power_on()
203 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG0, in meson_g12a_pwrc_vpu_power_on()
209 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG1, in meson_g12a_pwrc_vpu_power_on()
215 regmap_update_bits(pd->regmap_hhi, HHI_VPU_MEM_PD_REG2, in meson_g12a_pwrc_vpu_power_on()
221 regmap_update_bits(pd->regmap_hhi, HHI_MEM_PD_REG0, in meson_g12a_pwrc_vpu_power_on()
227 ret = reset_control_assert(pd->rstc); in meson_g12a_pwrc_vpu_power_on()
231 regmap_update_bits(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, in meson_g12a_pwrc_vpu_power_on()
234 ret = reset_control_deassert(pd->rstc); in meson_g12a_pwrc_vpu_power_on()
249 regmap_read(pd->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, ®); in meson_gx_pwrc_vpu_get_power()
282 vpu_pd_match = of_device_get_match_data(&pdev->dev); in meson_gx_pwrc_vpu_probe()
284 dev_err(&pdev->dev, "failed to get match data\n"); in meson_gx_pwrc_vpu_probe()
285 return -ENODEV; in meson_gx_pwrc_vpu_probe()
288 vpu_pd = devm_kzalloc(&pdev->dev, sizeof(*vpu_pd), GFP_KERNEL); in meson_gx_pwrc_vpu_probe()
290 return -ENOMEM; in meson_gx_pwrc_vpu_probe()
294 parent_np = of_get_parent(pdev->dev.of_node); in meson_gx_pwrc_vpu_probe()
298 dev_err(&pdev->dev, "failed to get regmap\n"); in meson_gx_pwrc_vpu_probe()
302 regmap_hhi = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, in meson_gx_pwrc_vpu_probe()
303 "amlogic,hhi-sysctrl"); in meson_gx_pwrc_vpu_probe()
305 dev_err(&pdev->dev, "failed to get HHI regmap\n"); in meson_gx_pwrc_vpu_probe()
309 rstc = devm_reset_control_array_get_exclusive(&pdev->dev); in meson_gx_pwrc_vpu_probe()
311 return dev_err_probe(&pdev->dev, PTR_ERR(rstc), in meson_gx_pwrc_vpu_probe()
314 vpu_clk = devm_clk_get(&pdev->dev, "vpu"); in meson_gx_pwrc_vpu_probe()
316 dev_err(&pdev->dev, "vpu clock request failed\n"); in meson_gx_pwrc_vpu_probe()
320 vapb_clk = devm_clk_get(&pdev->dev, "vapb"); in meson_gx_pwrc_vpu_probe()
322 dev_err(&pdev->dev, "vapb clock request failed\n"); in meson_gx_pwrc_vpu_probe()
326 vpu_pd->regmap_ao = regmap_ao; in meson_gx_pwrc_vpu_probe()
327 vpu_pd->regmap_hhi = regmap_hhi; in meson_gx_pwrc_vpu_probe()
328 vpu_pd->rstc = rstc; in meson_gx_pwrc_vpu_probe()
329 vpu_pd->vpu_clk = vpu_clk; in meson_gx_pwrc_vpu_probe()
330 vpu_pd->vapb_clk = vapb_clk; in meson_gx_pwrc_vpu_probe()
343 vpu_pd->genpd.flags = GENPD_FLAG_ALWAYS_ON; in meson_gx_pwrc_vpu_probe()
344 pm_genpd_init(&vpu_pd->genpd, NULL, powered_off); in meson_gx_pwrc_vpu_probe()
346 return of_genpd_add_provider_simple(pdev->dev.of_node, in meson_gx_pwrc_vpu_probe()
347 &vpu_pd->genpd); in meson_gx_pwrc_vpu_probe()
357 vpu_pd->genpd.power_off(&vpu_pd->genpd); in meson_gx_pwrc_vpu_shutdown()
361 { .compatible = "amlogic,meson-gx-pwrc-vpu", .data = &vpu_hdmi_pd },
363 .compatible = "amlogic,meson-g12a-pwrc-vpu",