[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819-k1-clk-i2s-generation-v4-0-80174edd04eb@linux.spacemit.com>
Date: Tue, 19 Aug 2025 09:35:08 +0800
From: Troy Mitchell <troy.mitchell@...ux.spacemit.com>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Yixun Lan <dlan@...too.org>,
Alex Elder <elder@...cstar.com>, Haylen Chu <heylenay@....org>,
Inochi Amaoto <inochiama@...look.com>
Cc: linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev,
linux-kernel@...r.kernel.org, Jinmei Wei <weijinmei@...ux.spacemit.com>,
Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH v4 0/3] clk: spacemit: fix i2s clock
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@...ux.spacemit.com>
---
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@...ux.spacemit.com>
Powered by blists - more mailing lists