drivers/clk/spacemit/ccu-k1.c | 29 ++++++++++++++++++++++---- include/dt-bindings/clock/spacemit,k1-syscon.h | 2 ++ 2 files changed, 27 insertions(+), 4 deletions(-)
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. Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC") Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> --- I sent with a wrong email so resend. --- Changes in v4: - add comments - add tags - Link to v3: https://lore.kernel.org/r/20250731-k1-clk-i2s-v3-0-2f655ddb0c6f@linux.spacemit.com Changes in v3: - Fixing ABI-breaking behavior - Modify commit msgs - Link to v2: https://lore.kernel.org/r/20250722-k1-clk-i2s-v2-0-2f8edfe3dab4@linux.spacemit.com Changes in v2: - Use virtual 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): dt-bindings: clock: spacemit: CLK_SSPA_I2S_BCLK for SSPA clk: spacemit: fix sspax_clk drivers/clk/spacemit/ccu-k1.c | 29 ++++++++++++++++++++++---- include/dt-bindings/clock/spacemit,k1-syscon.h | 2 ++ 2 files changed, 27 insertions(+), 4 deletions(-) --- base-commit: 733923397fd95405a48f165c9b1fbc8c4b0a4681 change-id: 20250717-k1-clk-i2s-e4272f1f915b Best regards, -- Troy Mitchell <troy.mitchell@linux.spacemit.com>
Hi Troy, On 21:01 Tue 05 Aug , Troy Mitchell wrote: > 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. > > Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC") Fixes tag get lost when applying this series, please move to patch [2/2] or apply to both of the two patches? (I think it doesn't hurt) also, please rebase this series once 6.17-rc1 tagged as currently patch [1/2] can't be applied cleanly > Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> > --- > I sent with a wrong email so resend. > --- > Changes in v4: > - add comments > - add tags > - Link to v3: https://lore.kernel.org/r/20250731-k1-clk-i2s-v3-0-2f655ddb0c6f@linux.spacemit.com > > Changes in v3: > - Fixing ABI-breaking behavior > - Modify commit msgs > - Link to v2: https://lore.kernel.org/r/20250722-k1-clk-i2s-v2-0-2f8edfe3dab4@linux.spacemit.com > > Changes in v2: > - Use virtual 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): > dt-bindings: clock: spacemit: CLK_SSPA_I2S_BCLK for SSPA > clk: spacemit: fix sspax_clk > > drivers/clk/spacemit/ccu-k1.c | 29 ++++++++++++++++++++++---- > include/dt-bindings/clock/spacemit,k1-syscon.h | 2 ++ > 2 files changed, 27 insertions(+), 4 deletions(-) > --- > base-commit: 733923397fd95405a48f165c9b1fbc8c4b0a4681 > change-id: 20250717-k1-clk-i2s-e4272f1f915b > > Best regards, > -- > Troy Mitchell <troy.mitchell@linux.spacemit.com> > > -- Yixun Lan (dlan)
© 2016 - 2025 Red Hat, Inc.