Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH v3 0/3] clk: spacemit: fix i2s clock
@ 2025-08-18  9:28 Troy Mitchell
  2025-08-18  9:28 ` [PATCH v3 1/3] dt-bindings: clock: spacemit: introduce i2s pre-clock to " Troy Mitchell
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Troy Mitchell @ 2025-08-18  9:28 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, Krzysztof Kozlowski

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@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                  | 33 ++++++++++++++++++++++----
 drivers/clk/spacemit/ccu_ddn.c                 | 12 +++++-----
 drivers/clk/spacemit/ccu_ddn.h                 |  6 +++--
 drivers/clk/spacemit/ccu_mix.h                 |  2 +-
 include/dt-bindings/clock/spacemit,k1-syscon.h |  4 ++++
 include/soc/spacemit/k1-syscon.h               |  1 +
 6 files changed, 45 insertions(+), 13 deletions(-)
---
base-commit: e3324912fe5a05a3ea439df476625e7c8efc2b9a
change-id: 20250804-k1-clk-i2s-generation-eee7049ee17a

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


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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18  9:28 [PATCH v3 0/3] clk: spacemit: fix i2s clock Troy Mitchell
2025-08-18  9:28 ` [PATCH v3 1/3] dt-bindings: clock: spacemit: introduce i2s pre-clock to " Troy Mitchell
2025-08-18  9:28 ` [PATCH v3 2/3] clk: spacemit: introduce pre-div for ddn clock Troy Mitchell
2025-08-18  9:49   ` Haylen Chu
2025-08-18  9:28 ` [PATCH v3 3/3] clk: spacemit: fix i2s clock Troy Mitchell
2025-08-18 10:04   ` Haylen Chu
2025-08-18 13:08     ` Troy Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox