* [PATCH v3 0/2] rockchip: Add rk3562 power domain support @ 2025-02-27 10:59 ` Kever Yang 0 siblings, 0 replies; 14+ messages in thread From: Kever Yang @ 2025-02-27 10:59 UTC (permalink / raw) To: heiko Cc: linux-rockchip, Kever Yang, devicetree, Conor Dooley, Krzysztof Kozlowski, Finley Xiao, Rob Herring, Jonathan Cameron, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, linux-pm, Elaine Zhang, linux-arm-kernel, Ulf Hansson This patch set add power domain driver for a new SoC rk3562, the SoC DT will be sent as a separate patch set and the new compatible will be used in the DT. Changes in v3: - squash the header file and the binding document - Update license Changes in v2: - rename to rockchip,rk3562-power.h - update the subject - use dual license - update the header name Finley Xiao (1): dt-bindings: power: rockchip: Add support for RK3562 SoC Kever Yang (1): soc: rockchip: power-domain: add power domain support for rk3562 .../power/rockchip,power-controller.yaml | 1 + drivers/pmdomain/rockchip/pm-domains.c | 48 ++++++++++++++++++- .../dt-bindings/power/rockchip,rk3562-power.h | 35 ++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/power/rockchip,rk3562-power.h -- 2.25.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 0/2] rockchip: Add rk3562 power domain support @ 2025-02-27 10:59 ` Kever Yang 0 siblings, 0 replies; 14+ messages in thread From: Kever Yang @ 2025-02-27 10:59 UTC (permalink / raw) To: heiko Cc: linux-rockchip, Kever Yang, devicetree, Conor Dooley, Krzysztof Kozlowski, Finley Xiao, Rob Herring, Jonathan Cameron, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, linux-pm, Elaine Zhang, linux-arm-kernel, Ulf Hansson This patch set add power domain driver for a new SoC rk3562, the SoC DT will be sent as a separate patch set and the new compatible will be used in the DT. Changes in v3: - squash the header file and the binding document - Update license Changes in v2: - rename to rockchip,rk3562-power.h - update the subject - use dual license - update the header name Finley Xiao (1): dt-bindings: power: rockchip: Add support for RK3562 SoC Kever Yang (1): soc: rockchip: power-domain: add power domain support for rk3562 .../power/rockchip,power-controller.yaml | 1 + drivers/pmdomain/rockchip/pm-domains.c | 48 ++++++++++++++++++- .../dt-bindings/power/rockchip,rk3562-power.h | 35 ++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/power/rockchip,rk3562-power.h -- 2.25.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC 2025-02-27 10:59 ` Kever Yang @ 2025-02-27 10:59 ` Kever Yang -1 siblings, 0 replies; 14+ messages in thread From: Kever Yang @ 2025-02-27 10:59 UTC (permalink / raw) To: heiko Cc: linux-rockchip, Finley Xiao, Kever Yang, devicetree, Conor Dooley, Rob Herring, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, Elaine Zhang, linux-arm-kernel, Ulf Hansson From: Finley Xiao <finley.xiao@rock-chips.com> According to a description from TRM, add all the power domains. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> --- Changes in v3: - squash the header file and the binding document - Update license Changes in v2: - rename to rockchip,rk3562-power.h - update the subject - use dual license .../power/rockchip,power-controller.yaml | 1 + .../dt-bindings/power/rockchip,rk3562-power.h | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 include/dt-bindings/power/rockchip,rk3562-power.h diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml index 650dc0aae6f5..79b948518f0c 100644 --- a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml @@ -40,6 +40,7 @@ properties: - rockchip,rk3366-power-controller - rockchip,rk3368-power-controller - rockchip,rk3399-power-controller + - rockchip,rk3562-power-controller - rockchip,rk3568-power-controller - rockchip,rk3576-power-controller - rockchip,rk3588-power-controller diff --git a/include/dt-bindings/power/rockchip,rk3562-power.h b/include/dt-bindings/power/rockchip,rk3562-power.h new file mode 100644 index 000000000000..5182c2427a55 --- /dev/null +++ b/include/dt-bindings/power/rockchip,rk3562-power.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2022-2024 Rockchip Electronics Co., Ltd. + */ +#ifndef __DT_BINDINGS_POWER_RK3562_POWER_H__ +#define __DT_BINDINGS_POWER_RK3562_POWER_H__ + +/* VD_CORE */ +#define RK3562_PD_CPU_0 0 +#define RK3562_PD_CPU_1 1 +#define RK3562_PD_CPU_2 2 +#define RK3562_PD_CPU_3 3 +#define RK3562_PD_CORE_ALIVE 4 + +/* VD_PMU */ +#define RK3562_PD_PMU 5 +#define RK3562_PD_PMU_ALIVE 6 + +/* VD_NPU */ +#define RK3562_PD_NPU 7 + +/* VD_GPU */ +#define RK3562_PD_GPU 8 + +/* VD_LOGIC */ +#define RK3562_PD_DDR 9 +#define RK3562_PD_VEPU 10 +#define RK3562_PD_VDPU 11 +#define RK3562_PD_VI 12 +#define RK3562_PD_VO 13 +#define RK3562_PD_RGA 14 +#define RK3562_PD_PHP 15 +#define RK3562_PD_LOGIC_ALIVE 16 + +#endif -- 2.25.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC @ 2025-02-27 10:59 ` Kever Yang 0 siblings, 0 replies; 14+ messages in thread From: Kever Yang @ 2025-02-27 10:59 UTC (permalink / raw) To: heiko Cc: linux-rockchip, Finley Xiao, Kever Yang, devicetree, Conor Dooley, Rob Herring, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, Elaine Zhang, linux-arm-kernel, Ulf Hansson From: Finley Xiao <finley.xiao@rock-chips.com> According to a description from TRM, add all the power domains. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> --- Changes in v3: - squash the header file and the binding document - Update license Changes in v2: - rename to rockchip,rk3562-power.h - update the subject - use dual license .../power/rockchip,power-controller.yaml | 1 + .../dt-bindings/power/rockchip,rk3562-power.h | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 include/dt-bindings/power/rockchip,rk3562-power.h diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml index 650dc0aae6f5..79b948518f0c 100644 --- a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml @@ -40,6 +40,7 @@ properties: - rockchip,rk3366-power-controller - rockchip,rk3368-power-controller - rockchip,rk3399-power-controller + - rockchip,rk3562-power-controller - rockchip,rk3568-power-controller - rockchip,rk3576-power-controller - rockchip,rk3588-power-controller diff --git a/include/dt-bindings/power/rockchip,rk3562-power.h b/include/dt-bindings/power/rockchip,rk3562-power.h new file mode 100644 index 000000000000..5182c2427a55 --- /dev/null +++ b/include/dt-bindings/power/rockchip,rk3562-power.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2022-2024 Rockchip Electronics Co., Ltd. + */ +#ifndef __DT_BINDINGS_POWER_RK3562_POWER_H__ +#define __DT_BINDINGS_POWER_RK3562_POWER_H__ + +/* VD_CORE */ +#define RK3562_PD_CPU_0 0 +#define RK3562_PD_CPU_1 1 +#define RK3562_PD_CPU_2 2 +#define RK3562_PD_CPU_3 3 +#define RK3562_PD_CORE_ALIVE 4 + +/* VD_PMU */ +#define RK3562_PD_PMU 5 +#define RK3562_PD_PMU_ALIVE 6 + +/* VD_NPU */ +#define RK3562_PD_NPU 7 + +/* VD_GPU */ +#define RK3562_PD_GPU 8 + +/* VD_LOGIC */ +#define RK3562_PD_DDR 9 +#define RK3562_PD_VEPU 10 +#define RK3562_PD_VDPU 11 +#define RK3562_PD_VI 12 +#define RK3562_PD_VO 13 +#define RK3562_PD_RGA 14 +#define RK3562_PD_PHP 15 +#define RK3562_PD_LOGIC_ALIVE 16 + +#endif -- 2.25.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC 2025-02-27 10:59 ` Kever Yang @ 2025-02-27 13:14 ` Heiko Stübner -1 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2025-02-27 13:14 UTC (permalink / raw) To: Kever Yang Cc: linux-rockchip, Finley Xiao, Kever Yang, devicetree, Conor Dooley, Rob Herring, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, Elaine Zhang, linux-arm-kernel, Ulf Hansson Am Donnerstag, 27. Februar 2025, 11:59:56 MEZ schrieb Kever Yang: > From: Finley Xiao <finley.xiao@rock-chips.com> > > According to a description from TRM, add all the power domains. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> checked the defined power-domains against the TRM and they match Reviewed-by: Heiko Stuebner <heiko@sntech.de> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC @ 2025-02-27 13:14 ` Heiko Stübner 0 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2025-02-27 13:14 UTC (permalink / raw) To: Kever Yang Cc: linux-rockchip, Finley Xiao, Kever Yang, devicetree, Conor Dooley, Rob Herring, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, Elaine Zhang, linux-arm-kernel, Ulf Hansson Am Donnerstag, 27. Februar 2025, 11:59:56 MEZ schrieb Kever Yang: > From: Finley Xiao <finley.xiao@rock-chips.com> > > According to a description from TRM, add all the power domains. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> checked the defined power-domains against the TRM and they match Reviewed-by: Heiko Stuebner <heiko@sntech.de> _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC 2025-02-27 10:59 ` Kever Yang @ 2025-02-27 15:29 ` Krzysztof Kozlowski -1 siblings, 0 replies; 14+ messages in thread From: Krzysztof Kozlowski @ 2025-02-27 15:29 UTC (permalink / raw) To: Kever Yang, heiko Cc: linux-rockchip, Finley Xiao, devicetree, Conor Dooley, Rob Herring, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, Elaine Zhang, linux-arm-kernel, Ulf Hansson On 27/02/2025 11:59, Kever Yang wrote: > From: Finley Xiao <finley.xiao@rock-chips.com> > > According to a description from TRM, add all the power domains. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > --- > > Changes in v3: > - squash the header file and the binding document > - Update license > > Changes in v2: > - rename to rockchip,rk3562-power.h We usually expect filename matching compatible. Any particular reason to have different one? I don't see here links to previous versions and I cannot find it on lore, so not sure what feedback did you get at v1. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC @ 2025-02-27 15:29 ` Krzysztof Kozlowski 0 siblings, 0 replies; 14+ messages in thread From: Krzysztof Kozlowski @ 2025-02-27 15:29 UTC (permalink / raw) To: Kever Yang, heiko Cc: linux-rockchip, Finley Xiao, devicetree, Conor Dooley, Rob Herring, Detlev Casanova, linux-kernel, Krzysztof Kozlowski, Elaine Zhang, linux-arm-kernel, Ulf Hansson On 27/02/2025 11:59, Kever Yang wrote: > From: Finley Xiao <finley.xiao@rock-chips.com> > > According to a description from TRM, add all the power domains. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > --- > > Changes in v3: > - squash the header file and the binding document > - Update license > > Changes in v2: > - rename to rockchip,rk3562-power.h We usually expect filename matching compatible. Any particular reason to have different one? I don't see here links to previous versions and I cannot find it on lore, so not sure what feedback did you get at v1. Best regards, Krzysztof _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 2025-02-27 10:59 ` Kever Yang @ 2025-02-27 10:59 ` Kever Yang -1 siblings, 0 replies; 14+ messages in thread From: Kever Yang @ 2025-02-27 10:59 UTC (permalink / raw) To: heiko Cc: linux-rockchip, Kever Yang, Finley Xiao, Krzysztof Kozlowski, linux-pm, Jonathan Cameron, Detlev Casanova, linux-kernel, linux-arm-kernel, Ulf Hansson This driver is modified to support RK3562 SoC. Add support to ungate clk. Add support to shut down memory for rk3562. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> --- Changes in v3: None Changes in v2: - update the header name drivers/pmdomain/rockchip/pm-domains.c | 48 +++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c index cb0f93800138..d05ec0a009a0 100644 --- a/drivers/pmdomain/rockchip/pm-domains.c +++ b/drivers/pmdomain/rockchip/pm-domains.c @@ -2,7 +2,7 @@ /* * Rockchip Generic power domain support. * - * Copyright (c) 2015 ROCKCHIP, Co. Ltd. + * Copyright (c) 2015 Rockchip Electronics Co., Ltd. */ #include <linux/io.h> @@ -32,6 +32,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/rockchip,rk3562-power.h> #include <dt-bindings/power/rk3568-power.h> #include <dt-bindings/power/rockchip,rk3576-power.h> #include <dt-bindings/power/rk3588-power.h> @@ -129,6 +130,20 @@ struct rockchip_pmu { .active_wakeup = wakeup, \ } +#define DOMAIN_M_G_SD(_name, pwr, status, req, idle, ack, g_mask, mem, wakeup, keepon) \ +{ \ + .name = _name, \ + .pwr_w_mask = (pwr) << 16, \ + .pwr_mask = (pwr), \ + .status_mask = (status), \ + .req_w_mask = (req) << 16, \ + .req_mask = (req), \ + .idle_mask = (idle), \ + .ack_mask = (ack), \ + .clk_ungate_mask = (g_mask), \ + .active_wakeup = wakeup, \ +} + #define DOMAIN_M_O_R(_name, p_offset, pwr, status, m_offset, m_status, r_status, r_offset, req, idle, ack, wakeup) \ { \ .name = _name, \ @@ -194,6 +209,9 @@ struct rockchip_pmu { #define DOMAIN_RK3399(name, pwr, status, req, wakeup) \ DOMAIN(name, pwr, status, req, req, req, wakeup) +#define DOMAIN_RK3562(name, pwr, req, g_mask, mem, wakeup) \ + DOMAIN_M_G_SD(name, pwr, pwr, req, req, req, g_mask, mem, wakeup, false) + #define DOMAIN_RK3568(name, pwr, req, wakeup) \ DOMAIN_M(name, pwr, pwr, req, req, req, wakeup) @@ -1130,6 +1148,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 rk3562_pm_domains[] = { + /* name pwr req g_mask mem wakeup */ + [RK3562_PD_GPU] = DOMAIN_RK3562("gpu", BIT(0), BIT(1), BIT(1), 0, false), + [RK3562_PD_NPU] = DOMAIN_RK3562("npu", BIT(1), BIT(2), BIT(2), 0, false), + [RK3562_PD_VDPU] = DOMAIN_RK3562("vdpu", BIT(2), BIT(6), BIT(6), 0, false), + [RK3562_PD_VEPU] = DOMAIN_RK3562("vepu", BIT(3), BIT(7), BIT(7) | BIT(3), 0, false), + [RK3562_PD_RGA] = DOMAIN_RK3562("rga", BIT(4), BIT(5), BIT(5) | BIT(4), 0, false), + [RK3562_PD_VI] = DOMAIN_RK3562("vi", BIT(5), BIT(3), BIT(3), 0, false), + [RK3562_PD_VO] = DOMAIN_RK3562("vo", BIT(6), BIT(4), BIT(4), 16, false), + [RK3562_PD_PHP] = DOMAIN_RK3562("php", BIT(7), BIT(8), BIT(8), 0, false), +}; + 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), @@ -1331,6 +1361,18 @@ static const struct rockchip_pmu_info rk3399_pmu = { .domain_info = rk3399_pm_domains, }; +static const struct rockchip_pmu_info rk3562_pmu = { + .pwr_offset = 0x210, + .status_offset = 0x230, + .req_offset = 0x110, + .idle_offset = 0x128, + .ack_offset = 0x120, + .clk_ungate_offset = 0x140, + + .num_domains = ARRAY_SIZE(rk3562_pm_domains), + .domain_info = rk3562_pm_domains, +}; + static const struct rockchip_pmu_info rk3568_pmu = { .pwr_offset = 0xa0, .status_offset = 0x98, @@ -1429,6 +1471,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = { .compatible = "rockchip,rk3399-power-controller", .data = (void *)&rk3399_pmu, }, + { + .compatible = "rockchip,rk3562-power-controller", + .data = (void *)&rk3562_pmu, + }, { .compatible = "rockchip,rk3568-power-controller", .data = (void *)&rk3568_pmu, -- 2.25.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 @ 2025-02-27 10:59 ` Kever Yang 0 siblings, 0 replies; 14+ messages in thread From: Kever Yang @ 2025-02-27 10:59 UTC (permalink / raw) To: heiko Cc: linux-rockchip, Kever Yang, Finley Xiao, Krzysztof Kozlowski, linux-pm, Jonathan Cameron, Detlev Casanova, linux-kernel, linux-arm-kernel, Ulf Hansson This driver is modified to support RK3562 SoC. Add support to ungate clk. Add support to shut down memory for rk3562. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> --- Changes in v3: None Changes in v2: - update the header name drivers/pmdomain/rockchip/pm-domains.c | 48 +++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c index cb0f93800138..d05ec0a009a0 100644 --- a/drivers/pmdomain/rockchip/pm-domains.c +++ b/drivers/pmdomain/rockchip/pm-domains.c @@ -2,7 +2,7 @@ /* * Rockchip Generic power domain support. * - * Copyright (c) 2015 ROCKCHIP, Co. Ltd. + * Copyright (c) 2015 Rockchip Electronics Co., Ltd. */ #include <linux/io.h> @@ -32,6 +32,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/rockchip,rk3562-power.h> #include <dt-bindings/power/rk3568-power.h> #include <dt-bindings/power/rockchip,rk3576-power.h> #include <dt-bindings/power/rk3588-power.h> @@ -129,6 +130,20 @@ struct rockchip_pmu { .active_wakeup = wakeup, \ } +#define DOMAIN_M_G_SD(_name, pwr, status, req, idle, ack, g_mask, mem, wakeup, keepon) \ +{ \ + .name = _name, \ + .pwr_w_mask = (pwr) << 16, \ + .pwr_mask = (pwr), \ + .status_mask = (status), \ + .req_w_mask = (req) << 16, \ + .req_mask = (req), \ + .idle_mask = (idle), \ + .ack_mask = (ack), \ + .clk_ungate_mask = (g_mask), \ + .active_wakeup = wakeup, \ +} + #define DOMAIN_M_O_R(_name, p_offset, pwr, status, m_offset, m_status, r_status, r_offset, req, idle, ack, wakeup) \ { \ .name = _name, \ @@ -194,6 +209,9 @@ struct rockchip_pmu { #define DOMAIN_RK3399(name, pwr, status, req, wakeup) \ DOMAIN(name, pwr, status, req, req, req, wakeup) +#define DOMAIN_RK3562(name, pwr, req, g_mask, mem, wakeup) \ + DOMAIN_M_G_SD(name, pwr, pwr, req, req, req, g_mask, mem, wakeup, false) + #define DOMAIN_RK3568(name, pwr, req, wakeup) \ DOMAIN_M(name, pwr, pwr, req, req, req, wakeup) @@ -1130,6 +1148,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 rk3562_pm_domains[] = { + /* name pwr req g_mask mem wakeup */ + [RK3562_PD_GPU] = DOMAIN_RK3562("gpu", BIT(0), BIT(1), BIT(1), 0, false), + [RK3562_PD_NPU] = DOMAIN_RK3562("npu", BIT(1), BIT(2), BIT(2), 0, false), + [RK3562_PD_VDPU] = DOMAIN_RK3562("vdpu", BIT(2), BIT(6), BIT(6), 0, false), + [RK3562_PD_VEPU] = DOMAIN_RK3562("vepu", BIT(3), BIT(7), BIT(7) | BIT(3), 0, false), + [RK3562_PD_RGA] = DOMAIN_RK3562("rga", BIT(4), BIT(5), BIT(5) | BIT(4), 0, false), + [RK3562_PD_VI] = DOMAIN_RK3562("vi", BIT(5), BIT(3), BIT(3), 0, false), + [RK3562_PD_VO] = DOMAIN_RK3562("vo", BIT(6), BIT(4), BIT(4), 16, false), + [RK3562_PD_PHP] = DOMAIN_RK3562("php", BIT(7), BIT(8), BIT(8), 0, false), +}; + 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), @@ -1331,6 +1361,18 @@ static const struct rockchip_pmu_info rk3399_pmu = { .domain_info = rk3399_pm_domains, }; +static const struct rockchip_pmu_info rk3562_pmu = { + .pwr_offset = 0x210, + .status_offset = 0x230, + .req_offset = 0x110, + .idle_offset = 0x128, + .ack_offset = 0x120, + .clk_ungate_offset = 0x140, + + .num_domains = ARRAY_SIZE(rk3562_pm_domains), + .domain_info = rk3562_pm_domains, +}; + static const struct rockchip_pmu_info rk3568_pmu = { .pwr_offset = 0xa0, .status_offset = 0x98, @@ -1429,6 +1471,10 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = { .compatible = "rockchip,rk3399-power-controller", .data = (void *)&rk3399_pmu, }, + { + .compatible = "rockchip,rk3562-power-controller", + .data = (void *)&rk3562_pmu, + }, { .compatible = "rockchip,rk3568-power-controller", .data = (void *)&rk3568_pmu, -- 2.25.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 2025-02-27 10:59 ` Kever Yang @ 2025-02-27 13:18 ` Heiko Stübner -1 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2025-02-27 13:18 UTC (permalink / raw) To: Kever Yang Cc: linux-rockchip, Kever Yang, Finley Xiao, Krzysztof Kozlowski, linux-pm, Jonathan Cameron, Detlev Casanova, linux-kernel, linux-arm-kernel, Ulf Hansson Am Donnerstag, 27. Februar 2025, 11:59:57 MEZ schrieb Kever Yang: > This driver is modified to support RK3562 SoC. > Add support to ungate clk. > Add support to shut down memory for rk3562. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> After the move to the pmdomains subsystem patch subject should be pmdomain: rockchip: add power domain support for rk3562 with that change Reviewed-by: Heiko Stuebner <heiko@sntech.de> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 @ 2025-02-27 13:18 ` Heiko Stübner 0 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2025-02-27 13:18 UTC (permalink / raw) To: Kever Yang Cc: linux-rockchip, Kever Yang, Finley Xiao, Krzysztof Kozlowski, linux-pm, Jonathan Cameron, Detlev Casanova, linux-kernel, linux-arm-kernel, Ulf Hansson Am Donnerstag, 27. Februar 2025, 11:59:57 MEZ schrieb Kever Yang: > This driver is modified to support RK3562 SoC. > Add support to ungate clk. > Add support to shut down memory for rk3562. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> After the move to the pmdomains subsystem patch subject should be pmdomain: rockchip: add power domain support for rk3562 with that change Reviewed-by: Heiko Stuebner <heiko@sntech.de> _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 2025-02-27 10:59 ` Kever Yang @ 2025-02-27 13:19 ` Heiko Stübner -1 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2025-02-27 13:19 UTC (permalink / raw) To: Kever Yang Cc: linux-rockchip, Kever Yang, Finley Xiao, Krzysztof Kozlowski, linux-pm, Jonathan Cameron, Detlev Casanova, linux-kernel, linux-arm-kernel, Ulf Hansson Am Donnerstag, 27. Februar 2025, 11:59:57 MEZ schrieb Kever Yang: > This driver is modified to support RK3562 SoC. > Add support to ungate clk. > Add support to shut down memory for rk3562. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> forgot one thing, patch author doesn't match. You have a first Signed-off-by from Finley, so the patch author should be the same - similar to how the binding patch already is? Heiko ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 @ 2025-02-27 13:19 ` Heiko Stübner 0 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2025-02-27 13:19 UTC (permalink / raw) To: Kever Yang Cc: linux-rockchip, Kever Yang, Finley Xiao, Krzysztof Kozlowski, linux-pm, Jonathan Cameron, Detlev Casanova, linux-kernel, linux-arm-kernel, Ulf Hansson Am Donnerstag, 27. Februar 2025, 11:59:57 MEZ schrieb Kever Yang: > This driver is modified to support RK3562 SoC. > Add support to ungate clk. > Add support to shut down memory for rk3562. > > Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> forgot one thing, patch author doesn't match. You have a first Signed-off-by from Finley, so the patch author should be the same - similar to how the binding patch already is? Heiko _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-02-27 19:37 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-27 10:59 [PATCH v3 0/2] rockchip: Add rk3562 power domain support Kever Yang 2025-02-27 10:59 ` Kever Yang 2025-02-27 10:59 ` [PATCH v3 1/2] dt-bindings: power: rockchip: Add support for RK3562 SoC Kever Yang 2025-02-27 10:59 ` Kever Yang 2025-02-27 13:14 ` Heiko Stübner 2025-02-27 13:14 ` Heiko Stübner 2025-02-27 15:29 ` Krzysztof Kozlowski 2025-02-27 15:29 ` Krzysztof Kozlowski 2025-02-27 10:59 ` [PATCH v3 2/2] soc: rockchip: power-domain: add power domain support for rk3562 Kever Yang 2025-02-27 10:59 ` Kever Yang 2025-02-27 13:18 ` Heiko Stübner 2025-02-27 13:18 ` Heiko Stübner 2025-02-27 13:19 ` Heiko Stübner 2025-02-27 13:19 ` Heiko Stübner
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.