linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/13] add power domain support for Rockchip Socs
@ 2018-05-11  3:30 Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 01/13] dt-bindings: power: add RK3036 SoCs header for power-domain Elaine Zhang
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:30 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

add power domain support for RK3036/RK3128/RK3228/PX30 Soc.
fix up the wrong value when set power domain up.

Elaine Zhang (13):
  dt-bindings: power: add RK3036 SoCs header for power-domain
  dt-bindings: add binding for rk3036 power domains
  Soc: rockchip: power-domain: add power domain support for rk3036
  soc: rockchip: power-domain: Fix wrong value when power up pd
  dt-bindings: power: add RK3128 SoCs header for power-domain
  dt-bindings: add binding for rk3128 power domains
  soc: rockchip: power-domain: add power domain support for rk3128
  dt-bindings: power: add RK3228 SoCs header for power-domain
  dt-bindings: add binding for rk3228 power domains
  soc: rockchip: power-domain: add power domain support for rk3228
  dt-bindings: power: add PX30 SoCs header for power-domain
  dt-bindings: add binding for px30 power domains
  soc: rockchip: power-domain: add power domain support for px30

 .../bindings/soc/rockchip/power_domain.txt         |  12 +++
 drivers/soc/rockchip/pm_domains.c                  | 116 ++++++++++++++++++++-
 include/dt-bindings/power/px30-power.h             |  32 ++++++
 include/dt-bindings/power/rk3036-power.h           |  27 +++++
 include/dt-bindings/power/rk3128-power.h           |  28 +++++
 include/dt-bindings/power/rk3228-power.h           |  26 +++++
 6 files changed, 240 insertions(+), 1 deletion(-)
 create mode 100644 include/dt-bindings/power/px30-power.h
 create mode 100644 include/dt-bindings/power/rk3036-power.h
 create mode 100644 include/dt-bindings/power/rk3128-power.h
 create mode 100644 include/dt-bindings/power/rk3228-power.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v1 01/13] dt-bindings: power: add RK3036 SoCs header for power-domain
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
@ 2018-05-11  3:30 ` Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 02/13] dt-bindings: add binding for rk3036 power domains Elaine Zhang
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:30 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

According to a description from TRM, add all the power domains.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
 include/dt-bindings/power/rk3036-power.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 include/dt-bindings/power/rk3036-power.h

diff --git a/include/dt-bindings/power/rk3036-power.h b/include/dt-bindings/power/rk3036-power.h
new file mode 100644
index 000000000000..59e09f1c5af7
--- /dev/null
+++ b/include/dt-bindings/power/rk3036-power.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
+ * Author: Caesar Wang <wxt@rock-chips.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __DT_BINDINGS_POWER_RK3036_POWER_H__
+#define __DT_BINDINGS_POWER_RK3036_POWER_H__
+
+#define RK3036_PD_MSCH		0
+#define RK3036_PD_CORE		1
+#define RK3036_PD_PERI		2
+#define RK3036_PD_VIO		3
+#define RK3036_PD_VPU		4
+#define RK3036_PD_GPU		5
+#define RK3036_PD_SYS		6
+
+#endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 02/13] dt-bindings: add binding for rk3036 power domains
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 01/13] dt-bindings: power: add RK3036 SoCs header for power-domain Elaine Zhang
@ 2018-05-11  3:30 ` Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 03/13] Soc: rockchip: power-domain: add power domain support for rk3036 Elaine Zhang
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:30 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

Add binding documentation for the power domains
found on Rockchip RK3036 SoCs.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
index 301d2a9bc1b8..79924ee9ae86 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
@@ -5,6 +5,7 @@ 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,rk3036-power-controller" - for RK3036 SoCs.
 	"rockchip,rk3288-power-controller" - for RK3288 SoCs.
 	"rockchip,rk3328-power-controller" - for RK3328 SoCs.
 	"rockchip,rk3366-power-controller" - for RK3366 SoCs.
@@ -17,6 +18,7 @@ Required properties for power domain controller:
 
 Required properties for power domain sub nodes:
 - reg: index of the power domain, should use macros in:
+	"include/dt-bindings/power/rk3036-power.h" - for RK3036 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.
@@ -93,6 +95,7 @@ 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/rk3036-power.h" - for rk3036 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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 03/13] Soc: rockchip: power-domain: add power domain support for rk3036
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 01/13] dt-bindings: power: add RK3036 SoCs header for power-domain Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 02/13] dt-bindings: add binding for rk3036 power domains Elaine Zhang
@ 2018-05-11  3:30 ` Elaine Zhang
  2018-05-11  3:30 ` [PATCH v1 04/13] soc: rockchip: power-domain: Fix wrong value when power up pd Elaine Zhang
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:30 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

