From: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: zhangqing <zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: Caesar Wang
<caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v3 2/3] soc: rockchip: power-domain: Modify power domain driver for rk3368
Date: Tue, 12 Jan 2016 09:57:31 +0800 [thread overview]
Message-ID: <56945D8B.9080302@gmail.com> (raw)
In-Reply-To: <5694BFE4.1070200-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
在 2016年01月12日 16:57, zhangqing 写道:
> hi Caesar Wang
>
> you need check the datasheet again.
> > The rk3368 datasheet:
> > PMU_PMU_BUS_IDLE_ST ----->ack_vio[8]----->ack status
> ----->idle_vio[24]----->idle status
> > PMU_PMU_BUS_IDLE_REQ ---->idle_req_vio[8]----->idle req
You are right from the new datasheet.
>
> On 01/11/2016 05:27 AM, Caesar Wang wrote:
>> Hi zhangqin,
>>
>> From my datasheet "Rockchip RK3368 TRM V2.0.pdf"
>> Maybe i'm missing something.
>>
>>
>> 在 2016年01月11日 18:36, zhangqing 写道:
>>> This driver is modified to support RK3368 SoC.
>>>
>>> Signed-off-by: zhangqing <zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>> ---
>>> drivers/soc/rockchip/pm_domains.c | 33
>>> +++++++++++++++++++++++++++++++++
>>> 1 file changed, 33 insertions(+)
>>>
>>> diff --git a/drivers/soc/rockchip/pm_domains.c
>>> b/drivers/soc/rockchip/pm_domains.c
>>> index 534c589..6cdffb1 100644
>>> --- a/drivers/soc/rockchip/pm_domains.c
>>> +++ b/drivers/soc/rockchip/pm_domains.c
>>> @@ -18,6 +18,7 @@
>>> #include <linux/regmap.h>
>>> #include <linux/mfd/syscon.h>
>>> #include <dt-bindings/power/rk3288-power.h>
>>> +#include <dt-bindings/power/rk3368-power.h>
>>> struct rockchip_domain_info {
>>> int pwr_mask;
>>> @@ -75,6 +76,9 @@ struct rockchip_pmu {
>>> #define DOMAIN_RK3288(pwr, status, req) \
>>> DOMAIN(pwr, status, req, req, (req) + 16)
>>> +#define DOMAIN_RK3368(pwr, status, req) \
>>> + DOMAIN(pwr, status, req, (req) + 16, req)
>>> +
>>
>> You should remove it, that's seem same with the rk3288.
>>
>> The rk3368 datasheet:
>> PMU_PMU_BUS_IDLE_ST ----->idle_vio[24]----->ack
>> PMU_PMU_BUS_IDLE_REQ ---->idle_req_vio[8]----->idle
>>
>>> static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain
>>> *pd)
>>> {
>>> struct rockchip_pmu *pmu = pd->pmu;
>>> @@ -444,6 +448,14 @@ static const struct rockchip_domain_info
>>> rk3288_pm_domains[] = {
>>> [RK3288_PD_GPU] = DOMAIN_RK3288(9, 9, 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),
>>> + [RK3368_PD_VIDEO] = DOMAIN_RK3368(14, 13, 7),
>>> + [RK3368_PD_GPU_0] = DOMAIN_RK3368(16, 15, 2),
>>> + [RK3368_PD_GPU_1] = DOMAIN_RK3368(17, 16, 2),
>>> +};
>>> +
>>> static const struct rockchip_pmu_info rk3288_pmu = {
>>> .pwr_offset = 0x08,
>>> .status_offset = 0x0c,
>>> @@ -461,11 +473,32 @@ static const struct rockchip_pmu_info rk3288_pmu
>>> = {
>>> .domain_info = rk3288_pm_domains,
>>> };
>>> +static const struct rockchip_pmu_info rk3368_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(rk3368_pm_domains),
>>> + .domain_info = rk3368_pm_domains,
>>> +};
>>> +
>>> static const struct of_device_id rockchip_pm_domain_dt_match[] = {
>>> {
>>> .compatible = "rockchip,rk3288-power-controller",
>>> .data = (void *)&rk3288_pmu,
>>> },
>>> + {
>>> + .compatible = "rockchip,rk3368-power-controller",
>>> + .data = (void *)&rk3368_pmu,
>>> + },
>>> { /* sentinel */ },
>>> };
>>>
>>> --
>>> Thanks,
>>> Caesar
>>
>>
>>
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
--
Thanks,
Caesar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-12 1:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 10:36 [PATCH v3 0/3] SoC: rockchip: support power domain for RK3368 zhangqing
[not found] ` <1452508600-3512-1-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-11 10:36 ` [PATCH v3 1/3] dt-bindings: add power-domain header for RK3368 SoCs zhangqing
[not found] ` <1452508600-3512-2-git-send-email-zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-12 2:03 ` Caesar Wang
2016-01-24 22:52 ` [PATCH v3 0/3] SoC: rockchip: support power domain for RK3368 Heiko Stübner
2016-01-11 10:36 ` [PATCH v3 2/3] soc: rockchip: power-domain: Modify power domain driver for rk3368 zhangqing
2016-01-11 13:27 ` Caesar Wang
[not found] ` <5693ADD1.4000207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-12 8:57 ` zhangqing
[not found] ` <5694BFE4.1070200-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-12 1:57 ` Caesar Wang [this message]
2016-01-12 2:00 ` Caesar Wang
2016-01-11 10:36 ` [PATCH v3 3/3] dt-bindings: modify document of Rockchip power domains zhangqing
2016-01-11 2:55 ` Rob Herring
2016-01-20 10:28 ` [PATCH v3 0/3] SoC: rockchip: support power domain for RK3368 zhangqing
[not found] ` <569F6135.1070902-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-20 8:26 ` Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56945D8B.9080302@gmail.com \
--to=caesar.upstream-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=zhangqing-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).