linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] clk: spacemit: fix i2s clock
@ 2025-08-11 14:04 Troy Mitchell
  2025-08-11 14:04 ` [PATCH v2 1/4] dt-bindings: clock: spacemit: introduce i2s pre-clock to " Troy Mitchell
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Troy Mitchell @ 2025-08-11 14:04 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Yixun Lan, Alex Elder, Haylen Chu, Inochi Amaoto
  Cc: linux-clk, devicetree, linux-riscv, spacemit, linux-kernel,
	Jinmei Wei, Troy Mitchell

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-factor 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@linux.spacemit.com>
---
Changes in v2:
- change the macro for i2s_sysclk_src to CCU_MUX_GATE_DEFINE
- introduce factor for div clock
- modify commit messages
- remove CCU_DDN_GATE_DEFINE
- remove CCU_DIV_TABLE_GATE_DEFINE
- remove reformatting in k1-syscon.h
- split patch2/2 into separate patches
- Link to v1: https://lore.kernel.org/r/20250807-k1-clk-i2s-generation-v1-0-7dc25eb4e4d3@linux.spacemit.com

---
Troy Mitchell (4):
      dt-bindings: clock: spacemit: introduce i2s pre-clock to fix i2s clock
      clk: spacemit: introduce pre-div for ddn clock
      clk: spacemit: introduce factor for div clock
      clk: spacemit: fix i2s clock

 drivers/clk/spacemit/ccu-k1.c                  | 28 +++++++++++++++++++++-----
 drivers/clk/spacemit/ccu_ddn.c                 | 12 +++++------
 drivers/clk/spacemit/ccu_ddn.h                 |  6 ++++--
 drivers/clk/spacemit/ccu_mix.c                 |  7 ++++++-
 drivers/clk/spacemit/ccu_mix.h                 |  4 +++-
 include/dt-bindings/clock/spacemit,k1-syscon.h |  3 +++
 include/soc/spacemit/k1-syscon.h               |  1 +
 7 files changed, 46 insertions(+), 15 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250804-k1-clk-i2s-generation-eee7049ee17a

Best regards,
-- 
Troy Mitchell <troy.mitchell@linux.spacemit.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-08-18  7:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 14:04 [PATCH v2 0/4] clk: spacemit: fix i2s clock Troy Mitchell
2025-08-11 14:04 ` [PATCH v2 1/4] dt-bindings: clock: spacemit: introduce i2s pre-clock to " Troy Mitchell
2025-08-14  8:58   ` Krzysztof Kozlowski
2025-08-11 14:04 ` [PATCH v2 2/4] clk: spacemit: introduce pre-div for ddn clock Troy Mitchell
2025-08-18  2:04   ` Haylen Chu
2025-08-18  7:32     ` Troy Mitchell
2025-08-11 14:04 ` [PATCH v2 3/4] clk: spacemit: introduce factor for div clock Troy Mitchell
2025-08-18  2:20   ` Haylen Chu
2025-08-18  7:33     ` Troy Mitchell
2025-08-11 14:04 ` [PATCH v2 4/4] clk: spacemit: fix i2s clock Troy Mitchell
2025-08-14  1:05   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).