This driver is modified to support RK3036 SoC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
 drivers/soc/rockchip/pm_domains.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 53efc386b1ad..ebd7c41898c0 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -18,6 +18,7 @@
 #include <linux/clk.h>
 #include <linux/regmap.h>
 #include <linux/mfd/syscon.h>
+#include <dt-bindings/power/rk3036-power.h>
 #include <dt-bindings/power/rk3288-power.h>
 #include <dt-bindings/power/rk3328-power.h>
 #include <dt-bindings/power/rk3366-power.h>
@@ -102,6 +103,14 @@ struct rockchip_pmu {
 	.ack_mask = (ack >= 0) ? BIT(ack) : 0,		\
 	.active_wakeup = wakeup,			\
 }
+#define DOMAIN_RK3036(req, ack, idle, wakeup)		\
+{							\
+	.req_mask = (req >= 0) ? BIT(req) : 0,		\
+	.req_w_mask = (req >= 0) ?  BIT(req + 16) : 0,	\
+	.ack_mask = (ack >= 0) ? BIT(ack) : 0,		\
+	.idle_mask = (idle >= 0) ? BIT(idle) : 0,	\
+	.active_wakeup = wakeup,			\
+}
 
 #define DOMAIN_RK3288(pwr, status, req, wakeup)		\
 	DOMAIN(pwr, status, req, req, (req) + 16, wakeup)
@@ -701,6 +710,16 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	return error;
 }
 
+static const struct rockchip_domain_info rk3036_pm_domains[] = {
+	[RK3036_PD_MSCH]	= DOMAIN_RK3036(14, 23, 30, true),
+	[RK3036_PD_CORE]	= DOMAIN_RK3036(13, 17, 24, false),
+	[RK3036_PD_PERI]	= DOMAIN_RK3036(12, 18, 25, false),
+	[RK3036_PD_VIO]		= DOMAIN_RK3036(11, 19, 26, false),
+	[RK3036_PD_VPU]		= DOMAIN_RK3036(10, 20, 27, false),
+	[RK3036_PD_GPU]		= DOMAIN_RK3036(9, 21, 28, false),
+	[RK3036_PD_SYS]		= DOMAIN_RK3036(8, 22, 29, false),
+};
+
 static const struct rockchip_domain_info rk3288_pm_domains[] = {
 	[RK3288_PD_VIO]		= DOMAIN_RK3288(7, 7, 4, false),
 	[RK3288_PD_HEVC]	= DOMAIN_RK3288(14, 10, 9, false),
@@ -768,6 +787,15 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	[RK3399_PD_SDIOAUDIO]	= DOMAIN_RK3399(31, 31, 29, true),
 };
 
