[PATCH RFC 0/4] Add clock support for SpacemiT K3 SoC

Yixun Lan posted 4 patches 5 days, 7 hours ago
.../devicetree/bindings/clock/spacemit,k1-pll.yaml |    9 +-
.../bindings/soc/spacemit/spacemit,k1-syscon.yaml  |   13 +-
drivers/clk/spacemit/Kconfig                       |    6 +
drivers/clk/spacemit/Makefile                      |   11 +-
drivers/clk/spacemit/ccu-k3.c                      | 1641 ++++++++++++++++++++
drivers/clk/spacemit/ccu_common.h                  |    1 +
drivers/clk/spacemit/ccu_mix.c                     |   12 +-
drivers/clk/spacemit/ccu_mix.h                     |   12 +
drivers/clk/spacemit/ccu_pll.c                     |  117 ++
drivers/clk/spacemit/ccu_pll.h                     |   57 +-
include/dt-bindings/clock/spacemit,k3-clocks.h     |  390 +++++
include/soc/spacemit/ccu.h                         |   18 +
include/soc/spacemit/k1-syscon.h                   |   12 +-
include/soc/spacemit/k3-syscon.h                   |  273 ++++
14 files changed, 2539 insertions(+), 33 deletions(-)
[PATCH RFC 0/4] Add clock support for SpacemiT K3 SoC
Posted by Yixun Lan 5 days, 7 hours ago
I'm marking this series as RFC for now, as the driver is based on vendor code,
and only tested on FPGA, the production SoC chip isn't ready yet.

The SpacemiT K3 SoC's CCU (clock control unit) is similar to old K1 generation,
the clock and reset functionalities are distributed across several IP blocks,
therefore, we model them as several clock tree accordingly.

The PLL clocks has changed register setting layout, so introduce a PLLA type.
Some gate clocks has inverted enable/disable logic which writing 1 to disable,
while writing 0 to enable.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
Yixun Lan (4):
      dt-bindings: soc: spacemit: add k3 syscon compatible
      clk: spacemit: ccu_mix: add inverted enable gate clock
      clk: spacemit: ccu_pll: add plla type clock
      clk: spacemit: k3: add the clock tree

 .../devicetree/bindings/clock/spacemit,k1-pll.yaml |    9 +-
 .../bindings/soc/spacemit/spacemit,k1-syscon.yaml  |   13 +-
 drivers/clk/spacemit/Kconfig                       |    6 +
 drivers/clk/spacemit/Makefile                      |   11 +-
 drivers/clk/spacemit/ccu-k3.c                      | 1641 ++++++++++++++++++++
 drivers/clk/spacemit/ccu_common.h                  |    1 +
 drivers/clk/spacemit/ccu_mix.c                     |   12 +-
 drivers/clk/spacemit/ccu_mix.h                     |   12 +
 drivers/clk/spacemit/ccu_pll.c                     |  117 ++
 drivers/clk/spacemit/ccu_pll.h                     |   57 +-
 include/dt-bindings/clock/spacemit,k3-clocks.h     |  390 +++++
 include/soc/spacemit/ccu.h                         |   18 +
 include/soc/spacemit/k1-syscon.h                   |   12 +-
 include/soc/spacemit/k3-syscon.h                   |  273 ++++
 14 files changed, 2539 insertions(+), 33 deletions(-)
---
base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
change-id: 20251204-k3-clk-db2018389ae3

Best regards,
-- 
Yixun Lan