[PATCH 0/3] clk: spacemit: k3: fix i2s clock topology and divider rates

Yixun Lan dlan at kernel.org
Tue Jul 28 04:47:39 PDT 2026


On 00:26 Fri 17 Jul     , Troy Mitchell wrote:
> The K3 i2s clock tree was modelled on the K1 layout but does not match
> the actual K3 hardware topology, leading to incorrect clock rates being
> reported and programmed.
> 
> Three fixes are provided in dependency order:
> 
> First, the MPMU_ISCCR syscon register is renamed to MPMU_ISCCR1 to
> match the hardware register name, and MPMU_ISCCR0 (offset 0x0040) is
> added. This prepares the header for the clock topology corrections that
> follow.
> 
> Second, the clock topology is reworked to reflect the real hardware:
> the common i2s_sysclk DDN at MPMU_ISCCR1 is renamed from "i2s1_sysclk",
> an implicit 1/2 factor (i2s_bclk_factor) is introduced before i2s_bclk,
> and the dedicated i2s1 clock path (i2s1_sysclk_src MUX + i2s1_sysclk
> DDN backed by MPMU_ISCCR0) is added. CLK_MPMU_I2S1_SYSCLK keeps its
> existing ID but now refers to the real per-instance i2s1 clock; no
> in-tree user references this ID so the semantic change is contained.
> 
> Third, the per-instance i2s sysclk DDNs (i2s{0,2,3,4,5}_sysclk_div)
> are corrected to account for the hardware-internal 1/2 factor by setting
> pre_div to 2 instead of 1, so clk_get_rate() and clk_set_rate() report
> and program the real hardware rate.
> 
For the series, looks good
Reviewed-by: Yixun Lan <dlan at kernel.org>

> ---
> Troy Mitchell (3):
>       dt-bindings: soc: spacemit: k3: add i2s_sysclk, i2s_bclk_factor and i2s1_sysclk_src IDs
>       clk: spacemit: k3: fix i2s clock topology
>       clk: spacemit: k3: fix missing /2 factor in i2s sysclk dividers
> 
>  drivers/clk/spacemit/ccu-k3.c                  | 31 +++++++++++++++++---------
>  include/dt-bindings/clock/spacemit,k3-clocks.h |  3 +++
>  include/soc/spacemit/k3-syscon.h               |  3 ++-
>  3 files changed, 26 insertions(+), 11 deletions(-)
> ---
> base-commit: c425609d6ac4012c8bbf01ec2e10e801b1923a7b
> change-id: 20260615-k3-clk-fix-i2s-5e278a472061
> 
> Best regards,
> --  
> Troy Mitchell <troy.mitchell at linux.spacemit.com>
> 

-- 
Yixun Lan (dlan)



More information about the linux-riscv mailing list