+static const struct rockchip_pmu_info rk3036_pmu = {
+	.req_offset = 0x148,
+	.idle_offset = 0x14c,
+	.ack_offset = 0x14c,
+
+	.num_domains = ARRAY_SIZE(rk3036_pm_domains),
+	.domain_info = rk3036_pm_domains,
+};
+
 static const struct rockchip_pmu_info rk3288_pmu = {
 	.pwr_offset = 0x08,
 	.status_offset = 0x0c,
@@ -843,6 +871,10 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 
 static const struct of_device_id rockchip_pm_domain_dt_match[] = {
 	{
+		.compatible = "rockchip,rk3036-power-controller",
+		.data = (void *)&rk3036_pmu,
+	},
+	{
 		.compatible = "rockchip,rk3288-power-controller",
 		.data = (void *)&rk3288_pmu,
 	},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 04/13] soc: rockchip: power-domain: Fix wrong value when power up pd
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (2 preceding siblings ...)
  2018-05-11  3:30 ` [PATCH v1 03/13] Soc: rockchip: power-domain: add power domain support for rk3036 Elaine Zhang
@ 2018-05-11  3:30 ` Elaine Zhang
  2018-05-12 14:11   ` Heiko Stuebner
  2018-05-11  3:32 ` [PATCH v1 05/13] dt-bindings: power: add RK3128 SoCs header for power-domain Elaine Zhang
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:30 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang, Finley Xiao

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
---
 drivers/soc/rockchip/pm_domains.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index ebd7c41898c0..01d4ba26a054 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -264,7 +264,7 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
 		return;
 	else if (pd->info->pwr_w_mask)
 		regmap_write(pmu->regmap, pmu->info->pwr_offset,
-			     on ? pd->info->pwr_mask :
+			     on ? pd->info->pwr_w_mask :
 			     (pd->info->pwr_mask | pd->info->pwr_w_mask));
 	else
 		regmap_update_bits(pmu->regmap, pmu->info->pwr_offset,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 05/13] dt-bindings: power: add RK3128 SoCs header for power-domain
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (3 preceding siblings ...)
  2018-05-11  3:30 ` [PATCH v1 04/13] soc: rockchip: power-domain: Fix wrong value when power up pd Elaine Zhang
@ 2018-05-11  3:32 ` Elaine Zhang
  2018-05-11  3:32 ` [PATCH v1 06/13] dt-bindings: add binding for rk3128 power domains Elaine Zhang
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:32 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, 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/rk3128-power.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 include/dt-bindings/power/rk3128-power.h

diff --git a/include/dt-bindings/power/rk3128-power.h b/include/dt-bindings/power/rk3128-power.h
new file mode 100644
index 000000000000..26aef519cd94
--- /dev/null
+++ b/include/dt-bindings/power/rk3128-power.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
+ * Author: Elaine Zhang <zhangqing@rock-chips.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __DT_BINDINGS_POWER_RK3128_POWER_H__
+#define __DT_BINDINGS_POWER_RK3128_POWER_H__
+
+/* VD_CORE */
+#define RK3128_PD_CORE		0
+
+/* VD_LOGIC */
+#define RK3128_PD_VIO		1
+#define RK3128_PD_VIDEO		2
+#define RK3128_PD_GPU		3
+#define RK3128_PD_MSCH		4
+
+#endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 06/13] dt-bindings: add binding for rk3128 power domains
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (4 preceding siblings ...)
  2018-05-11  3:32 ` [PATCH v1 05/13] dt-bindings: power: add RK3128 SoCs header for power-domain Elaine Zhang
@ 2018-05-11  3:32 ` Elaine Zhang
  2018-05-11  3:33 ` [PATCH v1 07/13] soc: rockchip: power-domain: add power domain support for rk3128 Elaine Zhang
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:32 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

Add binding documentation for the power domains
found on Rockchip RK3128 SoCs.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
index 79924ee9ae86..9a3f5fd36a80 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
@@ -6,6 +6,7 @@ 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,rk3036-power-controller" - for RK3036 SoCs.
+	"rockchip,rk3128-power-controller" - for RK3128 SoCs.
 	"rockchip,rk3288-power-controller" - for RK3288 SoCs.
 	"rockchip,rk3328-power-controller" - for RK3328 SoCs.
 	"rockchip,rk3366-power-controller" - for RK3366 SoCs.
@@ -19,6 +20,7 @@ Required properties for power domain controller:
 Required properties for power domain sub nodes:
 - reg: index of the power domain, should use macros in:
 	"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/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.
@@ -96,6 +98,7 @@ 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/rk3036-power.h" - for rk3036 type power domain.
+	"include/dt-bindings/power/rk3128-power.h" - for rk3128 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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 07/13] soc: rockchip: power-domain: add power domain support for rk3128
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (5 preceding siblings ...)
  2018-05-11  3:32 ` [PATCH v1 06/13] dt-bindings: add binding for rk3128 power domains Elaine Zhang
@ 2018-05-11  3:33 ` Elaine Zhang
  2018-05-11  3:33 ` [PATCH v1 08/13] dt-bindings: power: add RK3228 SoCs header for power-domain Elaine Zhang
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:33 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

This driver is modified to support RK3128 SoC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
 drivers/soc/rockchip/pm_domains.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 01d4ba26a054..99a2dd8a7801 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -19,6 +19,7 @@
 #include <linux/regmap.h>
 #include <linux/mfd/syscon.h>
 #include <dt-bindings/power/rk3036-power.h>
+#include <dt-bindings/power/rk3128-power.h>
 #include <dt-bindings/power/rk3288-power.h>
 #include <dt-bindings/power/rk3328-power.h>
 #include <dt-bindings/power/rk3366-power.h>
@@ -720,6 +721,14 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	[RK3036_PD_SYS]		= DOMAIN_RK3036(8, 22, 29, false),
 };
 
+static const struct rockchip_domain_info rk3128_pm_domains[] = {
+	[RK3128_PD_CORE]	= DOMAIN_RK3288(0, 0, 4, false),
+	[RK3128_PD_MSCH]	= DOMAIN_RK3288(-1, -1, 6, true),
+	[RK3128_PD_VIO]		= DOMAIN_RK3288(3, 3, 2, false),
+	[RK3128_PD_VIDEO]	= DOMAIN_RK3288(2, 2, 1, false),
+	[RK3128_PD_GPU]		= DOMAIN_RK3288(1, 1, 3, false),
+};
+
 static const struct rockchip_domain_info rk3288_pm_domains[] = {
 	[RK3288_PD_VIO]		= DOMAIN_RK3288(7, 7, 4, false),
 	[RK3288_PD_HEVC]	= DOMAIN_RK3288(14, 10, 9, false),
@@ -796,6 +805,17 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	.domain_info = rk3036_pm_domains,
 };
 
+static const struct rockchip_pmu_info rk3128_pmu = {
+	.pwr_offset = 0x04,
+	.status_offset = 0x08,
+	.req_offset = 0x0c,
+	.idle_offset = 0x10,
+	.ack_offset = 0x10,
+
+	.num_domains = ARRAY_SIZE(rk3128_pm_domains),
+	.domain_info = rk3128_pm_domains,
+};
+
 static const struct rockchip_pmu_info rk3288_pmu = {
 	.pwr_offset = 0x08,
 	.status_offset = 0x0c,
@@ -875,6 +895,10 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 		.data = (void *)&rk3036_pmu,
 	},
 	{
+		.compatible = "rockchip,rk3128-power-controller",
+		.data = (void *)&rk3128_pmu,
+	},
+	{
 		.compatible = "rockchip,rk3288-power-controller",
 		.data = (void *)&rk3288_pmu,
 	},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 08/13] dt-bindings: power: add RK3228 SoCs header for power-domain
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (6 preceding siblings ...)
  2018-05-11  3:33 ` [PATCH v1 07/13] soc: rockchip: power-domain: add power domain support for rk3128 Elaine Zhang
