Skip to contentSkip to conversation

clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset

PATCH In review Chen-Yu Tsai 5 participants 9 messages Jun 19, 2025 – Jun 25, 2025

Subsystems (4)
lore
Share & tools
lore

Chen-Yu Tsai

author maintainer
#0 lore raw

cover clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset

From: Chen-Yu Tsai <[email protected]>

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(+)
Signature · 1 line
2.39.5
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset

From: Chen-Yu Tsai <[email protected]>

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")
---
 include/dt-bindings/reset/sun55i-a523-r-ccu.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/reset/sun55i-a523-r-ccu.h +1 -0
index dd6fbb372e19..eb31ae9958d6 100644
@@ -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_ */
Signature · 1 line
2.39.5
maintainer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset

Quoting Chen-Yu Tsai (2025-06-19 10:10:24)

Quoted 8 lines

From: Chen-Yu Tsai <[email protected]>

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.

Quoted 5 lines

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")

---

Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset

In reply to Chen-Yu Tsai
Quoted 7 lines · On Fri, 20 Jun 2025 01:10:24 +0800 Chen-Yu Tsai <[email protected]> wrote:

From: Chen-Yu Tsai <[email protected]>

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.

Quoted 4 lines

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")

Cheers,
Andre

Quoted 15 lines
---
 include/dt-bindings/reset/sun55i-a523-r-ccu.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/reset/sun55i-a523-r-ccu.h +1 -0
index dd6fbb372e19..eb31ae9958d6 100644
@@ -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_ */
Acked-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset

In reply to Chen-Yu Tsai
Quoted 8 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

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.

Quoted 4 lines

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")
author maintainer
#5 lore raw

PATCH 2/2 clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

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")
---
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c +1 -0
index b5464d8083c8..70ce0ca0cb7d 100644
@@ -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 = {
Signature · 1 line
2.39.5
maintainer Acked-by on v1 2/2
#6 lore raw

Quoting Chen-Yu Tsai (2025-06-19 10:10:25)

Quoted 8 lines

From: Chen-Yu Tsai <[email protected]>

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.

Quoted 5 lines

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")

---

Reviewed-by on v1 2/2
#7 lore raw
In reply to Chen-Yu Tsai

On Fri, 20 Jun 2025 01:10:25 +0800
Chen-Yu Tsai <[email protected]> wrote:

Hi,

Quoted 9 lines

From: Chen-Yu Tsai <[email protected]>

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).

Quoted 2 lines
Fixes 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")

Thanks for spotting this!

Cheers,
Andre

Quoted 16 lines
---
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c +1 -0
index b5464d8083c8..70ce0ca0cb7d 100644
@@ -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 = {
#8 lore raw
In reply to Chen-Yu Tsai
Quoted 9 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

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,

Signature · 1 line
Chen-Yu Tsai <[email protected]>