* [PATCH v3 0/3] soc: rockchip: power-domain: add rk3568 powerdomains
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
Support power domain function for RK3568 Soc.
Change in V3:
[PATCH v3 1/3]: No change.
[PATCH v3 2/3]: Fix up the code styles and add rk3568 base on:
https://patchwork.kernel.org/project/linux-rockchip/patch/20210225102643.653095-1-enric.balletbo@collabora.com/
[PATCH v3 3/3]: No change.
Change in V2:
[PATCH v2 1/3]: No change.
[PATCH v2 2/3]: Fix up yaml code styles.
[PATCH v2 3/3]: No change.
Elaine Zhang (3):
dt-bindings: add power-domain header for RK3568 SoCs
dt-bindings: Convert the rockchip power_domain to YAML and extend
soc: rockchip: power-domain: add rk3568 powerdomains
.../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
.../bindings/soc/rockchip/power_domain.txt | 136 ---------
drivers/soc/rockchip/pm_domains.c | 31 ++
include/dt-bindings/power/rk3568-power.h | 32 ++
4 files changed, 349 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
create mode 100644 include/dt-bindings/power/rk3568-power.h
--
2.17.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 0/3] soc: rockchip: power-domain: add rk3568 powerdomains
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
Support power domain function for RK3568 Soc.
Change in V3:
[PATCH v3 1/3]: No change.
[PATCH v3 2/3]: Fix up the code styles and add rk3568 base on:
https://patchwork.kernel.org/project/linux-rockchip/patch/20210225102643.653095-1-enric.balletbo@collabora.com/
[PATCH v3 3/3]: No change.
Change in V2:
[PATCH v2 1/3]: No change.
[PATCH v2 2/3]: Fix up yaml code styles.
[PATCH v2 3/3]: No change.
Elaine Zhang (3):
dt-bindings: add power-domain header for RK3568 SoCs
dt-bindings: Convert the rockchip power_domain to YAML and extend
soc: rockchip: power-domain: add rk3568 powerdomains
.../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
.../bindings/soc/rockchip/power_domain.txt | 136 ---------
drivers/soc/rockchip/pm_domains.c | 31 ++
include/dt-bindings/power/rk3568-power.h | 32 ++
4 files changed, 349 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
create mode 100644 include/dt-bindings/power/rk3568-power.h
--
2.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 0/3] soc: rockchip: power-domain: add rk3568 powerdomains
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
Support power domain function for RK3568 Soc.
Change in V3:
[PATCH v3 1/3]: No change.
[PATCH v3 2/3]: Fix up the code styles and add rk3568 base on:
https://patchwork.kernel.org/project/linux-rockchip/patch/20210225102643.653095-1-enric.balletbo@collabora.com/
[PATCH v3 3/3]: No change.
Change in V2:
[PATCH v2 1/3]: No change.
[PATCH v2 2/3]: Fix up yaml code styles.
[PATCH v2 3/3]: No change.
Elaine Zhang (3):
dt-bindings: add power-domain header for RK3568 SoCs
dt-bindings: Convert the rockchip power_domain to YAML and extend
soc: rockchip: power-domain: add rk3568 powerdomains
.../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
.../bindings/soc/rockchip/power_domain.txt | 136 ---------
drivers/soc/rockchip/pm_domains.c | 31 ++
include/dt-bindings/power/rk3568-power.h | 32 ++
4 files changed, 349 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
create mode 100644 include/dt-bindings/power/rk3568-power.h
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v3 1/3] dt-bindings: add power-domain header for RK3568 SoCs
2021-03-24 3:23 ` Elaine Zhang
(?)
@ 2021-03-24 3:23 ` Elaine Zhang
-1 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
According to a description from TRM, add all the power domains
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
include/dt-bindings/power/rk3568-power.h | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 include/dt-bindings/power/rk3568-power.h
diff --git a/include/dt-bindings/power/rk3568-power.h b/include/dt-bindings/power/rk3568-power.h
new file mode 100644
index 000000000000..6cc1af1a9d26
--- /dev/null
+++ b/include/dt-bindings/power/rk3568-power.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_POWER_RK3568_POWER_H__
+#define __DT_BINDINGS_POWER_RK3568_POWER_H__
+
+/* VD_CORE */
+#define RK3568_PD_CPU_0 0
+#define RK3568_PD_CPU_1 1
+#define RK3568_PD_CPU_2 2
+#define RK3568_PD_CPU_3 3
+#define RK3568_PD_CORE_ALIVE 4
+
+/* VD_PMU */
+#define RK3568_PD_PMU 5
+
+/* VD_NPU */
+#define RK3568_PD_NPU 6
+
+/* VD_GPU */
+#define RK3568_PD_GPU 7
+
+/* VD_LOGIC */
+#define RK3568_PD_VI 8
+#define RK3568_PD_VO 9
+#define RK3568_PD_RGA 10
+#define RK3568_PD_VPU 11
+#define RK3568_PD_CENTER 12
+#define RK3568_PD_RKVDEC 13
+#define RK3568_PD_RKVENC 14
+#define RK3568_PD_PIPE 15
+#define RK3568_PD_LOGIC_ALIVE 16
+
+#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 1/3] dt-bindings: add power-domain header for RK3568 SoCs
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
According to a description from TRM, add all the power domains
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
include/dt-bindings/power/rk3568-power.h | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 include/dt-bindings/power/rk3568-power.h
diff --git a/include/dt-bindings/power/rk3568-power.h b/include/dt-bindings/power/rk3568-power.h
new file mode 100644
index 000000000000..6cc1af1a9d26
--- /dev/null
+++ b/include/dt-bindings/power/rk3568-power.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_POWER_RK3568_POWER_H__
+#define __DT_BINDINGS_POWER_RK3568_POWER_H__
+
+/* VD_CORE */
+#define RK3568_PD_CPU_0 0
+#define RK3568_PD_CPU_1 1
+#define RK3568_PD_CPU_2 2
+#define RK3568_PD_CPU_3 3
+#define RK3568_PD_CORE_ALIVE 4
+
+/* VD_PMU */
+#define RK3568_PD_PMU 5
+
+/* VD_NPU */
+#define RK3568_PD_NPU 6
+
+/* VD_GPU */
+#define RK3568_PD_GPU 7
+
+/* VD_LOGIC */
+#define RK3568_PD_VI 8
+#define RK3568_PD_VO 9
+#define RK3568_PD_RGA 10
+#define RK3568_PD_VPU 11
+#define RK3568_PD_CENTER 12
+#define RK3568_PD_RKVDEC 13
+#define RK3568_PD_RKVENC 14
+#define RK3568_PD_PIPE 15
+#define RK3568_PD_LOGIC_ALIVE 16
+
+#endif
--
2.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 1/3] dt-bindings: add power-domain header for RK3568 SoCs
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
According to a description from TRM, add all the power domains
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
include/dt-bindings/power/rk3568-power.h | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 include/dt-bindings/power/rk3568-power.h
diff --git a/include/dt-bindings/power/rk3568-power.h b/include/dt-bindings/power/rk3568-power.h
new file mode 100644
index 000000000000..6cc1af1a9d26
--- /dev/null
+++ b/include/dt-bindings/power/rk3568-power.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_POWER_RK3568_POWER_H__
+#define __DT_BINDINGS_POWER_RK3568_POWER_H__
+
+/* VD_CORE */
+#define RK3568_PD_CPU_0 0
+#define RK3568_PD_CPU_1 1
+#define RK3568_PD_CPU_2 2
+#define RK3568_PD_CPU_3 3
+#define RK3568_PD_CORE_ALIVE 4
+
+/* VD_PMU */
+#define RK3568_PD_PMU 5
+
+/* VD_NPU */
+#define RK3568_PD_NPU 6
+
+/* VD_GPU */
+#define RK3568_PD_GPU 7
+
+/* VD_LOGIC */
+#define RK3568_PD_VI 8
+#define RK3568_PD_VO 9
+#define RK3568_PD_RGA 10
+#define RK3568_PD_VPU 11
+#define RK3568_PD_CENTER 12
+#define RK3568_PD_RKVDEC 13
+#define RK3568_PD_RKVENC 14
+#define RK3568_PD_PIPE 15
+#define RK3568_PD_LOGIC_ALIVE 16
+
+#endif
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend
2021-03-24 3:23 ` Elaine Zhang
(?)
@ 2021-03-24 3:23 ` Elaine Zhang
-1 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang,
Enric Balletbo i Serra
Convert the soc/rockchip/power_domain.txt binding document to
json-schema and move to the power bindings directory.
Add RK3568 SoCs for rockchip power binding document.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
.../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
.../bindings/soc/rockchip/power_domain.txt | 136 ---------
2 files changed, 286 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
new file mode 100644
index 000000000000..0d6b8962d098
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
@@ -0,0 +1,286 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Power Domains
+
+maintainers:
+ - Elaine Zhang <zhangqing@rock-chips.com>
+ - Rob Herring <robh+dt@kernel.org>
+ - Heiko Stuebner <heiko@sntech.de>
+
+description: |
+ Rockchip processors include support for multiple power domains which can be
+ powered up/down by software based on different application scenes to save power.
+
+ Power domains contained within power-controller node are generic power domain
+ providers documented in Documentation/devicetree/bindings/power/power-domain.yaml.
+
+ IP cores belonging to a power domain should contain a 'power-domains'
+ property that is a phandle for the power domain node representing the domain.
+
+properties:
+ $nodename:
+ const: power-controller
+
+ compatible:
+ enum:
+ - rockchip,px30-power-controller
+ - rockchip,rk3036-power-controller
+ - rockchip,rk3066-power-controller
+ - rockchip,rk3128-power-controller
+ - rockchip,rk3188-power-controller
+ - rockchip,rk3228-power-controller
+ - rockchip,rk3288-power-controller
+ - rockchip,rk3328-power-controller
+ - rockchip,rk3366-power-controller
+ - rockchip,rk3368-power-controller
+ - rockchip,rk3399-power-controller
+ - rockchip,rk3568-power-controller
+
+ '#power-domain-cells':
+ const: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents the power domains within the power controller node as documented
+ in Documentation/devicetree/bindings/power/power-domain.yaml.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+ description: |
+ Power domain index. Valid values are defined in:
+ "include/dt-bindings/power/px30-power.h"
+ "include/dt-bindings/power/rk3036-power.h"
+ "include/dt-bindings/power/rk3066-power.h"
+ "include/dt-bindings/power/rk3128-power.h"
+ "include/dt-bindings/power/rk3188-power.h"
+ "include/dt-bindings/power/rk3228-power.h"
+ "include/dt-bindings/power/rk3288-power.h"
+ "include/dt-bindings/power/rk3328-power.h"
+ "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/rk3399-power.h"
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents a power domain child within a power domain parent node.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents a power domain child within a power domain parent node.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/rk3399-cru.h>
+ #include <dt-bindings/power/rk3399-power.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ qos_hdcp: qos@ffa90000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffa90000 0x0 0x20>;
+ };
+
+ qos_iep: qos@ffa98000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffa98000 0x0 0x20>;
+ };
+
+ qos_rga_r: qos@ffab0000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab0000 0x0 0x20>;
+ };
+
+ qos_rga_w: qos@ffab0080 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab0080 0x0 0x20>;
+ };
+
+ qos_video_m0: qos@ffab8000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab8000 0x0 0x20>;
+ };
+
+ qos_video_m1_r: qos@ffac0000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffac0000 0x0 0x20>;
+ };
+
+ qos_video_m1_w: qos@ffac0080 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffac0080 0x0 0x20>;
+ };
+
+ power-management@ff310000 {
+ compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
+ reg = <0x0 0xff310000 0x0 0x1000>;
+
+ power-controller {
+ compatible = "rockchip,rk3399-power-controller";
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* These power domains are grouped by VD_CENTER */
+ pd_iep@RK3399_PD_IEP {
+ reg = <RK3399_PD_IEP>;
+ clocks = <&cru ACLK_IEP>,
+ <&cru HCLK_IEP>;
+ pm_qos = <&qos_iep>;
+ #power-domain-cells = <0>;
+ };
+ pd_rga@RK3399_PD_RGA {
+ reg = <RK3399_PD_RGA>;
+ clocks = <&cru ACLK_RGA>,
+ <&cru HCLK_RGA>;
+ pm_qos = <&qos_rga_r>,
+ <&qos_rga_w>;
+ #power-domain-cells = <0>;
+ };
+ pd_vcodec@RK3399_PD_VCODEC {
+ reg = <RK3399_PD_VCODEC>;
+ clocks = <&cru ACLK_VCODEC>,
+ <&cru HCLK_VCODEC>;
+ pm_qos = <&qos_video_m0>;
+ #power-domain-cells = <0>;
+ };
+ pd_vdu@RK3399_PD_VDU {
+ reg = <RK3399_PD_VDU>;
+ clocks = <&cru ACLK_VDU>,
+ <&cru HCLK_VDU>;
+ pm_qos = <&qos_video_m1_r>,
+ <&qos_video_m1_w>;
+ #power-domain-cells = <0>;
+ };
+ pd_vio@RK3399_PD_VIO {
+ reg = <RK3399_PD_VIO>;
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pd_hdcp@RK3399_PD_HDCP {
+ reg = <RK3399_PD_HDCP>;
+ clocks = <&cru ACLK_HDCP>,
+ <&cru HCLK_HDCP>,
+ <&cru PCLK_HDCP>;
+ pm_qos = <&qos_hdcp>;
+ #power-domain-cells = <0>;
+ };
+ };
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
deleted file mode 100644
index 8304eceb62e4..000000000000
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ /dev/null
@@ -1,136 +0,0 @@
-* Rockchip Power Domains
-
-Rockchip processors include support for multiple power domains which can be
-powered up/down by software based on different application scenes to save power.
-
-Required properties for power domain controller:
-- compatible: Should be one of the following.
- "rockchip,px30-power-controller" - for PX30 SoCs.
- "rockchip,rk3036-power-controller" - for RK3036 SoCs.
- "rockchip,rk3066-power-controller" - for RK3066 SoCs.
- "rockchip,rk3128-power-controller" - for RK3128 SoCs.
- "rockchip,rk3188-power-controller" - for RK3188 SoCs.
- "rockchip,rk3228-power-controller" - for RK3228 SoCs.
- "rockchip,rk3288-power-controller" - for RK3288 SoCs.
- "rockchip,rk3328-power-controller" - for RK3328 SoCs.
- "rockchip,rk3366-power-controller" - for RK3366 SoCs.
- "rockchip,rk3368-power-controller" - for RK3368 SoCs.
- "rockchip,rk3399-power-controller" - for RK3399 SoCs.
-- #power-domain-cells: Number of cells in a power-domain specifier.
- Should be 1 for multiple PM domains.
-- #address-cells: Should be 1.
-- #size-cells: Should be 0.
-
-Required properties for power domain sub nodes:
-- reg: index of the power domain, should use macros in:
- "include/dt-bindings/power/px30-power.h" - for PX30 type power domain.
- "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain.
- "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain.
- "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain.
- "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
- "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
- "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
- "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain.
- "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
- "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
-- clocks (optional): phandles to clocks which need to be enabled while power domain
- switches state.
-- pm_qos (optional): phandles to qos blocks which need to be saved and restored
- while power domain switches state.
-
-Qos Example:
-
- qos_gpu: qos_gpu@ffaf0000 {
- compatible ="syscon";
- reg = <0x0 0xffaf0000 0x0 0x20>;
- };
-
-Example:
-
- power: power-controller {
- compatible = "rockchip,rk3288-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_gpu {
- reg = <RK3288_PD_GPU>;
- clocks = <&cru ACLK_GPU>;
- pm_qos = <&qos_gpu>;
- };
- };
-
- power: power-controller {
- compatible = "rockchip,rk3368-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_gpu_1 {
- reg = <RK3368_PD_GPU_1>;
- clocks = <&cru ACLK_GPU_CFG>;
- };
- };
-
-Example 2:
- power: power-controller {
- compatible = "rockchip,rk3399-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_vio {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <RK3399_PD_VIO>;
-
- pd_vo {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <RK3399_PD_VO>;
-
- pd_vopb {
- reg = <RK3399_PD_VOPB>;
- };
-
- pd_vopl {
- reg = <RK3399_PD_VOPL>;
- };
- };
- };
- };
-
-Node of a device using power domains must have a power-domains property,
-containing a phandle to the power device node and an index specifying which
-power domain to use.
-The index should use macros in:
- "include/dt-bindings/power/px30-power.h" - for px30 type power domain.
- "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain.
- "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
- "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
- "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain.
- "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
- "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.
-
-Example of the node using power domain:
-
- node {
- /* ... */
- power-domains = <&power RK3288_PD_GPU>;
- /* ... */
- };
-
- node {
- /* ... */
- power-domains = <&power RK3368_PD_GPU_1>;
- /* ... */
- };
-
- node {
- /* ... */
- power-domains = <&power RK3399_PD_VOPB>;
- /* ... */
- };
--
2.17.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang,
Enric Balletbo i Serra
Convert the soc/rockchip/power_domain.txt binding document to
json-schema and move to the power bindings directory.
Add RK3568 SoCs for rockchip power binding document.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
.../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
.../bindings/soc/rockchip/power_domain.txt | 136 ---------
2 files changed, 286 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
new file mode 100644
index 000000000000..0d6b8962d098
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
@@ -0,0 +1,286 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Power Domains
+
+maintainers:
+ - Elaine Zhang <zhangqing@rock-chips.com>
+ - Rob Herring <robh+dt@kernel.org>
+ - Heiko Stuebner <heiko@sntech.de>
+
+description: |
+ Rockchip processors include support for multiple power domains which can be
+ powered up/down by software based on different application scenes to save power.
+
+ Power domains contained within power-controller node are generic power domain
+ providers documented in Documentation/devicetree/bindings/power/power-domain.yaml.
+
+ IP cores belonging to a power domain should contain a 'power-domains'
+ property that is a phandle for the power domain node representing the domain.
+
+properties:
+ $nodename:
+ const: power-controller
+
+ compatible:
+ enum:
+ - rockchip,px30-power-controller
+ - rockchip,rk3036-power-controller
+ - rockchip,rk3066-power-controller
+ - rockchip,rk3128-power-controller
+ - rockchip,rk3188-power-controller
+ - rockchip,rk3228-power-controller
+ - rockchip,rk3288-power-controller
+ - rockchip,rk3328-power-controller
+ - rockchip,rk3366-power-controller
+ - rockchip,rk3368-power-controller
+ - rockchip,rk3399-power-controller
+ - rockchip,rk3568-power-controller
+
+ '#power-domain-cells':
+ const: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents the power domains within the power controller node as documented
+ in Documentation/devicetree/bindings/power/power-domain.yaml.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+ description: |
+ Power domain index. Valid values are defined in:
+ "include/dt-bindings/power/px30-power.h"
+ "include/dt-bindings/power/rk3036-power.h"
+ "include/dt-bindings/power/rk3066-power.h"
+ "include/dt-bindings/power/rk3128-power.h"
+ "include/dt-bindings/power/rk3188-power.h"
+ "include/dt-bindings/power/rk3228-power.h"
+ "include/dt-bindings/power/rk3288-power.h"
+ "include/dt-bindings/power/rk3328-power.h"
+ "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/rk3399-power.h"
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents a power domain child within a power domain parent node.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents a power domain child within a power domain parent node.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/rk3399-cru.h>
+ #include <dt-bindings/power/rk3399-power.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ qos_hdcp: qos@ffa90000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffa90000 0x0 0x20>;
+ };
+
+ qos_iep: qos@ffa98000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffa98000 0x0 0x20>;
+ };
+
+ qos_rga_r: qos@ffab0000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab0000 0x0 0x20>;
+ };
+
+ qos_rga_w: qos@ffab0080 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab0080 0x0 0x20>;
+ };
+
+ qos_video_m0: qos@ffab8000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab8000 0x0 0x20>;
+ };
+
+ qos_video_m1_r: qos@ffac0000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffac0000 0x0 0x20>;
+ };
+
+ qos_video_m1_w: qos@ffac0080 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffac0080 0x0 0x20>;
+ };
+
+ power-management@ff310000 {
+ compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
+ reg = <0x0 0xff310000 0x0 0x1000>;
+
+ power-controller {
+ compatible = "rockchip,rk3399-power-controller";
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* These power domains are grouped by VD_CENTER */
+ pd_iep@RK3399_PD_IEP {
+ reg = <RK3399_PD_IEP>;
+ clocks = <&cru ACLK_IEP>,
+ <&cru HCLK_IEP>;
+ pm_qos = <&qos_iep>;
+ #power-domain-cells = <0>;
+ };
+ pd_rga@RK3399_PD_RGA {
+ reg = <RK3399_PD_RGA>;
+ clocks = <&cru ACLK_RGA>,
+ <&cru HCLK_RGA>;
+ pm_qos = <&qos_rga_r>,
+ <&qos_rga_w>;
+ #power-domain-cells = <0>;
+ };
+ pd_vcodec@RK3399_PD_VCODEC {
+ reg = <RK3399_PD_VCODEC>;
+ clocks = <&cru ACLK_VCODEC>,
+ <&cru HCLK_VCODEC>;
+ pm_qos = <&qos_video_m0>;
+ #power-domain-cells = <0>;
+ };
+ pd_vdu@RK3399_PD_VDU {
+ reg = <RK3399_PD_VDU>;
+ clocks = <&cru ACLK_VDU>,
+ <&cru HCLK_VDU>;
+ pm_qos = <&qos_video_m1_r>,
+ <&qos_video_m1_w>;
+ #power-domain-cells = <0>;
+ };
+ pd_vio@RK3399_PD_VIO {
+ reg = <RK3399_PD_VIO>;
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pd_hdcp@RK3399_PD_HDCP {
+ reg = <RK3399_PD_HDCP>;
+ clocks = <&cru ACLK_HDCP>,
+ <&cru HCLK_HDCP>,
+ <&cru PCLK_HDCP>;
+ pm_qos = <&qos_hdcp>;
+ #power-domain-cells = <0>;
+ };
+ };
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
deleted file mode 100644
index 8304eceb62e4..000000000000
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ /dev/null
@@ -1,136 +0,0 @@
-* Rockchip Power Domains
-
-Rockchip processors include support for multiple power domains which can be
-powered up/down by software based on different application scenes to save power.
-
-Required properties for power domain controller:
-- compatible: Should be one of the following.
- "rockchip,px30-power-controller" - for PX30 SoCs.
- "rockchip,rk3036-power-controller" - for RK3036 SoCs.
- "rockchip,rk3066-power-controller" - for RK3066 SoCs.
- "rockchip,rk3128-power-controller" - for RK3128 SoCs.
- "rockchip,rk3188-power-controller" - for RK3188 SoCs.
- "rockchip,rk3228-power-controller" - for RK3228 SoCs.
- "rockchip,rk3288-power-controller" - for RK3288 SoCs.
- "rockchip,rk3328-power-controller" - for RK3328 SoCs.
- "rockchip,rk3366-power-controller" - for RK3366 SoCs.
- "rockchip,rk3368-power-controller" - for RK3368 SoCs.
- "rockchip,rk3399-power-controller" - for RK3399 SoCs.
-- #power-domain-cells: Number of cells in a power-domain specifier.
- Should be 1 for multiple PM domains.
-- #address-cells: Should be 1.
-- #size-cells: Should be 0.
-
-Required properties for power domain sub nodes:
-- reg: index of the power domain, should use macros in:
- "include/dt-bindings/power/px30-power.h" - for PX30 type power domain.
- "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain.
- "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain.
- "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain.
- "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
- "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
- "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
- "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain.
- "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
- "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
-- clocks (optional): phandles to clocks which need to be enabled while power domain
- switches state.
-- pm_qos (optional): phandles to qos blocks which need to be saved and restored
- while power domain switches state.
-
-Qos Example:
-
- qos_gpu: qos_gpu@ffaf0000 {
- compatible ="syscon";
- reg = <0x0 0xffaf0000 0x0 0x20>;
- };
-
-Example:
-
- power: power-controller {
- compatible = "rockchip,rk3288-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_gpu {
- reg = <RK3288_PD_GPU>;
- clocks = <&cru ACLK_GPU>;
- pm_qos = <&qos_gpu>;
- };
- };
-
- power: power-controller {
- compatible = "rockchip,rk3368-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_gpu_1 {
- reg = <RK3368_PD_GPU_1>;
- clocks = <&cru ACLK_GPU_CFG>;
- };
- };
-
-Example 2:
- power: power-controller {
- compatible = "rockchip,rk3399-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_vio {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <RK3399_PD_VIO>;
-
- pd_vo {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <RK3399_PD_VO>;
-
- pd_vopb {
- reg = <RK3399_PD_VOPB>;
- };
-
- pd_vopl {
- reg = <RK3399_PD_VOPL>;
- };
- };
- };
- };
-
-Node of a device using power domains must have a power-domains property,
-containing a phandle to the power device node and an index specifying which
-power domain to use.
-The index should use macros in:
- "include/dt-bindings/power/px30-power.h" - for px30 type power domain.
- "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain.
- "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
- "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
- "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain.
- "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
- "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.
-
-Example of the node using power domain:
-
- node {
- /* ... */
- power-domains = <&power RK3288_PD_GPU>;
- /* ... */
- };
-
- node {
- /* ... */
- power-domains = <&power RK3368_PD_GPU_1>;
- /* ... */
- };
-
- node {
- /* ... */
- power-domains = <&power RK3399_PD_VOPB>;
- /* ... */
- };
--
2.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang,
Enric Balletbo i Serra
Convert the soc/rockchip/power_domain.txt binding document to
json-schema and move to the power bindings directory.
Add RK3568 SoCs for rockchip power binding document.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
.../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
.../bindings/soc/rockchip/power_domain.txt | 136 ---------
2 files changed, 286 insertions(+), 136 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
new file mode 100644
index 000000000000..0d6b8962d098
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
@@ -0,0 +1,286 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Power Domains
+
+maintainers:
+ - Elaine Zhang <zhangqing@rock-chips.com>
+ - Rob Herring <robh+dt@kernel.org>
+ - Heiko Stuebner <heiko@sntech.de>
+
+description: |
+ Rockchip processors include support for multiple power domains which can be
+ powered up/down by software based on different application scenes to save power.
+
+ Power domains contained within power-controller node are generic power domain
+ providers documented in Documentation/devicetree/bindings/power/power-domain.yaml.
+
+ IP cores belonging to a power domain should contain a 'power-domains'
+ property that is a phandle for the power domain node representing the domain.
+
+properties:
+ $nodename:
+ const: power-controller
+
+ compatible:
+ enum:
+ - rockchip,px30-power-controller
+ - rockchip,rk3036-power-controller
+ - rockchip,rk3066-power-controller
+ - rockchip,rk3128-power-controller
+ - rockchip,rk3188-power-controller
+ - rockchip,rk3228-power-controller
+ - rockchip,rk3288-power-controller
+ - rockchip,rk3328-power-controller
+ - rockchip,rk3366-power-controller
+ - rockchip,rk3368-power-controller
+ - rockchip,rk3399-power-controller
+ - rockchip,rk3568-power-controller
+
+ '#power-domain-cells':
+ const: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents the power domains within the power controller node as documented
+ in Documentation/devicetree/bindings/power/power-domain.yaml.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+ description: |
+ Power domain index. Valid values are defined in:
+ "include/dt-bindings/power/px30-power.h"
+ "include/dt-bindings/power/rk3036-power.h"
+ "include/dt-bindings/power/rk3066-power.h"
+ "include/dt-bindings/power/rk3128-power.h"
+ "include/dt-bindings/power/rk3188-power.h"
+ "include/dt-bindings/power/rk3228-power.h"
+ "include/dt-bindings/power/rk3288-power.h"
+ "include/dt-bindings/power/rk3328-power.h"
+ "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/rk3399-power.h"
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents a power domain child within a power domain parent node.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ patternProperties:
+ "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
+ type: object
+ description: |
+ Represents a power domain child within a power domain parent node.
+
+ properties:
+
+ '#power-domain-cells':
+ description:
+ Must be 0 for nodes representing a single PM domain and 1 for nodes
+ providing multiple PM domains.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ description: |
+ A number of phandles to clocks that need to be enabled while power domain
+ switches state.
+
+ pm_qos:
+ description: |
+ A number of phandles to qos blocks which need to be saved and restored
+ while power domain switches state.
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/rk3399-cru.h>
+ #include <dt-bindings/power/rk3399-power.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ qos_hdcp: qos@ffa90000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffa90000 0x0 0x20>;
+ };
+
+ qos_iep: qos@ffa98000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffa98000 0x0 0x20>;
+ };
+
+ qos_rga_r: qos@ffab0000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab0000 0x0 0x20>;
+ };
+
+ qos_rga_w: qos@ffab0080 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab0080 0x0 0x20>;
+ };
+
+ qos_video_m0: qos@ffab8000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffab8000 0x0 0x20>;
+ };
+
+ qos_video_m1_r: qos@ffac0000 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffac0000 0x0 0x20>;
+ };
+
+ qos_video_m1_w: qos@ffac0080 {
+ compatible = "rockchip,rk3399-qos", "syscon";
+ reg = <0x0 0xffac0080 0x0 0x20>;
+ };
+
+ power-management@ff310000 {
+ compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
+ reg = <0x0 0xff310000 0x0 0x1000>;
+
+ power-controller {
+ compatible = "rockchip,rk3399-power-controller";
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* These power domains are grouped by VD_CENTER */
+ pd_iep@RK3399_PD_IEP {
+ reg = <RK3399_PD_IEP>;
+ clocks = <&cru ACLK_IEP>,
+ <&cru HCLK_IEP>;
+ pm_qos = <&qos_iep>;
+ #power-domain-cells = <0>;
+ };
+ pd_rga@RK3399_PD_RGA {
+ reg = <RK3399_PD_RGA>;
+ clocks = <&cru ACLK_RGA>,
+ <&cru HCLK_RGA>;
+ pm_qos = <&qos_rga_r>,
+ <&qos_rga_w>;
+ #power-domain-cells = <0>;
+ };
+ pd_vcodec@RK3399_PD_VCODEC {
+ reg = <RK3399_PD_VCODEC>;
+ clocks = <&cru ACLK_VCODEC>,
+ <&cru HCLK_VCODEC>;
+ pm_qos = <&qos_video_m0>;
+ #power-domain-cells = <0>;
+ };
+ pd_vdu@RK3399_PD_VDU {
+ reg = <RK3399_PD_VDU>;
+ clocks = <&cru ACLK_VDU>,
+ <&cru HCLK_VDU>;
+ pm_qos = <&qos_video_m1_r>,
+ <&qos_video_m1_w>;
+ #power-domain-cells = <0>;
+ };
+ pd_vio@RK3399_PD_VIO {
+ reg = <RK3399_PD_VIO>;
+ #power-domain-cells = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pd_hdcp@RK3399_PD_HDCP {
+ reg = <RK3399_PD_HDCP>;
+ clocks = <&cru ACLK_HDCP>,
+ <&cru HCLK_HDCP>,
+ <&cru PCLK_HDCP>;
+ pm_qos = <&qos_hdcp>;
+ #power-domain-cells = <0>;
+ };
+ };
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
deleted file mode 100644
index 8304eceb62e4..000000000000
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ /dev/null
@@ -1,136 +0,0 @@
-* Rockchip Power Domains
-
-Rockchip processors include support for multiple power domains which can be
-powered up/down by software based on different application scenes to save power.
-
-Required properties for power domain controller:
-- compatible: Should be one of the following.
- "rockchip,px30-power-controller" - for PX30 SoCs.
- "rockchip,rk3036-power-controller" - for RK3036 SoCs.
- "rockchip,rk3066-power-controller" - for RK3066 SoCs.
- "rockchip,rk3128-power-controller" - for RK3128 SoCs.
- "rockchip,rk3188-power-controller" - for RK3188 SoCs.
- "rockchip,rk3228-power-controller" - for RK3228 SoCs.
- "rockchip,rk3288-power-controller" - for RK3288 SoCs.
- "rockchip,rk3328-power-controller" - for RK3328 SoCs.
- "rockchip,rk3366-power-controller" - for RK3366 SoCs.
- "rockchip,rk3368-power-controller" - for RK3368 SoCs.
- "rockchip,rk3399-power-controller" - for RK3399 SoCs.
-- #power-domain-cells: Number of cells in a power-domain specifier.
- Should be 1 for multiple PM domains.
-- #address-cells: Should be 1.
-- #size-cells: Should be 0.
-
-Required properties for power domain sub nodes:
-- reg: index of the power domain, should use macros in:
- "include/dt-bindings/power/px30-power.h" - for PX30 type power domain.
- "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain.
- "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain.
- "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain.
- "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
- "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
- "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
- "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain.
- "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
- "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
-- clocks (optional): phandles to clocks which need to be enabled while power domain
- switches state.
-- pm_qos (optional): phandles to qos blocks which need to be saved and restored
- while power domain switches state.
-
-Qos Example:
-
- qos_gpu: qos_gpu@ffaf0000 {
- compatible ="syscon";
- reg = <0x0 0xffaf0000 0x0 0x20>;
- };
-
-Example:
-
- power: power-controller {
- compatible = "rockchip,rk3288-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_gpu {
- reg = <RK3288_PD_GPU>;
- clocks = <&cru ACLK_GPU>;
- pm_qos = <&qos_gpu>;
- };
- };
-
- power: power-controller {
- compatible = "rockchip,rk3368-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_gpu_1 {
- reg = <RK3368_PD_GPU_1>;
- clocks = <&cru ACLK_GPU_CFG>;
- };
- };
-
-Example 2:
- power: power-controller {
- compatible = "rockchip,rk3399-power-controller";
- #power-domain-cells = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- pd_vio {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <RK3399_PD_VIO>;
-
- pd_vo {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <RK3399_PD_VO>;
-
- pd_vopb {
- reg = <RK3399_PD_VOPB>;
- };
-
- pd_vopl {
- reg = <RK3399_PD_VOPL>;
- };
- };
- };
- };
-
-Node of a device using power domains must have a power-domains property,
-containing a phandle to the power device node and an index specifying which
-power domain to use.
-The index should use macros in:
- "include/dt-bindings/power/px30-power.h" - for px30 type power domain.
- "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain.
- "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain.
- "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
- "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
- "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain.
- "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
- "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.
-
-Example of the node using power domain:
-
- node {
- /* ... */
- power-domains = <&power RK3288_PD_GPU>;
- /* ... */
- };
-
- node {
- /* ... */
- power-domains = <&power RK3368_PD_GPU_1>;
- /* ... */
- };
-
- node {
- /* ... */
- power-domains = <&power RK3399_PD_VOPB>;
- /* ... */
- };
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 3/3] soc: rockchip: power-domain: add rk3568 powerdomains
2021-03-24 3:23 ` Elaine Zhang
(?)
@ 2021-03-24 3:23 ` Elaine Zhang
-1 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
Add power-domains found on rk3568 socs.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
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 54eb6cfc5d5b..a2c19c845cf2 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 {
int pwr_mask;
@@ -131,6 +132,9 @@ struct rockchip_pmu {
#define DOMAIN_RK3399(pwr, status, req, wakeup) \
DOMAIN(pwr, status, req, req, req, wakeup)
+#define DOMAIN_RK3568(pwr, req, wakeup) \
+ DOMAIN_M(pwr, pwr, req, req, req, wakeup)
+
static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain *pd)
{
struct rockchip_pmu *pmu = pd->pmu;
@@ -841,6 +845,18 @@ static const struct rockchip_domain_info rk3399_pm_domains[] = {
[RK3399_PD_SDIOAUDIO] = DOMAIN_RK3399(BIT(31), BIT(31), BIT(29), true),
};
+static const struct rockchip_domain_info rk3568_pm_domains[] = {
+ [RK3568_PD_NPU] = DOMAIN_RK3568(BIT(1), BIT(2), false),
+ [RK3568_PD_GPU] = DOMAIN_RK3568(BIT(0), BIT(1), false),
+ [RK3568_PD_VI] = DOMAIN_RK3568(BIT(6), BIT(3), false),
+ [RK3568_PD_VO] = DOMAIN_RK3568(BIT(7), BIT(4), false),
+ [RK3568_PD_RGA] = DOMAIN_RK3568(BIT(5), BIT(5), false),
+ [RK3568_PD_VPU] = DOMAIN_RK3568(BIT(2), BIT(6), false),
+ [RK3568_PD_RKVDEC] = DOMAIN_RK3568(BIT(4), BIT(8), false),
+ [RK3568_PD_RKVENC] = DOMAIN_RK3568(BIT(3), BIT(7), false),
+ [RK3568_PD_PIPE] = DOMAIN_RK3568(BIT(8), BIT(11), false),
+};
+
static const struct rockchip_pmu_info px30_pmu = {
.pwr_offset = 0x18,
.status_offset = 0x20,
@@ -976,6 +992,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",
@@ -1021,6 +1048,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.17.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 3/3] soc: rockchip: power-domain: add rk3568 powerdomains
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
Add power-domains found on rk3568 socs.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
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 54eb6cfc5d5b..a2c19c845cf2 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 {
int pwr_mask;
@@ -131,6 +132,9 @@ struct rockchip_pmu {
#define DOMAIN_RK3399(pwr, status, req, wakeup) \
DOMAIN(pwr, status, req, req, req, wakeup)
+#define DOMAIN_RK3568(pwr, req, wakeup) \
+ DOMAIN_M(pwr, pwr, req, req, req, wakeup)
+
static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain *pd)
{
struct rockchip_pmu *pmu = pd->pmu;
@@ -841,6 +845,18 @@ static const struct rockchip_domain_info rk3399_pm_domains[] = {
[RK3399_PD_SDIOAUDIO] = DOMAIN_RK3399(BIT(31), BIT(31), BIT(29), true),
};
+static const struct rockchip_domain_info rk3568_pm_domains[] = {
+ [RK3568_PD_NPU] = DOMAIN_RK3568(BIT(1), BIT(2), false),
+ [RK3568_PD_GPU] = DOMAIN_RK3568(BIT(0), BIT(1), false),
+ [RK3568_PD_VI] = DOMAIN_RK3568(BIT(6), BIT(3), false),
+ [RK3568_PD_VO] = DOMAIN_RK3568(BIT(7), BIT(4), false),
+ [RK3568_PD_RGA] = DOMAIN_RK3568(BIT(5), BIT(5), false),
+ [RK3568_PD_VPU] = DOMAIN_RK3568(BIT(2), BIT(6), false),
+ [RK3568_PD_RKVDEC] = DOMAIN_RK3568(BIT(4), BIT(8), false),
+ [RK3568_PD_RKVENC] = DOMAIN_RK3568(BIT(3), BIT(7), false),
+ [RK3568_PD_PIPE] = DOMAIN_RK3568(BIT(8), BIT(11), false),
+};
+
static const struct rockchip_pmu_info px30_pmu = {
.pwr_offset = 0x18,
.status_offset = 0x20,
@@ -976,6 +992,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",
@@ -1021,6 +1048,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.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v3 3/3] soc: rockchip: power-domain: add rk3568 powerdomains
@ 2021-03-24 3:23 ` Elaine Zhang
0 siblings, 0 replies; 15+ messages in thread
From: Elaine Zhang @ 2021-03-24 3:23 UTC (permalink / raw)
To: robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao, Elaine Zhang
Add power-domains found on rk3568 socs.
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
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 54eb6cfc5d5b..a2c19c845cf2 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 {
int pwr_mask;
@@ -131,6 +132,9 @@ struct rockchip_pmu {
#define DOMAIN_RK3399(pwr, status, req, wakeup) \
DOMAIN(pwr, status, req, req, req, wakeup)
+#define DOMAIN_RK3568(pwr, req, wakeup) \
+ DOMAIN_M(pwr, pwr, req, req, req, wakeup)
+
static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain *pd)
{
struct rockchip_pmu *pmu = pd->pmu;
@@ -841,6 +845,18 @@ static const struct rockchip_domain_info rk3399_pm_domains[] = {
[RK3399_PD_SDIOAUDIO] = DOMAIN_RK3399(BIT(31), BIT(31), BIT(29), true),
};
+static const struct rockchip_domain_info rk3568_pm_domains[] = {
+ [RK3568_PD_NPU] = DOMAIN_RK3568(BIT(1), BIT(2), false),
+ [RK3568_PD_GPU] = DOMAIN_RK3568(BIT(0), BIT(1), false),
+ [RK3568_PD_VI] = DOMAIN_RK3568(BIT(6), BIT(3), false),
+ [RK3568_PD_VO] = DOMAIN_RK3568(BIT(7), BIT(4), false),
+ [RK3568_PD_RGA] = DOMAIN_RK3568(BIT(5), BIT(5), false),
+ [RK3568_PD_VPU] = DOMAIN_RK3568(BIT(2), BIT(6), false),
+ [RK3568_PD_RKVDEC] = DOMAIN_RK3568(BIT(4), BIT(8), false),
+ [RK3568_PD_RKVENC] = DOMAIN_RK3568(BIT(3), BIT(7), false),
+ [RK3568_PD_PIPE] = DOMAIN_RK3568(BIT(8), BIT(11), false),
+};
+
static const struct rockchip_pmu_info px30_pmu = {
.pwr_offset = 0x18,
.status_offset = 0x20,
@@ -976,6 +992,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",
@@ -1021,6 +1048,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.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend
2021-03-24 3:23 ` Elaine Zhang
(?)
@ 2021-03-24 6:39 ` Johan Jonker
-1 siblings, 0 replies; 15+ messages in thread
From: Johan Jonker @ 2021-03-24 6:39 UTC (permalink / raw)
To: Elaine Zhang, robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao,
Enric Balletbo i Serra
On 3/24/21 4:23 AM, Elaine Zhang wrote:
> Convert the soc/rockchip/power_domain.txt binding document to
> json-schema and move to the power bindings directory.
> Add RK3568 SoCs for rockchip power binding document.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
> .../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
> .../bindings/soc/rockchip/power_domain.txt | 136 ---------
> 2 files changed, 286 insertions(+), 136 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> new file mode 100644
> index 000000000000..0d6b8962d098
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> @@ -0,0 +1,286 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Rockchip Power Domains
> +
> +maintainers:
> + - Elaine Zhang <zhangqing@rock-chips.com>
> + - Rob Herring <robh+dt@kernel.org>
> + - Heiko Stuebner <heiko@sntech.de>
> +
> +description: |
> + Rockchip processors include support for multiple power domains which can be
> + powered up/down by software based on different application scenes to save power.
scenes > scenarios ??
This is not a theater.
=====
Scenes:
1. Something seen by a viewer; a view or prospect.
2. The place where an action or event occurs: the scene of the crime.
=====
Scenarios:
1. An expected or supposed situation or sequence of events
> +
> + Power domains contained within power-controller node are generic power domain
> + providers documented in Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + IP cores belonging to a power domain should contain a 'power-domains'
> + property that is a phandle for the power domain node representing the domain.
> +
> +properties:
> + $nodename:
> + const: power-controller
> +
> + compatible:
> + enum:
> + - rockchip,px30-power-controller
> + - rockchip,rk3036-power-controller
> + - rockchip,rk3066-power-controller
> + - rockchip,rk3128-power-controller
> + - rockchip,rk3188-power-controller
> + - rockchip,rk3228-power-controller
> + - rockchip,rk3288-power-controller
> + - rockchip,rk3328-power-controller
> + - rockchip,rk3366-power-controller
> + - rockchip,rk3368-power-controller
> + - rockchip,rk3399-power-controller
> + - rockchip,rk3568-power-controller
Use separate patches for a YAML conversion and adding new compatibility
strings. One action per patch.
> +
> + '#power-domain-cells':
> + const: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> +patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
Here you are using "", but elsewhere in this document '' is used.
Change all to "".
> + type: object
> + description: |
> + Represents the power domains within the power controller node as documented
> + in Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> + description: |
> + Power domain index. Valid values are defined in:
remove ":"
> + "include/dt-bindings/power/px30-power.h"
> + "include/dt-bindings/power/rk3036-power.h"
> + "include/dt-bindings/power/rk3066-power.h"
> + "include/dt-bindings/power/rk3128-power.h"
> + "include/dt-bindings/power/rk3188-power.h"
> + "include/dt-bindings/power/rk3228-power.h"
> + "include/dt-bindings/power/rk3288-power.h"
> + "include/dt-bindings/power/rk3328-power.h"
> + "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/rk3399-power.h"
rk3399 > rk3568
"include/dt-bindings/power/rk3568-power.h"
Use separate patches for a YAML conversion and adding new compatibility
strings. One action per patch.
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
> + type: object
> + description: |
> + Represents a power domain child within a power domain parent node.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
> + type: object
> + description: |
> + Represents a power domain child within a power domain parent node.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - '#power-domain-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/rk3399-cru.h>
> + #include <dt-bindings/power/rk3399-power.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + qos_hdcp: qos@ffa90000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffa90000 0x0 0x20>;
> + };
> +
> + qos_iep: qos@ffa98000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffa98000 0x0 0x20>;
> + };
> +
> + qos_rga_r: qos@ffab0000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab0000 0x0 0x20>;
> + };
> +
> + qos_rga_w: qos@ffab0080 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab0080 0x0 0x20>;
> + };
> +
> + qos_video_m0: qos@ffab8000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab8000 0x0 0x20>;
> + };
> +
> + qos_video_m1_r: qos@ffac0000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffac0000 0x0 0x20>;
> + };
> +
> + qos_video_m1_w: qos@ffac0080 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffac0080 0x0 0x20>;
> + };
> +
> + power-management@ff310000 {
> + compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
> + reg = <0x0 0xff310000 0x0 0x1000>;
> +
> + power-controller {
> + compatible = "rockchip,rk3399-power-controller";
> + #power-domain-cells = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + /* These power domains are grouped by VD_CENTER */
> + pd_iep@RK3399_PD_IEP {
> + reg = <RK3399_PD_IEP>;
> + clocks = <&cru ACLK_IEP>,
> + <&cru HCLK_IEP>;
> + pm_qos = <&qos_iep>;
> + #power-domain-cells = <0>;
> + };
> + pd_rga@RK3399_PD_RGA {
> + reg = <RK3399_PD_RGA>;
> + clocks = <&cru ACLK_RGA>,
> + <&cru HCLK_RGA>;
> + pm_qos = <&qos_rga_r>,
> + <&qos_rga_w>;
> + #power-domain-cells = <0>;
> + };
> + pd_vcodec@RK3399_PD_VCODEC {
> + reg = <RK3399_PD_VCODEC>;
> + clocks = <&cru ACLK_VCODEC>,
> + <&cru HCLK_VCODEC>;
> + pm_qos = <&qos_video_m0>;
> + #power-domain-cells = <0>;
> + };
> + pd_vdu@RK3399_PD_VDU {
> + reg = <RK3399_PD_VDU>;
> + clocks = <&cru ACLK_VDU>,
> + <&cru HCLK_VDU>;
> + pm_qos = <&qos_video_m1_r>,
> + <&qos_video_m1_w>;
> + #power-domain-cells = <0>;
> + };
> + pd_vio@RK3399_PD_VIO {
> + reg = <RK3399_PD_VIO>;
> + #power-domain-cells = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pd_hdcp@RK3399_PD_HDCP {
> + reg = <RK3399_PD_HDCP>;
> + clocks = <&cru ACLK_HDCP>,
> + <&cru HCLK_HDCP>,
> + <&cru PCLK_HDCP>;
> + pm_qos = <&qos_hdcp>;
> + #power-domain-cells = <0>;
> + };
> + };
> + };
> + };
> + };
> diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> deleted file mode 100644
> index 8304eceb62e4..000000000000
> --- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> +++ /dev/null
> @@ -1,136 +0,0 @@
> -* Rockchip Power Domains
> -
> -Rockchip processors include support for multiple power domains which can be
> -powered up/down by software based on different application scenes to save power.
> -
> -Required properties for power domain controller:
> -- compatible: Should be one of the following.
> - "rockchip,px30-power-controller" - for PX30 SoCs.
> - "rockchip,rk3036-power-controller" - for RK3036 SoCs.
> - "rockchip,rk3066-power-controller" - for RK3066 SoCs.
> - "rockchip,rk3128-power-controller" - for RK3128 SoCs.
> - "rockchip,rk3188-power-controller" - for RK3188 SoCs.
> - "rockchip,rk3228-power-controller" - for RK3228 SoCs.
> - "rockchip,rk3288-power-controller" - for RK3288 SoCs.
> - "rockchip,rk3328-power-controller" - for RK3328 SoCs.
> - "rockchip,rk3366-power-controller" - for RK3366 SoCs.
> - "rockchip,rk3368-power-controller" - for RK3368 SoCs.
> - "rockchip,rk3399-power-controller" - for RK3399 SoCs.
> -- #power-domain-cells: Number of cells in a power-domain specifier.
> - Should be 1 for multiple PM domains.
> -- #address-cells: Should be 1.
> -- #size-cells: Should be 0.
> -
> -Required properties for power domain sub nodes:
> -- reg: index of the power domain, should use macros in:
> - "include/dt-bindings/power/px30-power.h" - for PX30 type power domain.
> - "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain.
> - "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain.
> - "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain.
> - "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
> - "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
> - "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
> - "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain.
> - "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
> - "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
> -- clocks (optional): phandles to clocks which need to be enabled while power domain
> - switches state.
> -- pm_qos (optional): phandles to qos blocks which need to be saved and restored
> - while power domain switches state.
> -
> -Qos Example:
> -
> - qos_gpu: qos_gpu@ffaf0000 {
> - compatible ="syscon";
> - reg = <0x0 0xffaf0000 0x0 0x20>;
> - };
> -
> -Example:
> -
> - power: power-controller {
> - compatible = "rockchip,rk3288-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_gpu {
> - reg = <RK3288_PD_GPU>;
> - clocks = <&cru ACLK_GPU>;
> - pm_qos = <&qos_gpu>;
> - };
> - };
> -
> - power: power-controller {
> - compatible = "rockchip,rk3368-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_gpu_1 {
> - reg = <RK3368_PD_GPU_1>;
> - clocks = <&cru ACLK_GPU_CFG>;
> - };
> - };
> -
> -Example 2:
> - power: power-controller {
> - compatible = "rockchip,rk3399-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_vio {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - reg = <RK3399_PD_VIO>;
> -
> - pd_vo {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - reg = <RK3399_PD_VO>;
> -
> - pd_vopb {
> - reg = <RK3399_PD_VOPB>;
> - };
> -
> - pd_vopl {
> - reg = <RK3399_PD_VOPL>;
> - };
> - };
> - };
> - };
> -
> -Node of a device using power domains must have a power-domains property,
> -containing a phandle to the power device node and an index specifying which
> -power domain to use.
> -The index should use macros in:
> - "include/dt-bindings/power/px30-power.h" - for px30 type power domain.
> - "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain.
> - "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
> - "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
> - "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain.
> - "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
> - "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.
> -
> -Example of the node using power domain:
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3288_PD_GPU>;
> - /* ... */
> - };
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3368_PD_GPU_1>;
> - /* ... */
> - };
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3399_PD_VOPB>;
> - /* ... */
> - };
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend
@ 2021-03-24 6:39 ` Johan Jonker
0 siblings, 0 replies; 15+ messages in thread
From: Johan Jonker @ 2021-03-24 6:39 UTC (permalink / raw)
To: Elaine Zhang, robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao,
Enric Balletbo i Serra
On 3/24/21 4:23 AM, Elaine Zhang wrote:
> Convert the soc/rockchip/power_domain.txt binding document to
> json-schema and move to the power bindings directory.
> Add RK3568 SoCs for rockchip power binding document.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
> .../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
> .../bindings/soc/rockchip/power_domain.txt | 136 ---------
> 2 files changed, 286 insertions(+), 136 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> new file mode 100644
> index 000000000000..0d6b8962d098
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> @@ -0,0 +1,286 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Rockchip Power Domains
> +
> +maintainers:
> + - Elaine Zhang <zhangqing@rock-chips.com>
> + - Rob Herring <robh+dt@kernel.org>
> + - Heiko Stuebner <heiko@sntech.de>
> +
> +description: |
> + Rockchip processors include support for multiple power domains which can be
> + powered up/down by software based on different application scenes to save power.
scenes > scenarios ??
This is not a theater.
=====
Scenes:
1. Something seen by a viewer; a view or prospect.
2. The place where an action or event occurs: the scene of the crime.
=====
Scenarios:
1. An expected or supposed situation or sequence of events
> +
> + Power domains contained within power-controller node are generic power domain
> + providers documented in Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + IP cores belonging to a power domain should contain a 'power-domains'
> + property that is a phandle for the power domain node representing the domain.
> +
> +properties:
> + $nodename:
> + const: power-controller
> +
> + compatible:
> + enum:
> + - rockchip,px30-power-controller
> + - rockchip,rk3036-power-controller
> + - rockchip,rk3066-power-controller
> + - rockchip,rk3128-power-controller
> + - rockchip,rk3188-power-controller
> + - rockchip,rk3228-power-controller
> + - rockchip,rk3288-power-controller
> + - rockchip,rk3328-power-controller
> + - rockchip,rk3366-power-controller
> + - rockchip,rk3368-power-controller
> + - rockchip,rk3399-power-controller
> + - rockchip,rk3568-power-controller
Use separate patches for a YAML conversion and adding new compatibility
strings. One action per patch.
> +
> + '#power-domain-cells':
> + const: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> +patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
Here you are using "", but elsewhere in this document '' is used.
Change all to "".
> + type: object
> + description: |
> + Represents the power domains within the power controller node as documented
> + in Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> + description: |
> + Power domain index. Valid values are defined in:
remove ":"
> + "include/dt-bindings/power/px30-power.h"
> + "include/dt-bindings/power/rk3036-power.h"
> + "include/dt-bindings/power/rk3066-power.h"
> + "include/dt-bindings/power/rk3128-power.h"
> + "include/dt-bindings/power/rk3188-power.h"
> + "include/dt-bindings/power/rk3228-power.h"
> + "include/dt-bindings/power/rk3288-power.h"
> + "include/dt-bindings/power/rk3328-power.h"
> + "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/rk3399-power.h"
rk3399 > rk3568
"include/dt-bindings/power/rk3568-power.h"
Use separate patches for a YAML conversion and adding new compatibility
strings. One action per patch.
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
> + type: object
> + description: |
> + Represents a power domain child within a power domain parent node.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
> + type: object
> + description: |
> + Represents a power domain child within a power domain parent node.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - '#power-domain-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/rk3399-cru.h>
> + #include <dt-bindings/power/rk3399-power.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + qos_hdcp: qos@ffa90000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffa90000 0x0 0x20>;
> + };
> +
> + qos_iep: qos@ffa98000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffa98000 0x0 0x20>;
> + };
> +
> + qos_rga_r: qos@ffab0000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab0000 0x0 0x20>;
> + };
> +
> + qos_rga_w: qos@ffab0080 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab0080 0x0 0x20>;
> + };
> +
> + qos_video_m0: qos@ffab8000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab8000 0x0 0x20>;
> + };
> +
> + qos_video_m1_r: qos@ffac0000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffac0000 0x0 0x20>;
> + };
> +
> + qos_video_m1_w: qos@ffac0080 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffac0080 0x0 0x20>;
> + };
> +
> + power-management@ff310000 {
> + compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
> + reg = <0x0 0xff310000 0x0 0x1000>;
> +
> + power-controller {
> + compatible = "rockchip,rk3399-power-controller";
> + #power-domain-cells = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + /* These power domains are grouped by VD_CENTER */
> + pd_iep@RK3399_PD_IEP {
> + reg = <RK3399_PD_IEP>;
> + clocks = <&cru ACLK_IEP>,
> + <&cru HCLK_IEP>;
> + pm_qos = <&qos_iep>;
> + #power-domain-cells = <0>;
> + };
> + pd_rga@RK3399_PD_RGA {
> + reg = <RK3399_PD_RGA>;
> + clocks = <&cru ACLK_RGA>,
> + <&cru HCLK_RGA>;
> + pm_qos = <&qos_rga_r>,
> + <&qos_rga_w>;
> + #power-domain-cells = <0>;
> + };
> + pd_vcodec@RK3399_PD_VCODEC {
> + reg = <RK3399_PD_VCODEC>;
> + clocks = <&cru ACLK_VCODEC>,
> + <&cru HCLK_VCODEC>;
> + pm_qos = <&qos_video_m0>;
> + #power-domain-cells = <0>;
> + };
> + pd_vdu@RK3399_PD_VDU {
> + reg = <RK3399_PD_VDU>;
> + clocks = <&cru ACLK_VDU>,
> + <&cru HCLK_VDU>;
> + pm_qos = <&qos_video_m1_r>,
> + <&qos_video_m1_w>;
> + #power-domain-cells = <0>;
> + };
> + pd_vio@RK3399_PD_VIO {
> + reg = <RK3399_PD_VIO>;
> + #power-domain-cells = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pd_hdcp@RK3399_PD_HDCP {
> + reg = <RK3399_PD_HDCP>;
> + clocks = <&cru ACLK_HDCP>,
> + <&cru HCLK_HDCP>,
> + <&cru PCLK_HDCP>;
> + pm_qos = <&qos_hdcp>;
> + #power-domain-cells = <0>;
> + };
> + };
> + };
> + };
> + };
> diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> deleted file mode 100644
> index 8304eceb62e4..000000000000
> --- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> +++ /dev/null
> @@ -1,136 +0,0 @@
> -* Rockchip Power Domains
> -
> -Rockchip processors include support for multiple power domains which can be
> -powered up/down by software based on different application scenes to save power.
> -
> -Required properties for power domain controller:
> -- compatible: Should be one of the following.
> - "rockchip,px30-power-controller" - for PX30 SoCs.
> - "rockchip,rk3036-power-controller" - for RK3036 SoCs.
> - "rockchip,rk3066-power-controller" - for RK3066 SoCs.
> - "rockchip,rk3128-power-controller" - for RK3128 SoCs.
> - "rockchip,rk3188-power-controller" - for RK3188 SoCs.
> - "rockchip,rk3228-power-controller" - for RK3228 SoCs.
> - "rockchip,rk3288-power-controller" - for RK3288 SoCs.
> - "rockchip,rk3328-power-controller" - for RK3328 SoCs.
> - "rockchip,rk3366-power-controller" - for RK3366 SoCs.
> - "rockchip,rk3368-power-controller" - for RK3368 SoCs.
> - "rockchip,rk3399-power-controller" - for RK3399 SoCs.
> -- #power-domain-cells: Number of cells in a power-domain specifier.
> - Should be 1 for multiple PM domains.
> -- #address-cells: Should be 1.
> -- #size-cells: Should be 0.
> -
> -Required properties for power domain sub nodes:
> -- reg: index of the power domain, should use macros in:
> - "include/dt-bindings/power/px30-power.h" - for PX30 type power domain.
> - "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain.
> - "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain.
> - "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain.
> - "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
> - "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
> - "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
> - "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain.
> - "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
> - "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
> -- clocks (optional): phandles to clocks which need to be enabled while power domain
> - switches state.
> -- pm_qos (optional): phandles to qos blocks which need to be saved and restored
> - while power domain switches state.
> -
> -Qos Example:
> -
> - qos_gpu: qos_gpu@ffaf0000 {
> - compatible ="syscon";
> - reg = <0x0 0xffaf0000 0x0 0x20>;
> - };
> -
> -Example:
> -
> - power: power-controller {
> - compatible = "rockchip,rk3288-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_gpu {
> - reg = <RK3288_PD_GPU>;
> - clocks = <&cru ACLK_GPU>;
> - pm_qos = <&qos_gpu>;
> - };
> - };
> -
> - power: power-controller {
> - compatible = "rockchip,rk3368-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_gpu_1 {
> - reg = <RK3368_PD_GPU_1>;
> - clocks = <&cru ACLK_GPU_CFG>;
> - };
> - };
> -
> -Example 2:
> - power: power-controller {
> - compatible = "rockchip,rk3399-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_vio {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - reg = <RK3399_PD_VIO>;
> -
> - pd_vo {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - reg = <RK3399_PD_VO>;
> -
> - pd_vopb {
> - reg = <RK3399_PD_VOPB>;
> - };
> -
> - pd_vopl {
> - reg = <RK3399_PD_VOPL>;
> - };
> - };
> - };
> - };
> -
> -Node of a device using power domains must have a power-domains property,
> -containing a phandle to the power device node and an index specifying which
> -power domain to use.
> -The index should use macros in:
> - "include/dt-bindings/power/px30-power.h" - for px30 type power domain.
> - "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain.
> - "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
> - "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
> - "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain.
> - "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
> - "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.
> -
> -Example of the node using power domain:
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3288_PD_GPU>;
> - /* ... */
> - };
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3368_PD_GPU_1>;
> - /* ... */
> - };
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3399_PD_VOPB>;
> - /* ... */
> - };
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend
@ 2021-03-24 6:39 ` Johan Jonker
0 siblings, 0 replies; 15+ messages in thread
From: Johan Jonker @ 2021-03-24 6:39 UTC (permalink / raw)
To: Elaine Zhang, robh+dt, heiko
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, cl,
huangtao, kever.yang, tony.xie, finley.xiao,
Enric Balletbo i Serra
On 3/24/21 4:23 AM, Elaine Zhang wrote:
> Convert the soc/rockchip/power_domain.txt binding document to
> json-schema and move to the power bindings directory.
> Add RK3568 SoCs for rockchip power binding document.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> ---
> .../power/rockchip,power-controller.yaml | 286 ++++++++++++++++++
> .../bindings/soc/rockchip/power_domain.txt | 136 ---------
> 2 files changed, 286 insertions(+), 136 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> delete mode 100644 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> new file mode 100644
> index 000000000000..0d6b8962d098
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
> @@ -0,0 +1,286 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Rockchip Power Domains
> +
> +maintainers:
> + - Elaine Zhang <zhangqing@rock-chips.com>
> + - Rob Herring <robh+dt@kernel.org>
> + - Heiko Stuebner <heiko@sntech.de>
> +
> +description: |
> + Rockchip processors include support for multiple power domains which can be
> + powered up/down by software based on different application scenes to save power.
scenes > scenarios ??
This is not a theater.
=====
Scenes:
1. Something seen by a viewer; a view or prospect.
2. The place where an action or event occurs: the scene of the crime.
=====
Scenarios:
1. An expected or supposed situation or sequence of events
> +
> + Power domains contained within power-controller node are generic power domain
> + providers documented in Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + IP cores belonging to a power domain should contain a 'power-domains'
> + property that is a phandle for the power domain node representing the domain.
> +
> +properties:
> + $nodename:
> + const: power-controller
> +
> + compatible:
> + enum:
> + - rockchip,px30-power-controller
> + - rockchip,rk3036-power-controller
> + - rockchip,rk3066-power-controller
> + - rockchip,rk3128-power-controller
> + - rockchip,rk3188-power-controller
> + - rockchip,rk3228-power-controller
> + - rockchip,rk3288-power-controller
> + - rockchip,rk3328-power-controller
> + - rockchip,rk3366-power-controller
> + - rockchip,rk3368-power-controller
> + - rockchip,rk3399-power-controller
> + - rockchip,rk3568-power-controller
Use separate patches for a YAML conversion and adding new compatibility
strings. One action per patch.
> +
> + '#power-domain-cells':
> + const: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> +patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
Here you are using "", but elsewhere in this document '' is used.
Change all to "".
> + type: object
> + description: |
> + Represents the power domains within the power controller node as documented
> + in Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> + description: |
> + Power domain index. Valid values are defined in:
remove ":"
> + "include/dt-bindings/power/px30-power.h"
> + "include/dt-bindings/power/rk3036-power.h"
> + "include/dt-bindings/power/rk3066-power.h"
> + "include/dt-bindings/power/rk3128-power.h"
> + "include/dt-bindings/power/rk3188-power.h"
> + "include/dt-bindings/power/rk3228-power.h"
> + "include/dt-bindings/power/rk3288-power.h"
> + "include/dt-bindings/power/rk3328-power.h"
> + "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/rk3399-power.h"
rk3399 > rk3568
"include/dt-bindings/power/rk3568-power.h"
Use separate patches for a YAML conversion and adding new compatibility
strings. One action per patch.
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
> + type: object
> + description: |
> + Represents a power domain child within a power domain parent node.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + patternProperties:
> + "^pd_[0-9a-z_]{2,10}@[0-9a-f]+$":
> + type: object
> + description: |
> + Represents a power domain child within a power domain parent node.
> +
> + properties:
> +
> + '#power-domain-cells':
> + description:
> + Must be 0 for nodes representing a single PM domain and 1 for nodes
> + providing multiple PM domains.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + description: |
> + A number of phandles to clocks that need to be enabled while power domain
> + switches state.
> +
> + pm_qos:
> + description: |
> + A number of phandles to qos blocks which need to be saved and restored
> + while power domain switches state.
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - '#power-domain-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/rk3399-cru.h>
> + #include <dt-bindings/power/rk3399-power.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + qos_hdcp: qos@ffa90000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffa90000 0x0 0x20>;
> + };
> +
> + qos_iep: qos@ffa98000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffa98000 0x0 0x20>;
> + };
> +
> + qos_rga_r: qos@ffab0000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab0000 0x0 0x20>;
> + };
> +
> + qos_rga_w: qos@ffab0080 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab0080 0x0 0x20>;
> + };
> +
> + qos_video_m0: qos@ffab8000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffab8000 0x0 0x20>;
> + };
> +
> + qos_video_m1_r: qos@ffac0000 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffac0000 0x0 0x20>;
> + };
> +
> + qos_video_m1_w: qos@ffac0080 {
> + compatible = "rockchip,rk3399-qos", "syscon";
> + reg = <0x0 0xffac0080 0x0 0x20>;
> + };
> +
> + power-management@ff310000 {
> + compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
> + reg = <0x0 0xff310000 0x0 0x1000>;
> +
> + power-controller {
> + compatible = "rockchip,rk3399-power-controller";
> + #power-domain-cells = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + /* These power domains are grouped by VD_CENTER */
> + pd_iep@RK3399_PD_IEP {
> + reg = <RK3399_PD_IEP>;
> + clocks = <&cru ACLK_IEP>,
> + <&cru HCLK_IEP>;
> + pm_qos = <&qos_iep>;
> + #power-domain-cells = <0>;
> + };
> + pd_rga@RK3399_PD_RGA {
> + reg = <RK3399_PD_RGA>;
> + clocks = <&cru ACLK_RGA>,
> + <&cru HCLK_RGA>;
> + pm_qos = <&qos_rga_r>,
> + <&qos_rga_w>;
> + #power-domain-cells = <0>;
> + };
> + pd_vcodec@RK3399_PD_VCODEC {
> + reg = <RK3399_PD_VCODEC>;
> + clocks = <&cru ACLK_VCODEC>,
> + <&cru HCLK_VCODEC>;
> + pm_qos = <&qos_video_m0>;
> + #power-domain-cells = <0>;
> + };
> + pd_vdu@RK3399_PD_VDU {
> + reg = <RK3399_PD_VDU>;
> + clocks = <&cru ACLK_VDU>,
> + <&cru HCLK_VDU>;
> + pm_qos = <&qos_video_m1_r>,
> + <&qos_video_m1_w>;
> + #power-domain-cells = <0>;
> + };
> + pd_vio@RK3399_PD_VIO {
> + reg = <RK3399_PD_VIO>;
> + #power-domain-cells = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pd_hdcp@RK3399_PD_HDCP {
> + reg = <RK3399_PD_HDCP>;
> + clocks = <&cru ACLK_HDCP>,
> + <&cru HCLK_HDCP>,
> + <&cru PCLK_HDCP>;
> + pm_qos = <&qos_hdcp>;
> + #power-domain-cells = <0>;
> + };
> + };
> + };
> + };
> + };
> diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> deleted file mode 100644
> index 8304eceb62e4..000000000000
> --- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> +++ /dev/null
> @@ -1,136 +0,0 @@
> -* Rockchip Power Domains
> -
> -Rockchip processors include support for multiple power domains which can be
> -powered up/down by software based on different application scenes to save power.
> -
> -Required properties for power domain controller:
> -- compatible: Should be one of the following.
> - "rockchip,px30-power-controller" - for PX30 SoCs.
> - "rockchip,rk3036-power-controller" - for RK3036 SoCs.
> - "rockchip,rk3066-power-controller" - for RK3066 SoCs.
> - "rockchip,rk3128-power-controller" - for RK3128 SoCs.
> - "rockchip,rk3188-power-controller" - for RK3188 SoCs.
> - "rockchip,rk3228-power-controller" - for RK3228 SoCs.
> - "rockchip,rk3288-power-controller" - for RK3288 SoCs.
> - "rockchip,rk3328-power-controller" - for RK3328 SoCs.
> - "rockchip,rk3366-power-controller" - for RK3366 SoCs.
> - "rockchip,rk3368-power-controller" - for RK3368 SoCs.
> - "rockchip,rk3399-power-controller" - for RK3399 SoCs.
> -- #power-domain-cells: Number of cells in a power-domain specifier.
> - Should be 1 for multiple PM domains.
> -- #address-cells: Should be 1.
> -- #size-cells: Should be 0.
> -
> -Required properties for power domain sub nodes:
> -- reg: index of the power domain, should use macros in:
> - "include/dt-bindings/power/px30-power.h" - for PX30 type power domain.
> - "include/dt-bindings/power/rk3036-power.h" - for RK3036 type power domain.
> - "include/dt-bindings/power/rk3066-power.h" - for RK3066 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for RK3128 type power domain.
> - "include/dt-bindings/power/rk3188-power.h" - for RK3188 type power domain.
> - "include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
> - "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain.
> - "include/dt-bindings/power/rk3328-power.h" - for RK3328 type power domain.
> - "include/dt-bindings/power/rk3366-power.h" - for RK3366 type power domain.
> - "include/dt-bindings/power/rk3368-power.h" - for RK3368 type power domain.
> - "include/dt-bindings/power/rk3399-power.h" - for RK3399 type power domain.
> -- clocks (optional): phandles to clocks which need to be enabled while power domain
> - switches state.
> -- pm_qos (optional): phandles to qos blocks which need to be saved and restored
> - while power domain switches state.
> -
> -Qos Example:
> -
> - qos_gpu: qos_gpu@ffaf0000 {
> - compatible ="syscon";
> - reg = <0x0 0xffaf0000 0x0 0x20>;
> - };
> -
> -Example:
> -
> - power: power-controller {
> - compatible = "rockchip,rk3288-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_gpu {
> - reg = <RK3288_PD_GPU>;
> - clocks = <&cru ACLK_GPU>;
> - pm_qos = <&qos_gpu>;
> - };
> - };
> -
> - power: power-controller {
> - compatible = "rockchip,rk3368-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_gpu_1 {
> - reg = <RK3368_PD_GPU_1>;
> - clocks = <&cru ACLK_GPU_CFG>;
> - };
> - };
> -
> -Example 2:
> - power: power-controller {
> - compatible = "rockchip,rk3399-power-controller";
> - #power-domain-cells = <1>;
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - pd_vio {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - reg = <RK3399_PD_VIO>;
> -
> - pd_vo {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - reg = <RK3399_PD_VO>;
> -
> - pd_vopb {
> - reg = <RK3399_PD_VOPB>;
> - };
> -
> - pd_vopl {
> - reg = <RK3399_PD_VOPL>;
> - };
> - };
> - };
> - };
> -
> -Node of a device using power domains must have a power-domains property,
> -containing a phandle to the power device node and an index specifying which
> -power domain to use.
> -The index should use macros in:
> - "include/dt-bindings/power/px30-power.h" - for px30 type power domain.
> - "include/dt-bindings/power/rk3036-power.h" - for rk3036 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for rk3128 type power domain.
> - "include/dt-bindings/power/rk3128-power.h" - for rk3228 type power domain.
> - "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain.
> - "include/dt-bindings/power/rk3328-power.h" - for rk3328 type power domain.
> - "include/dt-bindings/power/rk3366-power.h" - for rk3366 type power domain.
> - "include/dt-bindings/power/rk3368-power.h" - for rk3368 type power domain.
> - "include/dt-bindings/power/rk3399-power.h" - for rk3399 type power domain.
> -
> -Example of the node using power domain:
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3288_PD_GPU>;
> - /* ... */
> - };
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3368_PD_GPU_1>;
> - /* ... */
> - };
> -
> - node {
> - /* ... */
> - power-domains = <&power RK3399_PD_VOPB>;
> - /* ... */
> - };
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-03-24 7:10 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 3:23 [PATCH v3 0/3] soc: rockchip: power-domain: add rk3568 powerdomains Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 3:23 ` [PATCH v3 1/3] dt-bindings: add power-domain header for RK3568 SoCs Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 3:23 ` [PATCH v3 2/3] dt-bindings: power: rockchip: Convert to json-schema and extend Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 6:39 ` Johan Jonker
2021-03-24 6:39 ` Johan Jonker
2021-03-24 6:39 ` Johan Jonker
2021-03-24 3:23 ` [PATCH v3 3/3] soc: rockchip: power-domain: add rk3568 powerdomains Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
2021-03-24 3:23 ` Elaine Zhang
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.