@ 2018-05-11  3:33 ` Elaine Zhang
  2018-05-11  3:33 ` [PATCH v1 09/13] dt-bindings: add binding for rk3228 power domains Elaine Zhang
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:33 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, 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/rk3228-power.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 include/dt-bindings/power/rk3228-power.h

diff --git a/include/dt-bindings/power/rk3228-power.h b/include/dt-bindings/power/rk3228-power.h
new file mode 100644
index 000000000000..fa1264d5a995
--- /dev/null
+++ b/include/dt-bindings/power/rk3228-power.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ */
+
+#ifndef __DT_BINDINGS_POWER_RK3228_POWER_H__
+#define __DT_BINDINGS_POWER_RK3228_POWER_H__
+
+/**
+ * RK3228 idle id Summary.
+ */
+
+#define RK3228_PD_CORE		0
+#define RK3228_PD_MSCH		1
+#define RK3228_PD_BUS		2
+#define RK3228_PD_SYS		3
+#define RK3228_PD_VIO		4
+#define RK3228_PD_VOP		5
+#define RK3228_PD_VPU		6
+#define RK3228_PD_RKVDEC	7
+#define RK3228_PD_GPU		8
+#define RK3228_PD_PERI		9
+#define RK3228_PD_GMAC		10
+
+#endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 09/13] dt-bindings: add binding for rk3228 power domains
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (7 preceding siblings ...)
  2018-05-11  3:33 ` [PATCH v1 08/13] dt-bindings: power: add RK3228 SoCs header for power-domain Elaine Zhang
@ 2018-05-11  3:33 ` Elaine Zhang
  2018-05-11  3:34 ` [PATCH v1 10/13] soc: rockchip: power-domain: add power domain support for rk3228 Elaine Zhang
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:33 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

Add binding documentation for the power domains
found on Rockchip RK3228 SoCs.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
index 9a3f5fd36a80..affe36dcfa17 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
@@ -7,6 +7,7 @@ Required properties for power domain controller:
 - compatible: Should be one of the following.
 	"rockchip,rk3036-power-controller" - for RK3036 SoCs.
 	"rockchip,rk3128-power-controller" - for RK3128 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.
@@ -21,6 +22,7 @@ Required properties for power domain sub nodes:
 - reg: index of the power domain, should use macros in:
 	"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/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.
@@ -99,6 +101,7 @@ power domain to use.
 The index should use macros in:
 	"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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 10/13] soc: rockchip: power-domain: add power domain support for rk3228
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (8 preceding siblings ...)
  2018-05-11  3:33 ` [PATCH v1 09/13] dt-bindings: add binding for rk3228 power domains Elaine Zhang
@ 2018-05-11  3:34 ` Elaine Zhang
  2018-05-11  3:34 ` [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain Elaine Zhang
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:34 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang

This driver is modified to support RK3228 SoC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
---
 drivers/soc/rockchip/pm_domains.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 99a2dd8a7801..90dcd5e21ae6 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -20,6 +20,7 @@
 #include <linux/mfd/syscon.h>
 #include <dt-bindings/power/rk3036-power.h>
 #include <dt-bindings/power/rk3128-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>
@@ -729,6 +730,20 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	[RK3128_PD_GPU]		= DOMAIN_RK3288(1, 1, 3, false),
 };
 
