Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] allwinner: a733: Add A733 PCK600 Power Domain Controller Support
@ 2026-03-04  3:43 Yuanshen Cao
  2026-03-04  3:43 ` [PATCH 1/2] dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller Yuanshen Cao
  2026-03-04  3:43 ` [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver Yuanshen Cao
  0 siblings, 2 replies; 7+ messages in thread
From: Yuanshen Cao @ 2026-03-04  3:43 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ulf Hansson
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, linux-pm,
	Yuanshen Cao

Hi everyone,

This series is to introduce Allwinner A733 PCK600 Power Domain
Controller.

Allwinner A733 has this one power domain controller, PCK600, which
shares the same BSP drivers according to the package provided by 
Radxa[1]. Unlike A523, A733 does not require the resets. Apart 
from that, driver wise, everything else is the same. 

Add support for A733 power domain controller by making resets optional
on sun55i-pck600 driver, adding A733 sunxi_pck600_desc and dt-bindings 
definitions.
Tested on Radxa Cubie A7Z.

[1] https://github.com/radxa/allwinner-bsp

Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
---
Yuanshen Cao (2):
      dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller
      pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver

 .../bindings/power/allwinner,sun20i-d1-ppu.yaml    | 17 ++++++-
 drivers/pmdomain/sunxi/sun55i-pck600.c             | 53 ++++++++++++++++++++--
 .../power/allwinner,sun60i-a733-pck-600.h          | 18 ++++++++
 3 files changed, 82 insertions(+), 6 deletions(-)
---
base-commit: 0031c06807cfa8aa51a759ff8aa09e1aa48149af
change-id: 20260304-b4-pck600-a733-1790e0e48d49

Best regards,
-- 
Yuanshen Cao <alex.caoys@gmail.com>



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

* [PATCH 1/2] dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller
  2026-03-04  3:43 [PATCH 0/2] allwinner: a733: Add A733 PCK600 Power Domain Controller Support Yuanshen Cao
@ 2026-03-04  3:43 ` Yuanshen Cao
  2026-03-04 11:36   ` Krzysztof Kozlowski
  2026-03-04  3:43 ` [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver Yuanshen Cao
  1 sibling, 1 reply; 7+ messages in thread
From: Yuanshen Cao @ 2026-03-04  3:43 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ulf Hansson
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, linux-pm,
	Yuanshen Cao

The A733 PCK600, similar to A523 PCK600, is likely a customized version
of ARM PCK-600 power controller. They share the same BSP drivers in the
package provided by Radxa, with the only difference being the lack of
resets.

Therefore, document A733 compatible and make resets required only for
the other models, as well as prepare the PD definitions for future
device trees.

Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
---
 .../bindings/power/allwinner,sun20i-d1-ppu.yaml        | 17 ++++++++++++++++-
 .../dt-bindings/power/allwinner,sun60i-a733-pck-600.h  | 18 ++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml
index a28e75a9cb6a..b97361ce2a00 100644
--- a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml
+++ b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml
@@ -20,6 +20,7 @@ properties:
       - allwinner,sun20i-d1-ppu
       - allwinner,sun55i-a523-pck-600
       - allwinner,sun55i-a523-ppu
+      - allwinner,sun60i-a733-pck-600
 
   reg:
     maxItems: 1
@@ -38,9 +39,23 @@ required:
   - compatible
   - reg
   - clocks
-  - resets
   - '#power-domain-cells'
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - allwinner,sun8i-v853-ppu
+              - allwinner,sun20i-d1-ppu
+              - allwinner,sun55i-a523-pck-600
+              - allwinner,sun55i-a523-ppu
+
+    then:
+      required:
+        - resets
+
 additionalProperties: false
 
 examples:
diff --git a/include/dt-bindings/power/allwinner,sun60i-a733-pck-600.h b/include/dt-bindings/power/allwinner,sun60i-a733-pck-600.h
new file mode 100644
index 000000000000..cf476a005b55
--- /dev/null
+++ b/include/dt-bindings/power/allwinner,sun60i-a733-pck-600.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef _DT_BINDINGS_POWER_SUN60I_A733_PCK600_H_
+#define _DT_BINDINGS_POWER_SUN60I_A733_PCK600_H_
+
+#define PD_VI			0
+#define PD_DE_SYS		1
+#define PD_VE_DEC		2
+#define PD_VE_ENC		3
+#define PD_NPU			4
+#define PD_GPU_TOP		5
+#define PD_GPU_CORE		6
+#define PD_PCIE			7
+#define PD_USB2			8
+#define PD_VO			9
+#define PD_VO1			10
+
+#endif /* _DT_BINDINGS_POWER_SUN60I_A733_PCK600_H_ */

-- 
2.53.0



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

* [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver
  2026-03-04  3:43 [PATCH 0/2] allwinner: a733: Add A733 PCK600 Power Domain Controller Support Yuanshen Cao
  2026-03-04  3:43 ` [PATCH 1/2] dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller Yuanshen Cao
@ 2026-03-04  3:43 ` Yuanshen Cao
  2026-03-04 13:33   ` Chen-Yu Tsai
  1 sibling, 1 reply; 7+ messages in thread
From: Yuanshen Cao @ 2026-03-04  3:43 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ulf Hansson
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, linux-pm,
	Yuanshen Cao

The Allwinner A733 PCK600, similar to A523 PCK600, is likely a
customized version of ARM PCK-600 power controller. It shares
the same BSP driver with A523. According to the BSP provided
by Radxa, unlike A523, it doesn't require reset.

Make reset optional in the sunxi pck600 driver and add support
for A733.

Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
---
 drivers/pmdomain/sunxi/sun55i-pck600.c | 53 ++++++++++++++++++++++++++++++----
 1 file changed, 48 insertions(+), 5 deletions(-)

diff --git a/drivers/pmdomain/sunxi/sun55i-pck600.c b/drivers/pmdomain/sunxi/sun55i-pck600.c
index c7ab51514531..8f9fdc3915bd 100644
--- a/drivers/pmdomain/sunxi/sun55i-pck600.c
+++ b/drivers/pmdomain/sunxi/sun55i-pck600.c
@@ -52,6 +52,7 @@ struct sunxi_pck600_desc {
 	u32 logic_power_switch0_delay;
 	u32 logic_power_switch1_delay;
 	u32 off2on_delay;
+	bool has_rst_clk;
 };
 
 struct sunxi_pck600_pd {
@@ -151,9 +152,11 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-	rst = devm_reset_control_get_exclusive_released(dev, NULL);
-	if (IS_ERR(rst))
-		return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
+	if (desc->has_rst_clk) {
+		rst = devm_reset_control_get_exclusive_released(dev, NULL);
+		if (IS_ERR(rst))
+			return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
+	}
 
 	clk = devm_clk_get_enabled(dev, NULL);
 	if (IS_ERR(clk))
@@ -193,7 +196,14 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
 }
 
 static const char * const sun55i_a523_pck600_pd_names[] = {
-	"VE", "GPU", "VI", "VO0", "VO1", "DE", "NAND", "PCIE"
+	"VE",
+	"GPU",
+	"VI",
+	"VO0",
+	"VO1",
+	"DE",
+	"NAND",
+	"PCIE",
 };
 
 static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
@@ -206,7 +216,36 @@ static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
 	.device_ctrl1_delay = 0xffff,
 	.logic_power_switch0_delay = 0x8080808,
 	.logic_power_switch1_delay = 0x808,
-	.off2on_delay = 0x8
+	.off2on_delay = 0x8,
+	.has_rst_clk = true,
+};
+
+static const char * const sun60i_a733_pck600_pd_names[] = {
+	"VI",
+	"DE_SYS",
+	"VE_DEC",
+	"VE_ENC",
+	"NPU",
+	"GPU_TOP",
+	"GPU_CORE",
+	"PCIE",
+	"USB2",
+	"VO",
+	"VO1",
+};
+
+static const struct sunxi_pck600_desc sun60i_a733_pck600_desc = {
+	.pd_names = sun60i_a733_pck600_pd_names,
+	.num_domains = ARRAY_SIZE(sun60i_a733_pck600_pd_names),
+	.logic_power_switch0_delay_offset = 0xc00,
+	.logic_power_switch1_delay_offset = 0xc04,
+	.off2on_delay_offset = 0xc10,
+	.device_ctrl0_delay = 0x1f1f1f,
+	.device_ctrl1_delay = 0x1f1f,
+	.logic_power_switch0_delay = 0x8080808,
+	.logic_power_switch1_delay = 0x808,
+	.off2on_delay = 0x8,
+	.has_rst_clk = false,
 };
 
 static const struct of_device_id sunxi_pck600_of_match[] = {
@@ -214,6 +253,10 @@ static const struct of_device_id sunxi_pck600_of_match[] = {
 		.compatible	= "allwinner,sun55i-a523-pck-600",
 		.data		= &sun55i_a523_pck600_desc,
 	},
+	{
+		.compatible	= "allwinner,sun60i-a733-pck-600",
+		.data		= &sun60i_a733_pck600_desc,
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, sunxi_pck600_of_match);

-- 
2.53.0



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

* Re: [PATCH 1/2] dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller
  2026-03-04  3:43 ` [PATCH 1/2] dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller Yuanshen Cao
@ 2026-03-04 11:36   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-04 11:36 UTC (permalink / raw)
  To: Yuanshen Cao
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Ulf Hansson, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel, linux-pm

On Wed, Mar 04, 2026 at 03:43:44AM +0000, Yuanshen Cao wrote:
> The A733 PCK600, similar to A523 PCK600, is likely a customized version
> of ARM PCK-600 power controller. They share the same BSP drivers in the
> package provided by Radxa, with the only difference being the lack of
> resets.
> 
> Therefore, document A733 compatible and make resets required only for
> the other models, as well as prepare the PD definitions for future
> device trees.
> 
> Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
> ---
>  .../bindings/power/allwinner,sun20i-d1-ppu.yaml        | 17 ++++++++++++++++-
>  .../dt-bindings/power/allwinner,sun60i-a733-pck-600.h  | 18 ++++++++++++++++++
>  2 files changed, 34 insertions(+), 1 deletion(-)

Thanks for the patch, nice explanation.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof



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

* Re: [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver
  2026-03-04  3:43 ` [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver Yuanshen Cao
@ 2026-03-04 13:33   ` Chen-Yu Tsai
  2026-03-05  0:15     ` Yuanshen Cao
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2026-03-04 13:33 UTC (permalink / raw)
  To: Yuanshen Cao
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Ulf Hansson, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, linux-pm

On Wed, Mar 4, 2026 at 12:44 PM Yuanshen Cao <alex.caoys@gmail.com> wrote:
>
> The Allwinner A733 PCK600, similar to A523 PCK600, is likely a
> customized version of ARM PCK-600 power controller. It shares
> the same BSP driver with A523. According to the BSP provided
> by Radxa, unlike A523, it doesn't require reset.
>
> Make reset optional in the sunxi pck600 driver and add support
> for A733.
>
> Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
> ---
>  drivers/pmdomain/sunxi/sun55i-pck600.c | 53 ++++++++++++++++++++++++++++++----
>  1 file changed, 48 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pmdomain/sunxi/sun55i-pck600.c b/drivers/pmdomain/sunxi/sun55i-pck600.c
> index c7ab51514531..8f9fdc3915bd 100644
> --- a/drivers/pmdomain/sunxi/sun55i-pck600.c
> +++ b/drivers/pmdomain/sunxi/sun55i-pck600.c
> @@ -52,6 +52,7 @@ struct sunxi_pck600_desc {
>         u32 logic_power_switch0_delay;
>         u32 logic_power_switch1_delay;
>         u32 off2on_delay;
> +       bool has_rst_clk;
>  };
>
>  struct sunxi_pck600_pd {
> @@ -151,9 +152,11 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
>         if (IS_ERR(base))
>                 return PTR_ERR(base);
>
> -       rst = devm_reset_control_get_exclusive_released(dev, NULL);
> -       if (IS_ERR(rst))
> -               return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
> +       if (desc->has_rst_clk) {
> +               rst = devm_reset_control_get_exclusive_released(dev, NULL);
> +               if (IS_ERR(rst))
> +                       return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
> +       }
>
>         clk = devm_clk_get_enabled(dev, NULL);
>         if (IS_ERR(clk))
> @@ -193,7 +196,14 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
>  }
>
>  static const char * const sun55i_a523_pck600_pd_names[] = {
> -       "VE", "GPU", "VI", "VO0", "VO1", "DE", "NAND", "PCIE"
> +       "VE",
> +       "GPU",
> +       "VI",
> +       "VO0",
> +       "VO1",
> +       "DE",
> +       "NAND",
> +       "PCIE",

No need to change this part.

>  };
>
>  static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
> @@ -206,7 +216,36 @@ static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
>         .device_ctrl1_delay = 0xffff,
>         .logic_power_switch0_delay = 0x8080808,
>         .logic_power_switch1_delay = 0x808,
> -       .off2on_delay = 0x8
> +       .off2on_delay = 0x8,
> +       .has_rst_clk = true,
> +};
> +
> +static const char * const sun60i_a733_pck600_pd_names[] = {
> +       "VI",
> +       "DE_SYS",
> +       "VE_DEC",
> +       "VE_ENC",
> +       "NPU",
> +       "GPU_TOP",
> +       "GPU_CORE",
> +       "PCIE",
> +       "USB2",
> +       "VO",
> +       "VO1",
> +};
> +
> +static const struct sunxi_pck600_desc sun60i_a733_pck600_desc = {
> +       .pd_names = sun60i_a733_pck600_pd_names,
> +       .num_domains = ARRAY_SIZE(sun60i_a733_pck600_pd_names),
> +       .logic_power_switch0_delay_offset = 0xc00,
> +       .logic_power_switch1_delay_offset = 0xc04,
> +       .off2on_delay_offset = 0xc10,
> +       .device_ctrl0_delay = 0x1f1f1f,
> +       .device_ctrl1_delay = 0x1f1f,
> +       .logic_power_switch0_delay = 0x8080808,
> +       .logic_power_switch1_delay = 0x808,
> +       .off2on_delay = 0x8,
> +       .has_rst_clk = false,
>  };
>
>  static const struct of_device_id sunxi_pck600_of_match[] = {
> @@ -214,6 +253,10 @@ static const struct of_device_id sunxi_pck600_of_match[] = {
>                 .compatible     = "allwinner,sun55i-a523-pck-600",
>                 .data           = &sun55i_a523_pck600_desc,
>         },
> +       {
> +               .compatible     = "allwinner,sun60i-a733-pck-600",
> +               .data           = &sun60i_a733_pck600_desc,
> +       },
>         {}
>  };
>  MODULE_DEVICE_TABLE(of, sunxi_pck600_of_match);
>
> --
> 2.53.0
>


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

* Re: [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver
  2026-03-04 13:33   ` Chen-Yu Tsai
@ 2026-03-05  0:15     ` Yuanshen Cao
  2026-03-05  2:52       ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Yuanshen Cao @ 2026-03-05  0:15 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Ulf Hansson, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, linux-pm

On Wed, Mar 04, 2026 at 10:33:23PM +0900, Chen-Yu Tsai wrote:
> On Wed, Mar 4, 2026 at 12:44 PM Yuanshen Cao <alex.caoys@gmail.com> wrote:
> >
> > The Allwinner A733 PCK600, similar to A523 PCK600, is likely a
> > customized version of ARM PCK-600 power controller. It shares
> > the same BSP driver with A523. According to the BSP provided
> > by Radxa, unlike A523, it doesn't require reset.
> >
> > Make reset optional in the sunxi pck600 driver and add support
> > for A733.
> >
> > Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
> > ---
> >  drivers/pmdomain/sunxi/sun55i-pck600.c | 53 ++++++++++++++++++++++++++++++----
> >  1 file changed, 48 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/pmdomain/sunxi/sun55i-pck600.c b/drivers/pmdomain/sunxi/sun55i-pck600.c
> > index c7ab51514531..8f9fdc3915bd 100644
> > --- a/drivers/pmdomain/sunxi/sun55i-pck600.c
> > +++ b/drivers/pmdomain/sunxi/sun55i-pck600.c
> > @@ -52,6 +52,7 @@ struct sunxi_pck600_desc {
> >         u32 logic_power_switch0_delay;
> >         u32 logic_power_switch1_delay;
> >         u32 off2on_delay;
> > +       bool has_rst_clk;
> >  };
> >
> >  struct sunxi_pck600_pd {
> > @@ -151,9 +152,11 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
> >         if (IS_ERR(base))
> >                 return PTR_ERR(base);
> >
> > -       rst = devm_reset_control_get_exclusive_released(dev, NULL);
> > -       if (IS_ERR(rst))
> > -               return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
> > +       if (desc->has_rst_clk) {
> > +               rst = devm_reset_control_get_exclusive_released(dev, NULL);
> > +               if (IS_ERR(rst))
> > +                       return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
> > +       }
> >
> >         clk = devm_clk_get_enabled(dev, NULL);
> >         if (IS_ERR(clk))
> > @@ -193,7 +196,14 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
> >  }
> >
> >  static const char * const sun55i_a523_pck600_pd_names[] = {
> > -       "VE", "GPU", "VI", "VO0", "VO1", "DE", "NAND", "PCIE"
> > +       "VE",
> > +       "GPU",
> > +       "VI",
> > +       "VO0",
> > +       "VO1",
> > +       "DE",
> > +       "NAND",
> > +       "PCIE",
> 
> No need to change this part.
> 

Yes, I agree. But since A733 has more pd_names, that line will be too
long if we stick with one line. And we also used this format in
sun20i-ppu. It might make more sense if we align with ppu. Please let
me know what you think. Thanks!

> >  };
> >
> >  static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
> > @@ -206,7 +216,36 @@ static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
> >         .device_ctrl1_delay = 0xffff,
> >         .logic_power_switch0_delay = 0x8080808,
> >         .logic_power_switch1_delay = 0x808,
> > -       .off2on_delay = 0x8
> > +       .off2on_delay = 0x8,
> > +       .has_rst_clk = true,
> > +};
> > +
> > +static const char * const sun60i_a733_pck600_pd_names[] = {
> > +       "VI",
> > +       "DE_SYS",
> > +       "VE_DEC",
> > +       "VE_ENC",
> > +       "NPU",
> > +       "GPU_TOP",
> > +       "GPU_CORE",
> > +       "PCIE",
> > +       "USB2",
> > +       "VO",
> > +       "VO1",
> > +};
> > +
> > +static const struct sunxi_pck600_desc sun60i_a733_pck600_desc = {
> > +       .pd_names = sun60i_a733_pck600_pd_names,
> > +       .num_domains = ARRAY_SIZE(sun60i_a733_pck600_pd_names),
> > +       .logic_power_switch0_delay_offset = 0xc00,
> > +       .logic_power_switch1_delay_offset = 0xc04,
> > +       .off2on_delay_offset = 0xc10,
> > +       .device_ctrl0_delay = 0x1f1f1f,
> > +       .device_ctrl1_delay = 0x1f1f,
> > +       .logic_power_switch0_delay = 0x8080808,
> > +       .logic_power_switch1_delay = 0x808,
> > +       .off2on_delay = 0x8,
> > +       .has_rst_clk = false,
> >  };
> >
> >  static const struct of_device_id sunxi_pck600_of_match[] = {
> > @@ -214,6 +253,10 @@ static const struct of_device_id sunxi_pck600_of_match[] = {
> >                 .compatible     = "allwinner,sun55i-a523-pck-600",
> >                 .data           = &sun55i_a523_pck600_desc,
> >         },
> > +       {
> > +               .compatible     = "allwinner,sun60i-a733-pck-600",
> > +               .data           = &sun60i_a733_pck600_desc,
> > +       },
> >         {}
> >  };
> >  MODULE_DEVICE_TABLE(of, sunxi_pck600_of_match);
> >
> > --
> > 2.53.0
> >


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

* Re: [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver
  2026-03-05  0:15     ` Yuanshen Cao
@ 2026-03-05  2:52       ` Chen-Yu Tsai
  0 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2026-03-05  2:52 UTC (permalink / raw)
  To: Yuanshen Cao
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Ulf Hansson, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, linux-pm

On Thu, Mar 5, 2026 at 9:15 AM Yuanshen Cao <alex.caoys@gmail.com> wrote:
>
> On Wed, Mar 04, 2026 at 10:33:23PM +0900, Chen-Yu Tsai wrote:
> > On Wed, Mar 4, 2026 at 12:44 PM Yuanshen Cao <alex.caoys@gmail.com> wrote:
> > >
> > > The Allwinner A733 PCK600, similar to A523 PCK600, is likely a
> > > customized version of ARM PCK-600 power controller. It shares
> > > the same BSP driver with A523. According to the BSP provided
> > > by Radxa, unlike A523, it doesn't require reset.
> > >
> > > Make reset optional in the sunxi pck600 driver and add support
> > > for A733.
> > >
> > > Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com>
> > > ---
> > >  drivers/pmdomain/sunxi/sun55i-pck600.c | 53 ++++++++++++++++++++++++++++++----
> > >  1 file changed, 48 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/pmdomain/sunxi/sun55i-pck600.c b/drivers/pmdomain/sunxi/sun55i-pck600.c
> > > index c7ab51514531..8f9fdc3915bd 100644
> > > --- a/drivers/pmdomain/sunxi/sun55i-pck600.c
> > > +++ b/drivers/pmdomain/sunxi/sun55i-pck600.c
> > > @@ -52,6 +52,7 @@ struct sunxi_pck600_desc {
> > >         u32 logic_power_switch0_delay;
> > >         u32 logic_power_switch1_delay;
> > >         u32 off2on_delay;
> > > +       bool has_rst_clk;
> > >  };
> > >
> > >  struct sunxi_pck600_pd {
> > > @@ -151,9 +152,11 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
> > >         if (IS_ERR(base))
> > >                 return PTR_ERR(base);
> > >
> > > -       rst = devm_reset_control_get_exclusive_released(dev, NULL);
> > > -       if (IS_ERR(rst))
> > > -               return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
> > > +       if (desc->has_rst_clk) {
> > > +               rst = devm_reset_control_get_exclusive_released(dev, NULL);
> > > +               if (IS_ERR(rst))
> > > +                       return dev_err_probe(dev, PTR_ERR(rst), "failed to get reset control\n");
> > > +       }
> > >
> > >         clk = devm_clk_get_enabled(dev, NULL);
> > >         if (IS_ERR(clk))
> > > @@ -193,7 +196,14 @@ static int sunxi_pck600_probe(struct platform_device *pdev)
> > >  }
> > >
> > >  static const char * const sun55i_a523_pck600_pd_names[] = {
> > > -       "VE", "GPU", "VI", "VO0", "VO1", "DE", "NAND", "PCIE"
> > > +       "VE",
> > > +       "GPU",
> > > +       "VI",
> > > +       "VO0",
> > > +       "VO1",
> > > +       "DE",
> > > +       "NAND",
> > > +       "PCIE",
> >
> > No need to change this part.
> >
>
> Yes, I agree. But since A733 has more pd_names, that line will be too
> long if we stick with one line. And we also used this format in
> sun20i-ppu. It might make more sense if we align with ppu. Please let
> me know what you think. Thanks!

I prefer fewer lines. And you can have more than one line even if you
put multiple names per line. The ppu driver is a different file, so I
didn't bother changing that one.

ChenYu

> > >  };
> > >
> > >  static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
> > > @@ -206,7 +216,36 @@ static const struct sunxi_pck600_desc sun55i_a523_pck600_desc = {
> > >         .device_ctrl1_delay = 0xffff,
> > >         .logic_power_switch0_delay = 0x8080808,
> > >         .logic_power_switch1_delay = 0x808,
> > > -       .off2on_delay = 0x8
> > > +       .off2on_delay = 0x8,
> > > +       .has_rst_clk = true,
> > > +};
> > > +
> > > +static const char * const sun60i_a733_pck600_pd_names[] = {
> > > +       "VI",
> > > +       "DE_SYS",
> > > +       "VE_DEC",
> > > +       "VE_ENC",
> > > +       "NPU",
> > > +       "GPU_TOP",
> > > +       "GPU_CORE",
> > > +       "PCIE",
> > > +       "USB2",
> > > +       "VO",
> > > +       "VO1",
> > > +};
> > > +
> > > +static const struct sunxi_pck600_desc sun60i_a733_pck600_desc = {
> > > +       .pd_names = sun60i_a733_pck600_pd_names,
> > > +       .num_domains = ARRAY_SIZE(sun60i_a733_pck600_pd_names),
> > > +       .logic_power_switch0_delay_offset = 0xc00,
> > > +       .logic_power_switch1_delay_offset = 0xc04,
> > > +       .off2on_delay_offset = 0xc10,
> > > +       .device_ctrl0_delay = 0x1f1f1f,
> > > +       .device_ctrl1_delay = 0x1f1f,
> > > +       .logic_power_switch0_delay = 0x8080808,
> > > +       .logic_power_switch1_delay = 0x808,
> > > +       .off2on_delay = 0x8,
> > > +       .has_rst_clk = false,
> > >  };
> > >
> > >  static const struct of_device_id sunxi_pck600_of_match[] = {
> > > @@ -214,6 +253,10 @@ static const struct of_device_id sunxi_pck600_of_match[] = {
> > >                 .compatible     = "allwinner,sun55i-a523-pck-600",
> > >                 .data           = &sun55i_a523_pck600_desc,
> > >         },
> > > +       {
> > > +               .compatible     = "allwinner,sun60i-a733-pck-600",
> > > +               .data           = &sun60i_a733_pck600_desc,
> > > +       },
> > >         {}
> > >  };
> > >  MODULE_DEVICE_TABLE(of, sunxi_pck600_of_match);
> > >
> > > --
> > > 2.53.0
> > >
>


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

end of thread, other threads:[~2026-03-05  2:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04  3:43 [PATCH 0/2] allwinner: a733: Add A733 PCK600 Power Domain Controller Support Yuanshen Cao
2026-03-04  3:43 ` [PATCH 1/2] dt-bindings: power: Add Support for Allwinner A733 PCK600 Power Domain Controller Yuanshen Cao
2026-03-04 11:36   ` Krzysztof Kozlowski
2026-03-04  3:43 ` [PATCH 2/2] pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driver Yuanshen Cao
2026-03-04 13:33   ` Chen-Yu Tsai
2026-03-05  0:15     ` Yuanshen Cao
2026-03-05  2:52       ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox