[PATCH RESEND v4 0/3] clk: spacemit: fix i2s clock
Troy Mitchell
troy.mitchell at linux.spacemit.com
Wed Sep 10 20:34:02 PDT 2025
Previously, the driver defined two clocks for the I2S controller:
i2s_bclk and its parent i2s_sysclk.
Both i2s_bclk and i2s_sysclk were treated as fixed-rate clocks,
which clearly does not reflect the practical requirements for I2S operation.
Additionally, the original driver overlooked some upstream clock sources.
To fix the I2S clock, this series also introduces several new clock definition macros.
The I2S clock hierarchy can be found here [1].
Link:
https://developer.spacemit.com/documentation?token=LCrKwWDasiJuROkVNusc2pWTnEb
[1]
Signed-off-by: Troy Mitchell <troy.mitchell at linux.spacemit.com>
---
Since v4 of this series has not received any comments for a while,
I'm resending the patchset.
---
Changes in v4:
- drop the erroneous change in ccu_mix.h(patch3/3)
- modify comment
- modify commit msg
- Link to v3: https://lore.kernel.org/r/20250818-k1-clk-i2s-generation-v3-0-8139b22ae709@linux.spacemit.com
Changes in v3:
- remove factor for CCU_DIV_GATE_DEFINE
- introduce I2S_BCLK_FACTOR as I2S_BCLK parent clock
- adjust consumers in patch2/3
- Link to v2: https://lore.kernel.org/all/20250811-k1-clk-i2s-generation-v2-0-e4d3ec268b7a@linux.spacemit.com/
Changes in v2:
- remove CCU_DDN_GATE_DEFINE
- remove CCU_DIV_TABLE_GATE_DEFINE
- move gate of i2s_sysclk from DDN to MUX
- introduce factor for CCU_DIV_GATE_DEFINE
- modify commit message
- split patch2/2 into separate patches
- remove reformatting in k1-syscon.h
- Link to v1: https://lore.kernel.org/r/20250807-k1-clk-i2s-generation-v1-0-7dc25eb4e4d3@linux.spacemit.com
---
Troy Mitchell (3):
dt-bindings: clock: spacemit: introduce i2s pre-clock to fix i2s clock
clk: spacemit: introduce pre-div for ddn clock
clk: spacemit: fix i2s clock
drivers/clk/spacemit/ccu-k1.c | 32 ++++++++++++++++++++++----
drivers/clk/spacemit/ccu_ddn.c | 12 +++++-----
drivers/clk/spacemit/ccu_ddn.h | 6 +++--
include/dt-bindings/clock/spacemit,k1-syscon.h | 4 ++++
include/soc/spacemit/k1-syscon.h | 1 +
5 files changed, 43 insertions(+), 12 deletions(-)
---
base-commit: e3324912fe5a05a3ea439df476625e7c8efc2b9a
change-id: 20250804-k1-clk-i2s-generation-eee7049ee17a
Best regards,
--
Troy Mitchell <troy.mitchell at linux.spacemit.com>
More information about the linux-riscv
mailing list