+static const struct rockchip_domain_info rk3228_pm_domains[] = {
+	[RK3228_PD_CORE]	= DOMAIN_RK3036(0, 0, 16, true),
+	[RK3228_PD_MSCH]	= DOMAIN_RK3036(1, 1, 17, true),
+	[RK3228_PD_BUS]		= DOMAIN_RK3036(2, 2, 18, true),
+	[RK3228_PD_SYS]		= DOMAIN_RK3036(3, 3, 19, true),
+	[RK3228_PD_VIO]		= DOMAIN_RK3036(4, 4, 20, false),
+	[RK3228_PD_VOP]		= DOMAIN_RK3036(5, 5, 21, false),
+	[RK3228_PD_VPU]		= DOMAIN_RK3036(6, 6, 22, false),
+	[RK3228_PD_RKVDEC]	= DOMAIN_RK3036(7, 7, 23, false),
+	[RK3228_PD_GPU]		= DOMAIN_RK3036(8, 8, 24, false),
+	[RK3228_PD_PERI]	= DOMAIN_RK3036(9, 9, 25, true),
+	[RK3228_PD_GMAC]	= DOMAIN_RK3036(10, 10, 26, false),
+};
+
 static const struct rockchip_domain_info rk3288_pm_domains[] = {
 	[RK3288_PD_VIO]		= DOMAIN_RK3288(7, 7, 4, false),
 	[RK3288_PD_HEVC]	= DOMAIN_RK3288(14, 10, 9, false),
@@ -816,6 +831,15 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	.domain_info = rk3128_pm_domains,
 };
 
+static const struct rockchip_pmu_info rk3228_pmu = {
+	.req_offset = 0x40c,
+	.idle_offset = 0x488,
+	.ack_offset = 0x488,
+
+	.num_domains = ARRAY_SIZE(rk3228_pm_domains),
+	.domain_info = rk3228_pm_domains,
+};
+
 static const struct rockchip_pmu_info rk3288_pmu = {
 	.pwr_offset = 0x08,
 	.status_offset = 0x0c,
@@ -899,6 +923,10 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 		.data = (void *)&rk3128_pmu,
 	},
 	{
+		.compatible = "rockchip,rk3228-power-controller",
+		.data = (void *)&rk3228_pmu,
+	},
+	{
 		.compatible = "rockchip,rk3288-power-controller",
 		.data = (void *)&rk3288_pmu,
 	},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (9 preceding siblings ...)
  2018-05-11  3:34 ` [PATCH v1 10/13] soc: rockchip: power-domain: add power domain support for rk3228 Elaine Zhang
@ 2018-05-11  3:34 ` Elaine Zhang
  2018-05-11 22:11   ` Heiko Stuebner
  2018-05-11  3:34 ` [PATCH v1 12/13] dt-bindings: add binding for px30 power domains Elaine Zhang
  2018-05-11  3:35 ` [PATCH v1 13/13] soc: rockchip: power-domain: add power domain support for px30 Elaine Zhang
  12 siblings, 1 reply; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:34 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang, Finley Xiao

According to a description from TRM, add all the power domains.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
---
 include/dt-bindings/power/px30-power.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 include/dt-bindings/power/px30-power.h

diff --git a/include/dt-bindings/power/px30-power.h b/include/dt-bindings/power/px30-power.h
new file mode 100644
index 000000000000..4ed482e80950
--- /dev/null
+++ b/include/dt-bindings/power/px30-power.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+ */
+
+#ifndef __DT_BINDINGS_POWER_PX30_POWER_H__
+#define __DT_BINDINGS_POWER_PX30_POWER_H__
+
+/* VD_CORE */
+#define PX30_PD_A35_0		0
+#define PX30_PD_A35_1		1
+#define PX30_PD_A35_2		2
+#define PX30_PD_A35_3		3
+#define PX30_PD_SCU		4
+
+/* VD_LOGIC */
+#define PX30_PD_USB		5
+#define PX30_PD_DDR		6
+#define PX30_PD_SDCARD		7
+#define PX30_PD_CRYPTO		8
+#define PX30_PD_GMAC		9
+#define PX30_PD_MMC_NAND	10
+#define PX30_PD_VPU		11
+#define PX30_PD_VO		12
+#define PX30_PD_VI		13
+#define PX30_PD_GPU		14
+
+/* VD_PMU */
+#define PX30_PD_PMU		15
+
+#endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 12/13] dt-bindings: add binding for px30 power domains
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (10 preceding siblings ...)
  2018-05-11  3:34 ` [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain Elaine Zhang
@ 2018-05-11  3:34 ` Elaine Zhang
  2018-05-11  3:35 ` [PATCH v1 13/13] soc: rockchip: power-domain: add power domain support for px30 Elaine Zhang
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:34 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang, Finley Xiao

Add binding documentation for the power domains
found on Rockchip PX30 SoCs.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
---
 Documentation/devicetree/bindings/soc/rockchip/power_domain.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
index affe36dcfa17..5d49d0a2ff29 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
+++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
@@ -5,6 +5,7 @@ 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,rk3128-power-controller" - for RK3128 SoCs.
 	"rockchip,rk3228-power-controller" - for RK3228 SoCs.
@@ -20,6 +21,7 @@ Required properties for power domain controller:
 
 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/rk3128-power.h" - for RK3128 type power domain.
 	"include/dt-bindings/power/rk3228-power.h" - for RK3228 type power domain.
@@ -99,6 +101,7 @@ 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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 13/13] soc: rockchip: power-domain: add power domain support for px30
  2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
                   ` (11 preceding siblings ...)
  2018-05-11  3:34 ` [PATCH v1 12/13] dt-bindings: add binding for px30 power domains Elaine Zhang
@ 2018-05-11  3:35 ` Elaine Zhang
  12 siblings, 0 replies; 18+ messages in thread
From: Elaine Zhang @ 2018-05-11  3:35 UTC (permalink / raw)
  To: heiko, robh+dt, mark.rutland
  Cc: devicetree, rjw, khilman, ulf.hansson, linux-pm,
	linux-arm-kernel, linux-rockchip, linux-kernel, wxt, xxx, xf,
	huangtao, Elaine Zhang, Finley Xiao

This driver is modified to support PX30 SoC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
---
 drivers/soc/rockchip/pm_domains.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 90dcd5e21ae6..d0c5615132e3 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -18,6 +18,7 @@
 #include <linux/clk.h>
 #include <linux/regmap.h>
 #include <linux/mfd/syscon.h>
+#include <dt-bindings/power/px30-power.h>
 #include <dt-bindings/power/rk3036-power.h>
 #include <dt-bindings/power/rk3128-power.h>
 #include <dt-bindings/power/rk3228-power.h>
@@ -114,6 +115,9 @@ struct rockchip_pmu {
 	.active_wakeup = wakeup,			\
 }
 
+#define DOMAIN_PX30(pwr, status, req, wakeup)		\
+	DOMAIN_M(pwr, status, req, (req) + 16, req, wakeup)
+
 #define DOMAIN_RK3288(pwr, status, req, wakeup)		\
 	DOMAIN(pwr, status, req, req, (req) + 16, wakeup)
 
@@ -712,6 +716,17 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	return error;
 }
 
+static const struct rockchip_domain_info px30_pm_domains[] = {
+	[PX30_PD_USB]		= DOMAIN_PX30(5, 5, 10, false),
+	[PX30_PD_SDCARD]	= DOMAIN_PX30(8, 8, 9, false),
+	[PX30_PD_GMAC]		= DOMAIN_PX30(10, 10, 6, false),
+	[PX30_PD_MMC_NAND]	= DOMAIN_PX30(11, 11, 5, false),
+	[PX30_PD_VPU]		= DOMAIN_PX30(12, 12, 14, false),
+	[PX30_PD_VO]		= DOMAIN_PX30(13, 13, 7, false),
+	[PX30_PD_VI]		= DOMAIN_PX30(14, 14, 8, false),
+	[PX30_PD_GPU]		= DOMAIN_PX30(15, 15, 2, false),
+};
+
 static const struct rockchip_domain_info rk3036_pm_domains[] = {
 	[RK3036_PD_MSCH]	= DOMAIN_RK3036(14, 23, 30, true),
 	[RK3036_PD_CORE]	= DOMAIN_RK3036(13, 17, 24, false),
@@ -811,6 +826,17 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	[RK3399_PD_SDIOAUDIO]	= DOMAIN_RK3399(31, 31, 29, true),
 };
 
+static const struct rockchip_pmu_info px30_pmu = {
+	.pwr_offset = 0x18,
+	.status_offset = 0x20,
+	.req_offset = 0x64,
+	.idle_offset = 0x6c,
+	.ack_offset = 0x6c,
+
+	.num_domains = ARRAY_SIZE(px30_pm_domains),
+	.domain_info = px30_pm_domains,
+};
+
 static const struct rockchip_pmu_info rk3036_pmu = {
 	.req_offset = 0x148,
 	.idle_offset = 0x14c,
@@ -915,6 +941,10 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 
 static const struct of_device_id rockchip_pm_domain_dt_match[] = {
 	{
+		.compatible = "rockchip,px30-power-controller",
+		.data = (void *)&px30_pmu,
+	},
+	{
 		.compatible = "rockchip,rk3036-power-controller",
 		.data = (void *)&rk3036_pmu,
 	},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain
  2018-05-11  3:34 ` [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain Elaine Zhang
@ 2018-05-11 22:11   ` Heiko Stuebner
  2018-05-13 15:18     ` Tao Huang
  0 siblings, 1 reply; 18+ messages in thread
From: Heiko Stuebner @ 2018-05-11 22:11 UTC (permalink / raw)
  To: Elaine Zhang
  Cc: robh+dt, mark.rutland, devicetree, rjw, khilman, ulf.hansson,
	linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, wxt,
	xxx, xf, huangtao, Finley Xiao

Hi Elaine,


Am Freitag, 11. Mai 2018, 05:34:32 CEST schrieb Elaine Zhang:
> According to a description from TRM, add all the power domains.
> 
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>

that's a bit ambigous, having the Signed-offs like above.

Either you are the author+sender of the patch, then Finley's
Signed-off should go away ... or Finley is the author and you
are the sender, then the author of the patch should be set
correctly (--author option for git) and the Signed-offs should
switch places (= Finley first, then yours). Please fix.

This seems to be true for most patches in this series.

> ---
>  include/dt-bindings/power/px30-power.h | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 include/dt-bindings/power/px30-power.h
> 
> diff --git a/include/dt-bindings/power/px30-power.h b/include/dt-bindings/power/px30-power.h
> new file mode 100644
> index 000000000000..4ed482e80950
> --- /dev/null
> +++ b/include/dt-bindings/power/px30-power.h

Here I have a naming question. When looking at the vendor kernel
it looks like the px30 is largely related to the rk3326.
(rk3326.dtsi includeing the px30.dtsi)

What is the reason for basing the naming on the px30 this time? And could
we possibly keep to rkXXXX names for the basic things in the kernel, thus
keeping the pxXX as second name, like with the other px-variants before?


Thanks
Heiko

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 04/13] soc: rockchip: power-domain: Fix wrong value when power up pd
  2018-05-11  3:30 ` [PATCH v1 04/13] soc: rockchip: power-domain: Fix wrong value when power up pd Elaine Zhang
@ 2018-05-12 14:11   ` Heiko Stuebner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-05-12 14:11 UTC (permalink / raw)
  To: Elaine Zhang
  Cc: robh+dt, mark.rutland, devicetree, rjw, khilman, ulf.hansson,
	linux-pm, linux-arm-kernel, linux-rockchip, linux-kernel, wxt,
	xxx, xf, huangtao, Finley Xiao

