clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
Subsystems (4)
Chen-Yu Tsai
maintainercover 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
Chen-Yu Tsai
maintainerPATCH 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.
--- 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
@@ -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
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")Signed-off-by Chen-Yu Tsai <[email protected]>---
Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
In reply to Chen-Yu TsaiQuoted 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")Signed-off-by Chen-Yu Tsai <[email protected]>
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@@ -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_ */
Re: [PATCH 1/2] dt-bindings: reset: sun55i-a523-r-ccu: Add missing PPU0 reset
In reply to Chen-Yu TsaiQuoted 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")Signed-off-by Chen-Yu Tsai <[email protected]>
Chen-Yu Tsai
maintainerPATCH 2/2 clk: sunxi-ng: sun55i-a523-r-ccu: Add missing PPU0 reset
In reply to Chen-Yu TsaiFrom: 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.
--- 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
@@ -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
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")Signed-off-by Chen-Yu Tsai <[email protected]>---
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")Signed-off-by Chen-Yu Tsai <[email protected]>
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@@ -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 = {
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: c17b1b6c86059664e91008a23547ef0aadfc2228Best regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>