[PATCH 0/8] arm64: allwinner: a523: Enable MCU PRCM and NPU

Chen-Yu Tsai posted 8 patches 1 month ago
There is a newer version of this series
.../clock/allwinner,sun55i-a523-ccu.yaml      |  35 +-
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi |  37 ++
drivers/clk/sunxi-ng/Kconfig                  |   5 +
drivers/clk/sunxi-ng/Makefile                 |   2 +
drivers/clk/sunxi-ng/ccu-sun55i-a523-mcu.c    | 447 ++++++++++++++++++
drivers/clk/sunxi-ng/ccu-sun55i-a523.c        |  21 +-
drivers/clk/sunxi-ng/ccu-sun55i-a523.h        |  14 -
drivers/clk/sunxi-ng/ccu_div.h                |  18 +
drivers/clk/sunxi-ng/ccu_mp.c                 |   2 +-
include/dt-bindings/clock/sun55i-a523-ccu.h   |   1 +
.../dt-bindings/clock/sun55i-a523-mcu-ccu.h   |  54 +++
.../dt-bindings/reset/sun55i-a523-mcu-ccu.h   |  30 ++
12 files changed, 646 insertions(+), 20 deletions(-)
create mode 100644 drivers/clk/sunxi-ng/ccu-sun55i-a523-mcu.c
delete mode 100644 drivers/clk/sunxi-ng/ccu-sun55i-a523.h
create mode 100644 include/dt-bindings/clock/sun55i-a523-mcu-ccu.h
create mode 100644 include/dt-bindings/reset/sun55i-a523-mcu-ccu.h
[PATCH 0/8] arm64: allwinner: a523: Enable MCU PRCM and NPU
Posted by Chen-Yu Tsai 1 month ago
From: Chen-Yu Tsai <wens@csie.org>

Hi folks,

This series adds support for the MCU PRCM and the NPU.

The MCU PRCM is a Power, Reset & Clock Management block that has some
clock and reset controls for the MCU, DSP and some peripherals that the
MCU could use.

The NPU is a Vivante IP block. It is clocked from the NPU PLL from the
main clock unit, but the bus clock and reset controls lie in the MCU
PRCM.

Patch 1 adds the missing NPU module clock to the main clock control
unit's binding.

Patch 2 adds the binding for the MCU PRCM clock control unit

Patch 3 fixes clock rate readback for the new dual-divider type added
with the A523 family.

Patch 4 adds the missing NPU module clock.

Patch 5 adds support for power-of-two dividers to the sunxi-ng clk
library.

Patch 6 adds a new driver for the A523 MCU PRCM CCU.

Patch 7 adds a device node for the MCU PRCM CCU.

Patch 8 adds a device node for the NPU.

The NPU was only lightly tested: the driver correctly probes and detects
a model GC9000, revision 9003.

Please have a look. All patches will be merged through the sunxi tree.


Thanks
ChenYu


Chen-Yu Tsai (8):
  dt-bindings: clock: sun55i-a523-ccu: Add missing NPU module clock
  dt-bindings: clock: sun55i-a523-ccu: Add A523 MCU CCU clock controller
  clk: sunxi-ng: mp: Fix dual-divider clock rate readback
  clk: sunxi-ng: sun55i-a523-ccu: Add missing NPU module clock
  clk: sunxi-ng: div: support power-of-two dividers
  clk: sunxi-ng: add support for the A523/T527 MCU CCU
  arm64: dts: allwinner: a523: Add MCU PRCM CCU node
  arm64: dts: allwinner: a523: Add NPU device node

 .../clock/allwinner,sun55i-a523-ccu.yaml      |  35 +-
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi |  37 ++
 drivers/clk/sunxi-ng/Kconfig                  |   5 +
 drivers/clk/sunxi-ng/Makefile                 |   2 +
 drivers/clk/sunxi-ng/ccu-sun55i-a523-mcu.c    | 447 ++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun55i-a523.c        |  21 +-
 drivers/clk/sunxi-ng/ccu-sun55i-a523.h        |  14 -
 drivers/clk/sunxi-ng/ccu_div.h                |  18 +
 drivers/clk/sunxi-ng/ccu_mp.c                 |   2 +-
 include/dt-bindings/clock/sun55i-a523-ccu.h   |   1 +
 .../dt-bindings/clock/sun55i-a523-mcu-ccu.h   |  54 +++
 .../dt-bindings/reset/sun55i-a523-mcu-ccu.h   |  30 ++
 12 files changed, 646 insertions(+), 20 deletions(-)
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun55i-a523-mcu.c
 delete mode 100644 drivers/clk/sunxi-ng/ccu-sun55i-a523.h
 create mode 100644 include/dt-bindings/clock/sun55i-a523-mcu-ccu.h
 create mode 100644 include/dt-bindings/reset/sun55i-a523-mcu-ccu.h

-- 
2.39.5
Re: (subset) [PATCH 0/8] arm64: allwinner: a523: Enable MCU PRCM and NPU
Posted by Chen-Yu Tsai 3 weeks, 1 day ago
On Sun, 31 Aug 2025 01:08:53 +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> Hi folks,
> 
> This series adds support for the MCU PRCM and the NPU.
> 
> The MCU PRCM is a Power, Reset & Clock Management block that has some
> clock and reset controls for the MCU, DSP and some peripherals that the
> MCU could use.
> 
> [...]

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

[3/8] clk: sunxi-ng: mp: Fix dual-divider clock rate readback
      commit: 25fbbaf515acd13399589bd5ee6de5f35740cef2

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>
Re: (subset) [PATCH 0/8] arm64: allwinner: a523: Enable MCU PRCM and NPU
Posted by Chen-Yu Tsai 3 weeks, 1 day ago
On Sun, 31 Aug 2025 01:08:53 +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> Hi folks,
> 
> This series adds support for the MCU PRCM and the NPU.
> 
> The MCU PRCM is a Power, Reset & Clock Management block that has some
> clock and reset controls for the MCU, DSP and some peripherals that the
> MCU could use.
> 
> [...]

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

[4/8] clk: sunxi-ng: sun55i-a523-ccu: Add missing NPU module clock
      commit: 1ec8e9ba1f663d6ca5e71ab9f5e919c338075ff0

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>
Re: (subset) [PATCH 0/8] arm64: allwinner: a523: Enable MCU PRCM and NPU
Posted by Chen-Yu Tsai 3 weeks, 1 day ago
On Wed, Sep 10, 2025 at 11:48 PM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Sun, 31 Aug 2025 01:08:53 +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > Hi folks,
> >
> > This series adds support for the MCU PRCM and the NPU.
> >
> > The MCU PRCM is a Power, Reset & Clock Management block that has some
> > clock and reset controls for the MCU, DSP and some peripherals that the
> > MCU could use.
> >
> > [...]
>
> Applied to sunxi/clk-for-6.18 in local tree, thanks!
>
> [4/8] clk: sunxi-ng: sun55i-a523-ccu: Add missing NPU module clock
>       commit: 1ec8e9ba1f663d6ca5e71ab9f5e919c338075ff0

I forgot this needs a bit of work and a new version sent. Backing this
one out (facepalm).

ChenYu