Hi Elaine,

Am Freitag, 11. Mai 2018, 05:30:49 CEST schrieb Elaine Zhang:

please provide a patch description. This seems to affect rk3328
alone right now, but seems that rk3328 could only ever turn off
power-domains but never turn them on again, right?

Authorship comment from my previous comment applies here
as well.

And please add a

Fixes: 9bb17ce8edb3 ("soc: rockchip: power-domain: Support domain control in hiword-registers")
Cc: stable@vger.kernel.org

to the patch description.


Thanks
Heiko

> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
> ---
>  drivers/soc/rockchip/pm_domains.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
> index ebd7c41898c0..01d4ba26a054 100644
> --- a/drivers/soc/rockchip/pm_domains.c
> +++ b/drivers/soc/rockchip/pm_domains.c
> @@ -264,7 +264,7 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
>  		return;
>  	else if (pd->info->pwr_w_mask)
>  		regmap_write(pmu->regmap, pmu->info->pwr_offset,
> -			     on ? pd->info->pwr_mask :
> +			     on ? pd->info->pwr_w_mask :
>  			     (pd->info->pwr_mask | pd->info->pwr_w_mask));
>  	else
>  		regmap_update_bits(pmu->regmap, pmu->info->pwr_offset,
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain
  2018-05-11 22:11   ` Heiko Stuebner
@ 2018-05-13 15:18     ` Tao Huang
  2018-05-13 20:53       ` Heiko Stübner
  0 siblings, 1 reply; 18+ messages in thread
From: Tao Huang @ 2018-05-13 15:18 UTC (permalink / raw)
  To: Heiko Stuebner, Elaine Zhang
  Cc: mark.rutland, devicetree, ulf.hansson, khilman, xxx, linux-pm,
	rjw, linux-kernel, xf, linux-rockchip, robh+dt, Finley Xiao,
	linux-arm-kernel, wxt

Hi Heiko:
On 2018年05月12日 06:11, Heiko Stuebner wrote:
> Here I have a naming question. When looking at the vendor kernel
> it looks like the px30 is largely related to the rk3326.
> (rk3326.dtsi includeing the px30.dtsi)
>
> What is the reason for basing the naming on the px30 this time? And could
> we possibly keep to rkXXXX names for the basic things in the kernel, thus
> keeping the pxXX as second name, like with the other px-variants before?
>
PX30 and RK3326 are different chips. PX30 has more features. You can simply think that RK3326 is a subset of PX30. The RK3326 is more like a PX30 derivative chip. This is not the same as the previous chips.
So we use PX30 instead of RK3326 for name, and the opening document is only for PX30, we think this is more convenient for developers.

Best Regards,
Tao Huang

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain
  2018-05-13 15:18     ` Tao Huang
@ 2018-05-13 20:53       ` Heiko Stübner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stübner @ 2018-05-13 20:53 UTC (permalink / raw)
  To: Tao Huang
  Cc: Elaine Zhang, mark.rutland, devicetree, ulf.hansson, khilman,
	xxx, linux-pm, rjw, linux-kernel, xf, linux-rockchip, robh+dt,
	Finley Xiao, linux-arm-kernel, wxt

Hi,

Am Sonntag, 13. Mai 2018, 17:18:12 CEST schrieb Tao Huang:
> Hi Heiko:
> 
> On 2018年05月12日 06:11, Heiko Stuebner wrote:
> > Here I have a naming question. When looking at the vendor kernel
> > it looks like the px30 is largely related to the rk3326.
> > (rk3326.dtsi includeing the px30.dtsi)
> > 
> > What is the reason for basing the naming on the px30 this time? And could
> > we possibly keep to rkXXXX names for the basic things in the kernel, thus
> > keeping the pxXX as second name, like with the other px-variants before?
> 
> PX30 and RK3326 are different chips. PX30 has more features. You can simply
> think that RK3326 is a subset of PX30. The RK3326 is more like a PX30
> derivative chip. This is not the same as the previous chips. So we use PX30
> instead of RK3326 for name, and the opening document is only for PX30, we
> think this is more convenient for developers.

ok, sounds reasonable :-) ... So we'll stay with the PX30.


Heiko

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-05-13 20:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11  3:30 [PATCH v1 00/13] add power domain support for Rockchip Socs Elaine Zhang
2018-05-11  3:30 ` [PATCH v1 01/13] dt-bindings: power: add RK3036 SoCs header for power-domain Elaine Zhang
2018-05-11  3:30 ` [PATCH v1 02/13] dt-bindings: add binding for rk3036 power domains Elaine Zhang
2018-05-11  3:30 ` [PATCH v1 03/13] Soc: rockchip: power-domain: add power domain support for rk3036 Elaine Zhang
2018-05-11  3:30 ` [PATCH v1 04/13] soc: rockchip: power-domain: Fix wrong value when power up pd Elaine Zhang
2018-05-12 14:11   ` Heiko Stuebner
2018-05-11  3:32 ` [PATCH v1 05/13] dt-bindings: power: add RK3128 SoCs header for power-domain Elaine Zhang
2018-05-11  3:32 ` [PATCH v1 06/13] dt-bindings: add binding for rk3128 power domains Elaine Zhang
2018-05-11  3:33 ` [PATCH v1 07/13] soc: rockchip: power-domain: add power domain support for rk3128 Elaine Zhang
2018-05-11  3:33 ` [PATCH v1 08/13] dt-bindings: power: add RK3228 SoCs header for power-domain Elaine Zhang
2018-05-11  3:33 ` [PATCH v1 09/13] dt-bindings: add binding for rk3228 power domains Elaine Zhang
2018-05-11  3:34 ` [PATCH v1 10/13] soc: rockchip: power-domain: add power domain support for rk3228 Elaine Zhang
2018-05-11  3:34 ` [PATCH v1 11/13] dt-bindings: power: add PX30 SoCs header for power-domain Elaine Zhang
2018-05-11 22:11   ` Heiko Stuebner
2018-05-13 15:18     ` Tao Huang
2018-05-13 20:53       ` Heiko Stübner
2018-05-11  3:34 ` [PATCH v1 12/13] dt-bindings: add binding for px30 power domains Elaine Zhang
2018-05-11  3:35 ` [PATCH v1 13/13] soc: rockchip: power-domain: add power domain support for px30 Elaine Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).