Commit e9284603 authored by Elaine Zhang's avatar Elaine Zhang Committed by Heiko Stuebner

soc: rockchip: power-domain: add power domain support for rk3328

The rk3328 uses the newly introduced support for power-domain control
in hiword-mask registers.
Signed-off-by: default avatarElaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 825681c8
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <dt-bindings/power/rk3288-power.h> #include <dt-bindings/power/rk3288-power.h>
#include <dt-bindings/power/rk3328-power.h>
#include <dt-bindings/power/rk3368-power.h> #include <dt-bindings/power/rk3368-power.h>
#include <dt-bindings/power/rk3399-power.h> #include <dt-bindings/power/rk3399-power.h>
...@@ -104,6 +105,9 @@ struct rockchip_pmu { ...@@ -104,6 +105,9 @@ struct rockchip_pmu {
#define DOMAIN_RK3288(pwr, status, req, wakeup) \ #define DOMAIN_RK3288(pwr, status, req, wakeup) \
DOMAIN(pwr, status, req, req, (req) + 16, wakeup) DOMAIN(pwr, status, req, req, (req) + 16, wakeup)
#define DOMAIN_RK3328(pwr, status, req, wakeup) \
DOMAIN_M(pwr, pwr, req, (req) + 10, req, wakeup)
#define DOMAIN_RK3368(pwr, status, req, wakeup) \ #define DOMAIN_RK3368(pwr, status, req, wakeup) \
DOMAIN(pwr, status, req, (req) + 16, req, wakeup) DOMAIN(pwr, status, req, (req) + 16, req, wakeup)
...@@ -714,6 +718,18 @@ static const struct rockchip_domain_info rk3288_pm_domains[] = { ...@@ -714,6 +718,18 @@ static const struct rockchip_domain_info rk3288_pm_domains[] = {
[RK3288_PD_GPU] = DOMAIN_RK3288(9, 9, 2, false), [RK3288_PD_GPU] = DOMAIN_RK3288(9, 9, 2, false),
}; };
static const struct rockchip_domain_info rk3328_pm_domains[] = {
[RK3328_PD_CORE] = DOMAIN_RK3328(-1, 0, 0, false),
[RK3328_PD_GPU] = DOMAIN_RK3328(-1, 1, 1, false),
[RK3328_PD_BUS] = DOMAIN_RK3328(-1, 2, 2, true),
[RK3328_PD_MSCH] = DOMAIN_RK3328(-1, 3, 3, true),
[RK3328_PD_PERI] = DOMAIN_RK3328(-1, 4, 4, true),
[RK3328_PD_VIDEO] = DOMAIN_RK3328(-1, 5, 5, false),
[RK3328_PD_HEVC] = DOMAIN_RK3328(-1, 6, 6, false),
[RK3328_PD_VIO] = DOMAIN_RK3328(-1, 8, 8, false),
[RK3328_PD_VPU] = DOMAIN_RK3328(-1, 9, 9, false),
};
static const struct rockchip_domain_info rk3368_pm_domains[] = { static const struct rockchip_domain_info rk3368_pm_domains[] = {
[RK3368_PD_PERI] = DOMAIN_RK3368(13, 12, 6, true), [RK3368_PD_PERI] = DOMAIN_RK3368(13, 12, 6, true),
[RK3368_PD_VIO] = DOMAIN_RK3368(15, 14, 8, false), [RK3368_PD_VIO] = DOMAIN_RK3368(15, 14, 8, false),
...@@ -769,6 +785,15 @@ static const struct rockchip_pmu_info rk3288_pmu = { ...@@ -769,6 +785,15 @@ static const struct rockchip_pmu_info rk3288_pmu = {
.domain_info = rk3288_pm_domains, .domain_info = rk3288_pm_domains,
}; };
static const struct rockchip_pmu_info rk3328_pmu = {
.req_offset = 0x414,
.idle_offset = 0x484,
.ack_offset = 0x484,
.num_domains = ARRAY_SIZE(rk3328_pm_domains),
.domain_info = rk3328_pm_domains,
};
static const struct rockchip_pmu_info rk3368_pmu = { static const struct rockchip_pmu_info rk3368_pmu = {
.pwr_offset = 0x0c, .pwr_offset = 0x0c,
.status_offset = 0x10, .status_offset = 0x10,
...@@ -804,6 +829,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = { ...@@ -804,6 +829,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = {
.compatible = "rockchip,rk3288-power-controller", .compatible = "rockchip,rk3288-power-controller",
.data = (void *)&rk3288_pmu, .data = (void *)&rk3288_pmu,
}, },
{
.compatible = "rockchip,rk3328-power-controller",
.data = (void *)&rk3328_pmu,
},
{ {
.compatible = "rockchip,rk3368-power-controller", .compatible = "rockchip,rk3368-power-controller",
.data = (void *)&rk3368_pmu, .data = (void *)&rk3368_pmu,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment