Skip to content

arm64: allwinner: a523: Enable CPU clocks

Andre Przywara linux-arm-kernel linux-clk linux-devicetree linux-sunxi 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 3 repliesIn review
  2. v25 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- forbid #reset-cells in DT binding
- adjust top level comment to include DSU divider bits
- drop patch 2 in favour of using a div clock and a new macro
- describe PLL divider clocks using new divider clock macro
- rename 600MHz input clock name to match binding (lower case "m")
- add MUX notifier for DSU clock as well
- add new function to start CPU PLLs in a safer way
- add MODULE_DEVICE_TABLE
- drop unneeded (and now forbidden) #reset-cells from .dtsi
- only build driver for CONFIG_ARCH_SUNXI

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4clk: sunxi-ng: generalise update bitdrivers/clk/sunxi-ng/ccu-sun55i-a523.c drivers/clk/sunxi-ng/ccu-sun6i-rtc.c drivers/clk/sunxi-ng/ccu_common.h +5 more+21 -290 replies
2/4dt-bindings: clock: sun55i-a523-ccu: Add A523 CPU CCU clock controllerDocumentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml include/dt-bindings/clock/sun55i-a523-cpu-ccu.h+50 -13 replies
3/4clk: sunxi-ng: add support for the A523/T527 CPU CCUdrivers/clk/sunxi-ng/Kconfig drivers/clk/sunxi-ng/Makefile drivers/clk/sunxi-ng/ccu-sun55i-a523-cpu.c +2 more+414 -00 replies
4/4arm64: dts: allwinner: a523: add CPU clocksarch/arm64/boot/dts/allwinner/sun55i-a523.dtsi+21 -00 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchChen-Yu Tsai
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] arm64: allwinner: a523: Enable CPU clocks

Hi,

an update for the A523 CPU clock series, aiming at eventually lifting all A523 boards out of their current 768MHz misery ;-)
This addresses the comments on the list and from Sashiko, though I took the freedom to ignore impossible scenarios (we cannot really remove this clock module), and pathological corner cases (race condition between registering the CCU and registering the clock notifiers). Changes to mention are the usage of a new clock macro based on a divider clock for the PLL dividers, and the rework of the PLL start routine. For a more complete changelog see below. Based on v7.3-rc1.

==============================
This series adds support for the CPU clock controller in the Allwinner A523/A527/T527 family of SoCs.

In contrast to all earlier Allwinner SoCs, this chip features a separate CCU for the CPU clocks (one for each of the two clusters) and the DSU clock.

Patch 1 adds some slight enhancement to the sunxi-ng clock driver framework, to generalise the update bit.
Patch 2 adds the binding document for the new CCU.
Patch 3 adds the actual clock driver, and patch 4 makes use of that by adding the clock description to the SoC .dtsi.

Please have a look and test!

Cheers,
Andre

Changes in v3:
- forbid #reset-cells in DT binding
- adjust top level comment to include DSU divider bits
- drop patch 2 in favour of using a div clock and a new macro
- describe PLL divider clocks using new divider clock macro
- rename 600MHz input clock name to match binding (lower case "m")
- add MUX notifier for DSU clock as well
- add new function to start CPU PLLs in a safer way
- add MODULE_DEVICE_TABLE
- drop unneeded (and now forbidden) #reset-cells from .dtsi
- only build driver for CONFIG_ARCH_SUNXI

Changes in v2:
- rebase on v7.3-rc1
- cover CCU_FEATURE_KEY_FIELD in update bits generalisation
- explicitly include binding header in clock driver
- order clocks property before enable-method in DT nodes

Andre Przywara (4):
clk: sunxi-ng: generalise update bit
dt-bindings: clock: sun55i-a523-ccu: Add A523 CPU CCU clock controller
clk: sunxi-ng: add support for the A523/T527 CPU CCU
arm64: dts: allwinner: a523: add CPU clocks

 .../clock/allwinner,sun55i-a523-ccu.yaml      |  38 +-
 .../arm64/boot/dts/allwinner/sun55i-a523.dtsi |  21 +
 drivers/clk/sunxi-ng/Kconfig                  |   5 +
 drivers/clk/sunxi-ng/Makefile                 |   2 +
 drivers/clk/sunxi-ng/ccu-sun55i-a523-cpu.c    | 378 ++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun55i-a523-cpu.h    |  24 ++
 drivers/clk/sunxi-ng/ccu-sun55i-a523.c        |  12 +-
 drivers/clk/sunxi-ng/ccu-sun6i-rtc.c          |   4 +-
 drivers/clk/sunxi-ng/ccu_common.h             |   8 +-
 drivers/clk/sunxi-ng/ccu_div.c                |   3 +-
 drivers/clk/sunxi-ng/ccu_div.h                |   5 +
 drivers/clk/sunxi-ng/ccu_gate.c               |   6 +-
 drivers/clk/sunxi-ng/ccu_mp.h                 |   8 +-
 drivers/clk/sunxi-ng/ccu_mux.c                |   8 +-
 drivers/clk/sunxi-ng/ccu_nm.c                 |   1 +
 .../dt-bindings/clock/sun55i-a523-cpu-ccu.h   |  13 +
 16 files changed, 506 insertions(+), 30 deletions(-)
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun55i-a523-cpu.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun55i-a523-cpu.h
 create mode 100644 include/dt-bindings/clock/sun55i-a523-cpu-ccu.h

base-commit: cee9395acd8043be0644b25c34bfa86623f2b935

Signature · 1 line
2.46.4