From: Chen-Yu Tsai <wens@csie.org>
The A523 PPU is likely the same kind of hardware seen on previous SoCs.
The A523 PCK600, as the name suggests, is likely a customized version
of ARM's PCK-600 power controller. Comparing the BSP driver against
ARM's PPU datasheet shows that the basic registers line up, but
Allwinner's hardware has some additional delay controls in the reserved
register range. As such it is likely not fully compatible with the
standard ARM version.
Document A523 PPU and PCK600 compatibles.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
.../bindings/power/allwinner,sun20i-d1-ppu.yaml | 2 ++
.../power/allwinner,sun55i-a523-pck600.h | 15 +++++++++++++++
.../dt-bindings/power/allwinner,sun55i-a523-ppu.h | 12 ++++++++++++
3 files changed, 29 insertions(+)
create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-pck600.h
create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-ppu.h
diff --git a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml
index f578be6a3bc8..b9f550994512 100644
--- a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml
+++ b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml
@@ -18,6 +18,8 @@ properties:
enum:
- allwinner,sun20i-d1-ppu
- allwinner,sun8i-v853-ppu
+ - allwinner,sun55i-a523-ppu
+ - allwinner,sun55i-a523-pck-600
reg:
maxItems: 1
diff --git a/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h
new file mode 100644
index 000000000000..6b3d8ea7bb69
--- /dev/null
+++ b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef _DT_BINDINGS_POWER_SUN55I_A523_PCK600_H_
+#define _DT_BINDINGS_POWER_SUN55I_A523_PCK600_H_
+
+#define PD_VE 0
+#define PD_GPU 1
+#define PD_VI 2
+#define PD_VO0 3
+#define PD_VO1 4
+#define PD_DE 5
+#define PD_NAND 6
+#define PD_PCIE 7
+
+#endif /* _DT_BINDINGS_POWER_SUN55I_A523_PCK600_H_ */
diff --git a/include/dt-bindings/power/allwinner,sun55i-a523-ppu.h b/include/dt-bindings/power/allwinner,sun55i-a523-ppu.h
new file mode 100644
index 000000000000..bc9aba73c19a
--- /dev/null
+++ b/include/dt-bindings/power/allwinner,sun55i-a523-ppu.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef _DT_BINDINGS_POWER_SUN55I_A523_PPU_H_
+#define _DT_BINDINGS_POWER_SUN55I_A523_PPU_H_
+
+#define PD_DSP 0
+#define PD_NPU 1
+#define PD_AUDIO 2
+#define PD_SRAM 3
+#define PD_RISCV 4
+
+#endif /* _DT_BINDINGS_POWER_SUN55I_A523_PPU_H_ */
--
2.39.5
On Fri, Jun 27, 2025 at 11:29:15PM +0800, Chen-Yu Tsai wrote: > From: Chen-Yu Tsai <wens@csie.org> > > The A523 PPU is likely the same kind of hardware seen on previous SoCs. > > The A523 PCK600, as the name suggests, is likely a customized version > of ARM's PCK-600 power controller. Comparing the BSP driver against > ARM's PPU datasheet shows that the basic registers line up, but > Allwinner's hardware has some additional delay controls in the reserved > register range. As such it is likely not fully compatible with the > standard ARM version. > > Document A523 PPU and PCK600 compatibles. > > Signed-off-by: Chen-Yu Tsai <wens@csie.org> > --- > .../bindings/power/allwinner,sun20i-d1-ppu.yaml | 2 ++ > .../power/allwinner,sun55i-a523-pck600.h | 15 +++++++++++++++ > .../dt-bindings/power/allwinner,sun55i-a523-ppu.h | 12 ++++++++++++ > 3 files changed, 29 insertions(+) > create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-ppu.h > > diff --git a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > index f578be6a3bc8..b9f550994512 100644 > --- a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > +++ b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > @@ -18,6 +18,8 @@ properties: > enum: > - allwinner,sun20i-d1-ppu > - allwinner,sun8i-v853-ppu > + - allwinner,sun55i-a523-ppu > + - allwinner,sun55i-a523-pck-600 Don't add items at the end, but placed in alphabetical order. Could be natural sort if you insist, but binding does not use it. > > reg: > maxItems: 1 > diff --git a/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > new file mode 100644 > index 000000000000..6b3d8ea7bb69 > --- /dev/null > +++ b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h Filename matching compatible (which ever one is correct). Best regards, Krzysztof
On Tue, Jul 8, 2025 at 4:47 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Fri, Jun 27, 2025 at 11:29:15PM +0800, Chen-Yu Tsai wrote: > > From: Chen-Yu Tsai <wens@csie.org> > > > > The A523 PPU is likely the same kind of hardware seen on previous SoCs. > > > > The A523 PCK600, as the name suggests, is likely a customized version > > of ARM's PCK-600 power controller. Comparing the BSP driver against > > ARM's PPU datasheet shows that the basic registers line up, but > > Allwinner's hardware has some additional delay controls in the reserved > > register range. As such it is likely not fully compatible with the > > standard ARM version. > > > > Document A523 PPU and PCK600 compatibles. > > > > Signed-off-by: Chen-Yu Tsai <wens@csie.org> > > --- > > .../bindings/power/allwinner,sun20i-d1-ppu.yaml | 2 ++ > > .../power/allwinner,sun55i-a523-pck600.h | 15 +++++++++++++++ > > .../dt-bindings/power/allwinner,sun55i-a523-ppu.h | 12 ++++++++++++ > > 3 files changed, 29 insertions(+) > > create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > > create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-ppu.h > > > > diff --git a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > > index f578be6a3bc8..b9f550994512 100644 > > --- a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > > +++ b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > > @@ -18,6 +18,8 @@ properties: > > enum: > > - allwinner,sun20i-d1-ppu > > - allwinner,sun8i-v853-ppu > > + - allwinner,sun55i-a523-ppu > > + - allwinner,sun55i-a523-pck-600 > > Don't add items at the end, but placed in alphabetical order. Could be > natural sort if you insist, but binding does not use it. In our other bindings [1][2] we have them sorted by family (sunXYi) then by SoC name. I can move sun20i-d1-ppu after sun8i-v853-ppu to get that ordering. Obviously "-pck-600" would come before "-ppu". Would that work for you? [1] Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml [2] Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml (There are some out of order entries regardless.) > > reg: > > maxItems: 1 > > diff --git a/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > > new file mode 100644 > > index 000000000000..6b3d8ea7bb69 > > --- /dev/null > > +++ b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > > Filename matching compatible (which ever one is correct). Ack. Will change to "allwinner,sun55i-a523-pck-600.h". Thanks ChenYu
On 08/07/2025 10:55, Chen-Yu Tsai wrote: > On Tue, Jul 8, 2025 at 4:47 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> On Fri, Jun 27, 2025 at 11:29:15PM +0800, Chen-Yu Tsai wrote: >>> From: Chen-Yu Tsai <wens@csie.org> >>> >>> The A523 PPU is likely the same kind of hardware seen on previous SoCs. >>> >>> The A523 PCK600, as the name suggests, is likely a customized version >>> of ARM's PCK-600 power controller. Comparing the BSP driver against >>> ARM's PPU datasheet shows that the basic registers line up, but >>> Allwinner's hardware has some additional delay controls in the reserved >>> register range. As such it is likely not fully compatible with the >>> standard ARM version. >>> >>> Document A523 PPU and PCK600 compatibles. >>> >>> Signed-off-by: Chen-Yu Tsai <wens@csie.org> >>> --- >>> .../bindings/power/allwinner,sun20i-d1-ppu.yaml | 2 ++ >>> .../power/allwinner,sun55i-a523-pck600.h | 15 +++++++++++++++ >>> .../dt-bindings/power/allwinner,sun55i-a523-ppu.h | 12 ++++++++++++ >>> 3 files changed, 29 insertions(+) >>> create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-pck600.h >>> create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-ppu.h >>> >>> diff --git a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml >>> index f578be6a3bc8..b9f550994512 100644 >>> --- a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml >>> +++ b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml >>> @@ -18,6 +18,8 @@ properties: >>> enum: >>> - allwinner,sun20i-d1-ppu >>> - allwinner,sun8i-v853-ppu >>> + - allwinner,sun55i-a523-ppu >>> + - allwinner,sun55i-a523-pck-600 >> >> Don't add items at the end, but placed in alphabetical order. Could be >> natural sort if you insist, but binding does not use it. > > In our other bindings [1][2] we have them sorted by family (sunXYi) Sure, choose whatever sorting rule you want but then YOU must review this on every binding, because we do not and we cannot know that family information. But if this is the sorting here, why "20" is before 8? In other places it is after. So yeah, you have chosen complicated sorting which no one from DT maintainers gets and you do not enforce clarify... Best regards, Krzysztof
On Fri, 27 Jun 2025 23:29:15 +0800 Chen-Yu Tsai <wens@kernel.org> wrote: > From: Chen-Yu Tsai <wens@csie.org> > > The A523 PPU is likely the same kind of hardware seen on previous SoCs. > > The A523 PCK600, as the name suggests, is likely a customized version > of ARM's PCK-600 power controller. Comparing the BSP driver against > ARM's PPU datasheet shows that the basic registers line up, but > Allwinner's hardware has some additional delay controls in the reserved > register range. As such it is likely not fully compatible with the > standard ARM version. > > Document A523 PPU and PCK600 compatibles. > > Signed-off-by: Chen-Yu Tsai <wens@csie.org> Both PPUs are merely mentioned in the user manual, but do not have a register description. But the BSP source code confirms the mapping of the power domains used below, so: Reviewed-by: Andre Przywara <andre.przywara@arm.com> Cheers, Andre > --- > .../bindings/power/allwinner,sun20i-d1-ppu.yaml | 2 ++ > .../power/allwinner,sun55i-a523-pck600.h | 15 +++++++++++++++ > .../dt-bindings/power/allwinner,sun55i-a523-ppu.h | 12 ++++++++++++ > 3 files changed, 29 insertions(+) > create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > create mode 100644 include/dt-bindings/power/allwinner,sun55i-a523-ppu.h > > diff --git a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > index f578be6a3bc8..b9f550994512 100644 > --- a/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > +++ b/Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml > @@ -18,6 +18,8 @@ properties: > enum: > - allwinner,sun20i-d1-ppu > - allwinner,sun8i-v853-ppu > + - allwinner,sun55i-a523-ppu > + - allwinner,sun55i-a523-pck-600 > > reg: > maxItems: 1 > diff --git a/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > new file mode 100644 > index 000000000000..6b3d8ea7bb69 > --- /dev/null > +++ b/include/dt-bindings/power/allwinner,sun55i-a523-pck600.h > @@ -0,0 +1,15 @@ > +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ > + > +#ifndef _DT_BINDINGS_POWER_SUN55I_A523_PCK600_H_ > +#define _DT_BINDINGS_POWER_SUN55I_A523_PCK600_H_ > + > +#define PD_VE 0 > +#define PD_GPU 1 > +#define PD_VI 2 > +#define PD_VO0 3 > +#define PD_VO1 4 > +#define PD_DE 5 > +#define PD_NAND 6 > +#define PD_PCIE 7 > + > +#endif /* _DT_BINDINGS_POWER_SUN55I_A523_PCK600_H_ */ > diff --git a/include/dt-bindings/power/allwinner,sun55i-a523-ppu.h b/include/dt-bindings/power/allwinner,sun55i-a523-ppu.h > new file mode 100644 > index 000000000000..bc9aba73c19a > --- /dev/null > +++ b/include/dt-bindings/power/allwinner,sun55i-a523-ppu.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ > + > +#ifndef _DT_BINDINGS_POWER_SUN55I_A523_PPU_H_ > +#define _DT_BINDINGS_POWER_SUN55I_A523_PPU_H_ > + > +#define PD_DSP 0 > +#define PD_NPU 1 > +#define PD_AUDIO 2 > +#define PD_SRAM 3 > +#define PD_RISCV 4 > + > +#endif /* _DT_BINDINGS_POWER_SUN55I_A523_PPU_H_ */
© 2016 - 2025 Red Hat, Inc.