From: Jagan Teki <jagan@edgeble.ai>
To: Heiko Stuebner <heiko@sntech.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Kever Yang <kever.yang@rock-chips.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
Jagan Teki <jagan@edgeble.ai>,
Elaine Zhang <zhangqing@rock-chips.com>
Subject: [PATCH 03/22] soc: rockchip: power-domain: Add RV1126 power domains
Date: Sun, 24 Jul 2022 02:13:16 +0530 [thread overview]
Message-ID: <20220723204335.750095-4-jagan@edgeble.ai> (raw)
In-Reply-To: <20220723204335.750095-1-jagan@edgeble.ai>
Add power domains support for RV1126 SoC.
Cypto, VO and NPU domains will add it future patches.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
---
drivers/soc/rockchip/pm_domains.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 89795abac951..7b41cd19f013 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -19,6 +19,7 @@
#include <linux/mfd/syscon.h>
#include <soc/rockchip/pm_domains.h>
#include <dt-bindings/power/px30-power.h>
+#include <dt-bindings/power/rv1126-power.h>
#include <dt-bindings/power/rk3036-power.h>
#include <dt-bindings/power/rk3066-power.h>
#include <dt-bindings/power/rk3128-power.h>
@@ -126,6 +127,9 @@ struct rockchip_pmu {
#define DOMAIN_PX30(name, pwr, status, req, wakeup) \
DOMAIN_M(name, pwr, status, req, (req) << 16, req, wakeup)
+#define DOMAIN_RV1126(name, pwr, req, idle, wakeup) \
+ DOMAIN_M(name, pwr, pwr, req, idle, idle, wakeup)
+
#define DOMAIN_RK3288(name, pwr, status, req, wakeup) \
DOMAIN(name, pwr, status, req, req, (req) << 16, wakeup)
@@ -855,6 +859,16 @@ static const struct rockchip_domain_info px30_pm_domains[] = {
[PX30_PD_GPU] = DOMAIN_PX30("gpu", BIT(15), BIT(15), BIT(2), false),
};
+static const struct rockchip_domain_info rv1126_pm_domains[] = {
+ [RV1126_PD_VEPU] = DOMAIN_RV1126("vepu", BIT(2), BIT(9), BIT(9), false),
+ [RV1126_PD_VI] = DOMAIN_RV1126("vi", BIT(4), BIT(6), BIT(6), false),
+ [RV1126_PD_ISPP] = DOMAIN_RV1126("ispp", BIT(1), BIT(8), BIT(8), false),
+ [RV1126_PD_VDPU] = DOMAIN_RV1126("vdpu", BIT(3), BIT(10), BIT(10), false),
+ [RV1126_PD_NVM] = DOMAIN_RV1126("nvm", BIT(7), BIT(11), BIT(11), false),
+ [RV1126_PD_SDIO] = DOMAIN_RV1126("sdio", BIT(8), BIT(13), BIT(13), false),
+ [RV1126_PD_USB] = DOMAIN_RV1126("usb", BIT(9), BIT(15), BIT(15), false),
+};
+
static const struct rockchip_domain_info rk3036_pm_domains[] = {
[RK3036_PD_MSCH] = DOMAIN_RK3036("msch", BIT(14), BIT(23), BIT(30), true),
[RK3036_PD_CORE] = DOMAIN_RK3036("core", BIT(13), BIT(17), BIT(24), false),
@@ -1128,6 +1142,17 @@ static const struct rockchip_pmu_info rk3568_pmu = {
.domain_info = rk3568_pm_domains,
};
+static const struct rockchip_pmu_info rv1126_pmu = {
+ .pwr_offset = 0x110,
+ .status_offset = 0x108,
+ .req_offset = 0xc0,
+ .idle_offset = 0xd8,
+ .ack_offset = 0xd0,
+
+ .num_domains = ARRAY_SIZE(rv1126_pm_domains),
+ .domain_info = rv1126_pm_domains,
+};
+
static const struct of_device_id rockchip_pm_domain_dt_match[] = {
{
.compatible = "rockchip,px30-power-controller",
@@ -1177,6 +1202,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = {
.compatible = "rockchip,rk3568-power-controller",
.data = (void *)&rk3568_pmu,
},
+ {
+ .compatible = "rockchip,rv1126-power-controller",
+ .data = (void *)&rv1126_pmu,
+ },
{ /* sentinel */ },
};
--
2.25.1
next prev parent reply other threads:[~2022-07-23 20:44 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 20:43 [PATCH 00/22] ARM: Add Rockchip RV1126 support Jagan Teki
2022-07-23 20:43 ` [PATCH 01/22] dt-bindings: power: rockchip: Document RV1126 power-controller Jagan Teki
2022-07-23 20:57 ` Krzysztof Kozlowski
2022-07-23 20:43 ` [PATCH 02/22] dt-bindings: power: Add power-domain header for RV1126 Jagan Teki
2022-07-23 20:58 ` Krzysztof Kozlowski
2022-07-26 13:44 ` Jagan Teki
2022-07-26 13:52 ` Krzysztof Kozlowski
2022-07-27 6:52 ` Jagan Teki
2022-07-27 7:01 ` Krzysztof Kozlowski
2022-07-27 7:09 ` Jagan Teki
2022-07-27 7:15 ` Krzysztof Kozlowski
2022-07-27 7:31 ` Jagan Teki
2022-07-23 20:43 ` Jagan Teki [this message]
2022-07-23 20:43 ` [PATCH 04/22] dt-bindings: power: rockchip: Document RV1126 PMU IO domains Jagan Teki
2022-07-23 20:59 ` Krzysztof Kozlowski
2022-07-23 20:43 ` [PATCH 05/22] soc: rockchip: io-domain: Add RV1126 " Jagan Teki
2022-07-23 20:43 ` [PATCH 06/22] dt-bindings: pinctrl: rockchip: Document RV1126 pinctrl Jagan Teki
2022-07-23 20:59 ` Krzysztof Kozlowski
2022-07-23 20:43 ` [PATCH 07/22] pinctrl: rockchip: Add RV1126 pinctrl support Jagan Teki
2022-07-23 20:43 ` [PATCH 08/22] clk: rockchip: Add MUXTBL variant Jagan Teki
2022-07-23 20:43 ` [PATCH 09/22] dt-bindings: clock: rockchip: Document RV1126 CRU Jagan Teki
2022-07-23 21:01 ` Krzysztof Kozlowski
2022-07-23 20:43 ` [PATCH 10/22] clk: rockchip: Add RV1126 clock controller Jagan Teki
2022-07-25 1:31 ` kernel test robot
2022-07-25 23:25 ` Rob Herring
2022-07-23 20:43 ` [PATCH 11/22] dt-bindings: mmc: rockchip-dw-mshc: Document Rockchip RV1126 Jagan Teki
2022-07-25 23:25 ` Rob Herring
2022-07-26 15:00 ` Ulf Hansson
2022-07-23 20:43 ` [PATCH 12/22] dt-bindings: serial: snps-dw-apb-uart: " Jagan Teki
2022-07-25 23:26 ` Rob Herring
2022-07-23 20:43 ` [PATCH 13/22] dt-bindings: i2c: i2c-rk3x: " Jagan Teki
2022-07-25 23:26 ` Rob Herring
2022-07-26 21:10 ` Wolfram Sang
2022-07-23 20:43 ` [PATCH 14/22] dt-bindings: soc: rockchip: Document RV1126 grf Jagan Teki
2022-07-25 23:26 ` Rob Herring
2022-07-23 20:43 ` [PATCH 15/22] dt-bindings: soc: rockchip: Document RV1126 pmugrf Jagan Teki
2022-07-25 23:26 ` Rob Herring
2022-07-23 20:43 ` [PATCH 16/22] dt-bindings: mfd: syscon: Add Rockchip RV1126 QoS register Jagan Teki
2022-07-25 23:26 ` Rob Herring
2022-08-08 15:24 ` Lee Jones
2022-07-23 20:43 ` [PATCH 17/22] ARM: dts: rockchip: Add Rockchip RV1126 SoC Jagan Teki
2022-07-23 20:43 ` [PATCH 18/22] dt-bindings: vendor-prefixes: Add Edgeble AI Technologies Pvt. Ltd Jagan Teki
2022-07-25 23:27 ` Rob Herring
2022-07-23 20:43 ` [PATCH 19/22] dt-bindings: arm: rockchip: Add Edgeble AI Edge Compute Module 0 Carrier Jagan Teki
2022-07-25 23:27 ` Rob Herring
2022-07-23 20:43 ` [PATCH 20/22] ARM: dts: rockchip: rv1126: Add Edgeble AI Edge Compute Module 0 Jagan Teki
2022-07-23 20:43 ` [PATCH 21/22] ARM: dts: rockchip: rv1126: Add Edgeble AI Edge Compute Module 0 Carrier Jagan Teki
2022-07-23 20:43 ` [PATCH 22/22] ARM: configs: Add RV1126 ECM0 fragment config Jagan Teki
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=20220723204335.750095-4-jagan@edgeble.ai \
--to=jagan@edgeble.ai \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=kever.yang@rock-chips.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).