linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: spacemit: fix sspax_clk
@ 2025-07-22  7:36 Troy Mitchell
  2025-07-22  7:36 ` [PATCH v2 1/2] " Troy Mitchell
  2025-07-22  7:36 ` [PATCH v2 2/2] dt-bindings: clock: spacemit: CLK_SSPA_I2S_BCLK for SSPA Troy Mitchell
  0 siblings, 2 replies; 8+ messages in thread
From: Troy Mitchell @ 2025-07-22  7:36 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Yixun Lan, Alex Elder,
	Haylen Chu, Inochi Amaoto, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-clk, linux-riscv, spacemit, linux-kernel, devicetree,
	Troy Mitchell, Yao Zi

In the SpacemiT public document, when the FNCLKSEL field of
the APBC_SSPAX_CLK_RST register is 7 (3'b111),
which is a reserved value. And BIT3 of the same register is
a reserved bit.

But the documentation is incorrect. In reality, the value 7 (3'b111)
of FNCLKSEL is not reserved. Instead, it indicates that i2s_bclk is
selected as the parent clock. Similarly, bit 3 is not reserved either.
When FNCLKSEL is set to 7, bit 3 determines whether i2s_bclk is actually
enabled as the parent clock.

In all other cases (i.e., when FNCLKSEL is not 7), bit 3 has no effect.

Importantly, whenever FNCLKSEL is set to 7, bit 3 must also be set to 1,
otherwise the selection of i2s_bclk becomes invalid.

Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
Change log in v2:
  - Use dummy gate instead of new function for sspa
  - Add Suggested-by tag: Yao Zi
  - Add Fixes tag
  - Link to v1: https://lore.kernel.org/all/20250718-k1-clk-i2s-v1-1-e92c10fd0f60@linux.spacemit.com/

---
Troy Mitchell (2):
      clk: spacemit: fix sspax_clk
      dt-bindings: clock: spacemit: CLK_SSPA_I2S_BCLK for SSPA

 drivers/clk/spacemit/ccu-k1.c                  |  25 +++++-
 include/dt-bindings/clock/spacemit,k1-syscon.h | 114 +++++++++++++------------
 2 files changed, 79 insertions(+), 60 deletions(-)
---
base-commit: 733923397fd95405a48f165c9b1fbc8c4b0a4681
change-id: 20250717-k1-clk-i2s-e4272f1f915b

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2025-07-23  4:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22  7:36 [PATCH v2 0/2] clk: spacemit: fix sspax_clk Troy Mitchell
2025-07-22  7:36 ` [PATCH v2 1/2] " Troy Mitchell
2025-07-22  7:36 ` [PATCH v2 2/2] dt-bindings: clock: spacemit: CLK_SSPA_I2S_BCLK for SSPA Troy Mitchell
2025-07-22  9:21   ` Yixun Lan
2025-07-22  9:27     ` Troy Mitchell
2025-07-22 10:09       ` Yao Zi
2025-07-23  2:31         ` Troy Mitchell
2025-07-23  4:41   ` Rob Herring

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).