linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
@ 2025-06-19 17:10 Chen-Yu Tsai
  2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2025-06-19 17:10 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Andre Przywara, Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

There is a PPU0 reset control bit in the same register as the PPU1
reset control. This missing reset control is for the PCK-600 unit
in the SoC. Manual tests show that the reset control indeed exists,
and if not configured, the system will hang when the PCK-600
registers are accessed.

This series adds a reset entry for it at the end of the existing ones,
in both the DT binding header file and the driver.

I will take both patches through the sunxi trees since I need the
header file change for a subsequent patch series.

Please have a look.


ChenYu


Chen-Yu Tsai (2):
  dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
  clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset

 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c      | 1 +
 include/dt-bindings/reset/sun55i-a523-r-ccu.h | 1 +
 2 files changed, 2 insertions(+)

-- 
2.39.5


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

* [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 [PATCH 0/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset Chen-Yu Tsai
@ 2025-06-19 17:10 ` Chen-Yu Tsai
  2025-06-19 19:54   ` Stephen Boyd
                     ` (2 more replies)
  2025-06-19 17:10 ` [PATCH 2/2] clk: sunxi-ng: " Chen-Yu Tsai
  2025-06-25 13:38 ` [PATCH 0/2] " Chen-Yu Tsai
  2 siblings, 3 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2025-06-19 17:10 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Andre Przywara, Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

There is a PPU0 reset control bit in the same register as the PPU1
reset control. This missing reset control is for the PCK-600 unit
in the SoC. Manual tests show that the reset control indeed exists,
and if not configured, the system will hang when the PCK-600 registers
are accessed.

Add a reset entry for it at the end of the existing ones.

Fixes: 52dbf84857f0 ("dt-bindings: clk: sunxi-ng: document two Allwinner A523 CCUs")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 include/dt-bindings/reset/sun55i-a523-r-ccu.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/reset/sun55i-a523-r-ccu.h b/include/dt-bindings/reset/sun55i-a523-r-ccu.h
index dd6fbb372e19..eb31ae9958d6 100644
--- a/include/dt-bindings/reset/sun55i-a523-r-ccu.h
+++ b/include/dt-bindings/reset/sun55i-a523-r-ccu.h
@@ -21,5 +21,6 @@
 #define RST_BUS_R_IR_RX		12
 #define RST_BUS_R_RTC		13
 #define RST_BUS_R_CPUCFG	14
+#define RST_BUS_R_PPU0		15
 
 #endif /* _DT_BINDINGS_RST_SUN55I_A523_R_CCU_H_ */
-- 
2.39.5


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

* [PATCH 2/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 [PATCH 0/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset Chen-Yu Tsai
  2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
@ 2025-06-19 17:10 ` Chen-Yu Tsai
  2025-06-19 19:54   ` Stephen Boyd
  2025-06-20  1:26   ` Andre Przywara
  2025-06-25 13:38 ` [PATCH 0/2] " Chen-Yu Tsai
  2 siblings, 2 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2025-06-19 17:10 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Andre Przywara, Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

There is a PPU0 reset control bit in the same register as the PPU1
reset control. This missing reset control is for the PCK-600 unit
in the SoC. Manual tests show that the reset control indeed exists,
and if not configured, the system will hang when the PCK-600 registers
are accessed.

Add a reset entry for it at the end of the existing ones.

Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
index b5464d8083c8..70ce0ca0cb7d 100644
--- a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
+++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
@@ -204,6 +204,7 @@ static struct ccu_reset_map sun55i_a523_r_ccu_resets[] = {
 	[RST_BUS_R_IR_RX]	= { 0x1cc, BIT(16) },
 	[RST_BUS_R_RTC]		= { 0x20c, BIT(16) },
 	[RST_BUS_R_CPUCFG]	= { 0x22c, BIT(16) },
+	[RST_BUS_R_PPU0]	= { 0x1ac, BIT(16) },
 };
 
 static const struct sunxi_ccu_desc sun55i_a523_r_ccu_desc = {
-- 
2.39.5


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

* Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
@ 2025-06-19 19:54   ` Stephen Boyd
  2025-06-20  1:28   ` Andre Przywara
  2025-06-20 14:17   ` Conor Dooley
  2 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2025-06-19 19:54 UTC (permalink / raw)
  To: Chen-Yu Tsai, Chen-Yu Tsai, Conor Dooley, Jernej Skrabec,
	Krzysztof Kozlowski, Rob Herring, Samuel Holland
  Cc: Andre Przywara, Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

Quoting Chen-Yu Tsai (2025-06-19 10:10:24)
> From: Chen-Yu Tsai <wens@csie.org>
> 
> There is a PPU0 reset control bit in the same register as the PPU1
> reset control. This missing reset control is for the PCK-600 unit
> in the SoC. Manual tests show that the reset control indeed exists,
> and if not configured, the system will hang when the PCK-600 registers
> are accessed.
> 
> Add a reset entry for it at the end of the existing ones.
> 
> Fixes: 52dbf84857f0 ("dt-bindings: clk: sunxi-ng: document two Allwinner A523 CCUs")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

* Re: [PATCH 2/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 ` [PATCH 2/2] clk: sunxi-ng: " Chen-Yu Tsai
@ 2025-06-19 19:54   ` Stephen Boyd
  2025-06-20  1:26   ` Andre Przywara
  1 sibling, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2025-06-19 19:54 UTC (permalink / raw)
  To: Chen-Yu Tsai, Chen-Yu Tsai, Conor Dooley, Jernej Skrabec,
	Krzysztof Kozlowski, Rob Herring, Samuel Holland
  Cc: Andre Przywara, Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

Quoting Chen-Yu Tsai (2025-06-19 10:10:25)
> From: Chen-Yu Tsai <wens@csie.org>
> 
> There is a PPU0 reset control bit in the same register as the PPU1
> reset control. This missing reset control is for the PCK-600 unit
> in the SoC. Manual tests show that the reset control indeed exists,
> and if not configured, the system will hang when the PCK-600 registers
> are accessed.
> 
> Add a reset entry for it at the end of the existing ones.
> 
> Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

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

* Re: [PATCH 2/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 ` [PATCH 2/2] clk: sunxi-ng: " Chen-Yu Tsai
  2025-06-19 19:54   ` Stephen Boyd
@ 2025-06-20  1:26   ` Andre Przywara
  1 sibling, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2025-06-20  1:26 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Philipp Zabel,
	devicetree, linux-sunxi, linux-clk, linux-arm-kernel,
	linux-kernel

On Fri, 20 Jun 2025 01:10:25 +0800
Chen-Yu Tsai <wens@kernel.org> wrote:

Hi,

> From: Chen-Yu Tsai <wens@csie.org>
> 
> There is a PPU0 reset control bit in the same register as the PPU1
> reset control. This missing reset control is for the PCK-600 unit
> in the SoC. Manual tests show that the reset control indeed exists,
> and if not configured, the system will hang when the PCK-600 registers
> are accessed.
> 
> Add a reset entry for it at the end of the existing ones.

Right, just this one bit is not mentioned in the manuals (both A523 and
T527), even though the PPU1 reset bit and the PPU0 clock gate bit are,
so it's clearly a manual bug. I can also confirm that both bit 16 and 17
(and none above that) are writable, and both bit 16 (reset) and bit 0
(clock gate) are required to access the PCK-600 PPU (as per: sunxi-fel
readl 0x7060fc8).
 
> Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Thanks for spotting this!

Cheers,
Andre

> ---
>  drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
> index b5464d8083c8..70ce0ca0cb7d 100644
> --- a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
> +++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
> @@ -204,6 +204,7 @@ static struct ccu_reset_map sun55i_a523_r_ccu_resets[] = {
>  	[RST_BUS_R_IR_RX]	= { 0x1cc, BIT(16) },
>  	[RST_BUS_R_RTC]		= { 0x20c, BIT(16) },
>  	[RST_BUS_R_CPUCFG]	= { 0x22c, BIT(16) },
> +	[RST_BUS_R_PPU0]	= { 0x1ac, BIT(16) },
>  };
>  
>  static const struct sunxi_ccu_desc sun55i_a523_r_ccu_desc = {


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

* Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
  2025-06-19 19:54   ` Stephen Boyd
@ 2025-06-20  1:28   ` Andre Przywara
  2025-06-20 14:17   ` Conor Dooley
  2 siblings, 0 replies; 9+ messages in thread
From: Andre Przywara @ 2025-06-20  1:28 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Philipp Zabel,
	devicetree, linux-sunxi, linux-clk, linux-arm-kernel,
	linux-kernel

On Fri, 20 Jun 2025 01:10:24 +0800
Chen-Yu Tsai <wens@kernel.org> wrote:

> From: Chen-Yu Tsai <wens@csie.org>
> 
> There is a PPU0 reset control bit in the same register as the PPU1
> reset control. This missing reset control is for the PCK-600 unit
> in the SoC. Manual tests show that the reset control indeed exists,
> and if not configured, the system will hang when the PCK-600 registers
> are accessed.

Confirmed by experiment.

> Add a reset entry for it at the end of the existing ones.
> 
> Fixes: 52dbf84857f0 ("dt-bindings: clk: sunxi-ng: document two Allwinner A523 CCUs")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  include/dt-bindings/reset/sun55i-a523-r-ccu.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/dt-bindings/reset/sun55i-a523-r-ccu.h b/include/dt-bindings/reset/sun55i-a523-r-ccu.h
> index dd6fbb372e19..eb31ae9958d6 100644
> --- a/include/dt-bindings/reset/sun55i-a523-r-ccu.h
> +++ b/include/dt-bindings/reset/sun55i-a523-r-ccu.h
> @@ -21,5 +21,6 @@
>  #define RST_BUS_R_IR_RX		12
>  #define RST_BUS_R_RTC		13
>  #define RST_BUS_R_CPUCFG	14
> +#define RST_BUS_R_PPU0		15
>  
>  #endif /* _DT_BINDINGS_RST_SUN55I_A523_R_CCU_H_ */


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

* Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
  2025-06-19 19:54   ` Stephen Boyd
  2025-06-20  1:28   ` Andre Przywara
@ 2025-06-20 14:17   ` Conor Dooley
  2 siblings, 0 replies; 9+ messages in thread
From: Conor Dooley @ 2025-06-20 14:17 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Andre Przywara,
	Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

On Fri, Jun 20, 2025 at 01:10:24AM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> There is a PPU0 reset control bit in the same register as the PPU1
> reset control. This missing reset control is for the PCK-600 unit
> in the SoC. Manual tests show that the reset control indeed exists,
> and if not configured, the system will hang when the PCK-600 registers
> are accessed.
> 
> Add a reset entry for it at the end of the existing ones.
> 
> Fixes: 52dbf84857f0 ("dt-bindings: clk: sunxi-ng: document two Allwinner A523 CCUs")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 0/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
  2025-06-19 17:10 [PATCH 0/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset Chen-Yu Tsai
  2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
  2025-06-19 17:10 ` [PATCH 2/2] clk: sunxi-ng: " Chen-Yu Tsai
@ 2025-06-25 13:38 ` Chen-Yu Tsai
  2 siblings, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2025-06-25 13:38 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jernej Skrabec, Samuel Holland, Chen-Yu Tsai
  Cc: Andre Przywara, Philipp Zabel, devicetree, linux-sunxi, linux-clk,
	linux-arm-kernel, linux-kernel

On Fri, 20 Jun 2025 01:10:23 +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> There is a PPU0 reset control bit in the same register as the PPU1
> reset control. This missing reset control is for the PCK-600 unit
> in the SoC. Manual tests show that the reset control indeed exists,
> and if not configured, the system will hang when the PCK-600
> registers are accessed.
> 
> [...]

Applied to sunxi/clk-for-6.17 in local tree, thanks!

[1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
      commit: 61977ccf6568f9d104462727b49412a80c22c519
[2/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
      commit: c17b1b6c86059664e91008a23547ef0aadfc2228

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>


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

end of thread, other threads:[~2025-06-25 13:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-19 17:10 [PATCH 0/2] clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset Chen-Yu Tsai
2025-06-19 17:10 ` [PATCH 1/2] dt-bindings: reset: " Chen-Yu Tsai
2025-06-19 19:54   ` Stephen Boyd
2025-06-20  1:28   ` Andre Przywara
2025-06-20 14:17   ` Conor Dooley
2025-06-19 17:10 ` [PATCH 2/2] clk: sunxi-ng: " Chen-Yu Tsai
2025-06-19 19:54   ` Stephen Boyd
2025-06-20  1:26   ` Andre Przywara
2025-06-25 13:38 ` [PATCH 0/2] " 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;
as well as URLs for NNTP newsgroup(s).