From: Xiao Feng Date: Wed, 3 Feb 2016 09:40:17 +0000 (+0800) Subject: soc: rockchip: power-domain: Modify power domain driver for rk3366 X-Git-Tag: firefly_0821_release~3360 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1fd3c9b0b14052fc94fbdc497318d10d62bd82a0;p=firefly-linux-kernel-4.4.55.git soc: rockchip: power-domain: Modify power domain driver for rk3366 This driver is modified to support RK3366 SoC. Change-Id: If278582e721517a96499be203e3d28573cad880f Signed-off-by: Xiao Feng --- diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 6cdffb13c862..bb5ee88ea074 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -18,6 +18,7 @@ #include #include #include +#include #include struct rockchip_domain_info { @@ -448,6 +449,16 @@ static const struct rockchip_domain_info rk3288_pm_domains[] = { [RK3288_PD_GPU] = DOMAIN_RK3288(9, 9, 2), }; +static const struct rockchip_domain_info rk3366_pm_domains[] = { + [RK3366_PD_PERI] = DOMAIN_RK3368(10, 10, 6), + [RK3366_PD_VIO] = DOMAIN_RK3368(14, 14, 8), + [RK3366_PD_VIDEO] = DOMAIN_RK3368(13, 13, 7), + [RK3366_PD_RKVDEC] = DOMAIN_RK3368(11, 11, 7), + [RK3366_PD_WIFIBT] = DOMAIN_RK3368(8, 8, 9), + [RK3366_PD_VPU] = DOMAIN_RK3368(12, 12, 7), + [RK3366_PD_GPU] = DOMAIN_RK3368(15, 15, 2), +}; + static const struct rockchip_domain_info rk3368_pm_domains[] = { [RK3368_PD_PERI] = DOMAIN_RK3368(13, 12, 6), [RK3368_PD_VIO] = DOMAIN_RK3368(15, 14, 8), @@ -473,6 +484,23 @@ static const struct rockchip_pmu_info rk3288_pmu = { .domain_info = rk3288_pm_domains, }; +static const struct rockchip_pmu_info rk3366_pmu = { + .pwr_offset = 0x0c, + .status_offset = 0x10, + .req_offset = 0x3c, + .idle_offset = 0x40, + .ack_offset = 0x40, + + .core_pwrcnt_offset = 0x48, + .gpu_pwrcnt_offset = 0x50, + + .core_power_transition_time = 24, + .gpu_power_transition_time = 24, + + .num_domains = ARRAY_SIZE(rk3366_pm_domains), + .domain_info = rk3366_pm_domains, +}; + static const struct rockchip_pmu_info rk3368_pmu = { .pwr_offset = 0x0c, .status_offset = 0x10, @@ -495,6 +523,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = { .compatible = "rockchip,rk3288-power-controller", .data = (void *)&rk3288_pmu, }, + { + .compatible = "rockchip,rk3366-power-controller", + .data = (void *)&rk3366_pmu, + }, { .compatible = "rockchip,rk3368-power-controller", .data = (void *)&rk3368_pmu,