From: Johan Jonker <jbx6244@gmail.com>
To: heiko@sntech.de
Cc: robh+dt@kernel.org, zhangqing@rock-chips.com,
enric.balletbo@collabora.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v9 15/15] soc: rockchip: power-domain: add rk3568 powerdomains
Date: Sat, 17 Apr 2021 13:29:52 +0200 [thread overview]
Message-ID: <20210417112952.8516-16-jbx6244@gmail.com> (raw)
In-Reply-To: <20210417112952.8516-1-jbx6244@gmail.com>
From: Elaine Zhang <zhangqing@rock-chips.com>
Add power-domains found on rk3568 socs.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
Changed V7:
Fix alignment
---
drivers/soc/rockchip/pm_domains.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 1d1b06672..0868b7d40 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -27,6 +27,7 @@
#include <dt-bindings/power/rk3366-power.h>
#include <dt-bindings/power/rk3368-power.h>
#include <dt-bindings/power/rk3399-power.h>
+#include <dt-bindings/power/rk3568-power.h>
struct rockchip_domain_info {
const char *name;
@@ -135,6 +136,9 @@ struct rockchip_pmu {
#define DOMAIN_RK3399(name, pwr, status, req, wakeup) \
DOMAIN(name, pwr, status, req, req, req, wakeup)
+#define DOMAIN_RK3568(name, pwr, req, wakeup) \
+ DOMAIN_M(name, pwr, pwr, req, req, req, wakeup)
+
static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain *pd)
{
struct rockchip_pmu *pmu = pd->pmu;
@@ -848,6 +852,18 @@ static const struct rockchip_domain_info rk3399_pm_domains[] = {
[RK3399_PD_SDIOAUDIO] = DOMAIN_RK3399("sdioaudio", BIT(31), BIT(31), BIT(29), true),
};
+static const struct rockchip_domain_info rk3568_pm_domains[] = {
+ [RK3568_PD_NPU] = DOMAIN_RK3568("npu", BIT(1), BIT(2), false),
+ [RK3568_PD_GPU] = DOMAIN_RK3568("gpu", BIT(0), BIT(1), false),
+ [RK3568_PD_VI] = DOMAIN_RK3568("vi", BIT(6), BIT(3), false),
+ [RK3568_PD_VO] = DOMAIN_RK3568("vo", BIT(7), BIT(4), false),
+ [RK3568_PD_RGA] = DOMAIN_RK3568("rga", BIT(5), BIT(5), false),
+ [RK3568_PD_VPU] = DOMAIN_RK3568("vpu", BIT(2), BIT(6), false),
+ [RK3568_PD_RKVDEC] = DOMAIN_RK3568("vdec", BIT(4), BIT(8), false),
+ [RK3568_PD_RKVENC] = DOMAIN_RK3568("venc", BIT(3), BIT(7), false),
+ [RK3568_PD_PIPE] = DOMAIN_RK3568("pipe", BIT(8), BIT(11), false),
+};
+
static const struct rockchip_pmu_info px30_pmu = {
.pwr_offset = 0x18,
.status_offset = 0x20,
@@ -983,6 +999,17 @@ static const struct rockchip_pmu_info rk3399_pmu = {
.domain_info = rk3399_pm_domains,
};
+static const struct rockchip_pmu_info rk3568_pmu = {
+ .pwr_offset = 0xa0,
+ .status_offset = 0x98,
+ .req_offset = 0x50,
+ .idle_offset = 0x68,
+ .ack_offset = 0x60,
+
+ .num_domains = ARRAY_SIZE(rk3568_pm_domains),
+ .domain_info = rk3568_pm_domains,
+};
+
static const struct of_device_id rockchip_pm_domain_dt_match[] = {
{
.compatible = "rockchip,px30-power-controller",
@@ -1028,6 +1055,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = {
.compatible = "rockchip,rk3399-power-controller",
.data = (void *)&rk3399_pmu,
},
+ {
+ .compatible = "rockchip,rk3568-power-controller",
+ .data = (void *)&rk3568_pmu,
+ },
{ /* sentinel */ },
};
--
2.11.0
next prev parent reply other threads:[~2021-04-17 11:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-17 11:29 [PATCH v9 00/15] soc: rockchip: power-domain: add rk3568 powerdomains Johan Jonker
2021-04-17 11:29 ` [PATCH v9 01/15] ARM: dts: rockchip: Fix power-controller node names for rk3066a Johan Jonker
2021-04-17 11:29 ` [PATCH v9 02/15] ARM: dts: rockchip: Fix power-controller node names for rk3188 Johan Jonker
2021-04-17 11:29 ` [PATCH v9 03/15] ARM: dts: rockchip: Fix power-controller node names for rk3288 Johan Jonker
2021-04-17 11:29 ` [PATCH v9 04/15] ARM: dts: rockchip: add #power-domain-cells to power domain nodes Johan Jonker
2021-04-17 11:29 ` [PATCH v9 05/15] arm64: dts: rockchip: Fix power-controller node names for px30 Johan Jonker
2021-04-17 11:29 ` [PATCH v9 06/15] arm64: dts: rockchip: Fix power-controller node names for rk3328 Johan Jonker
2021-04-17 11:29 ` [PATCH v9 07/15] arm64: dts: rockchip: Fix power-controller node names for rk3399 Johan Jonker
2021-04-17 11:29 ` [PATCH v9 08/15] arm64: dts: rockchip: add #power-domain-cells to power domain nodes Johan Jonker
2021-04-17 11:29 ` [PATCH v9 09/15] soc: rockchip: pm-domains: Add a meaningful power domain name Johan Jonker
2021-04-17 11:29 ` [PATCH v9 10/15] dt-bindings: add power-domain header for RK3568 SoCs Johan Jonker
2021-04-17 11:29 ` [PATCH v9 11/15] dt-bindings: arm: rockchip: convert pmu.txt to YAML Johan Jonker
2021-04-17 11:29 ` [PATCH v9 12/15] dt-bindings: arm: rockchip: add more compatible strings to pmu.yaml Johan Jonker
2021-04-17 11:29 ` [PATCH v9 13/15] dt-bindings: power: rockchip: Convert to json-schema Johan Jonker
2021-04-20 15:05 ` Rob Herring
2021-04-17 11:29 ` [PATCH v9 14/15] dt-bindings: power: rockchip: Add bindings for RK3568 Soc Johan Jonker
2021-04-17 11:29 ` Johan Jonker [this message]
2021-05-10 14:56 ` [PATCH v9 00/15] soc: rockchip: power-domain: add rk3568 powerdomains 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=20210417112952.8516-16-jbx6244@gmail.com \
--to=jbx6244@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=enric.balletbo@collabora.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=zhangqing@rock-chips.com \
/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).