* [PATCH 1/3] ASoC: spacemit: rename clock inputs to match binding
2026-07-22 2:35 [PATCH 0/3] SpacemiT K3: fix I2S DT integration and add controller nodes Troy Mitchell
@ 2026-07-22 2:35 ` Troy Mitchell
2026-07-22 2:49 ` sashiko-bot
2026-07-22 2:35 ` [PATCH 2/3] dt-bindings: sound: spacemit,k1-i2s: allow 6 clocks for K3 i2s1 Troy Mitchell
2026-07-22 2:35 ` [PATCH 3/3] riscv: dts: spacemit: k3: add i2s0-i2s5 nodes Troy Mitchell
2 siblings, 1 reply; 6+ messages in thread
From: Troy Mitchell @ 2026-07-22 2:35 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Yixun Lan, Jinmei Wei, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: linux-sound, linux-riscv, spacemit, linux-kernel, devicetree,
Troy Mitchell
The driver requests the per-controller SSPA bus and functional clocks
as "sspa_bus" and "sspa", but the device tree binding (spacemit,k1-i2s)
specifies them as "bus" and "func". As a result, any DT written against
the published binding fails to probe.
There are currently no in-tree DT users referencing these names, so
rename the clock inputs in the driver to match the binding rather than
changing the binding. While at it, rename the matching struct member
sspa_clk to func_clk for consistency with the new clock-names.
Fixes: fce217449075 ("ASoC: spacemit: add i2s support for K1 SoC")
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
sound/soc/spacemit/k1_i2s.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/spacemit/k1_i2s.c b/sound/soc/spacemit/k1_i2s.c
index 8871fc15b29c..4247d8d3a637 100644
--- a/sound/soc/spacemit/k1_i2s.c
+++ b/sound/soc/spacemit/k1_i2s.c
@@ -52,7 +52,7 @@ struct spacemit_i2s_dev {
struct clk *sysclk;
struct clk *bclk;
- struct clk *sspa_clk;
+ struct clk *func_clk;
struct clk *sysclk_div;
struct clk *c_sysclk;
struct clk *c_bclk;
@@ -221,7 +221,7 @@ static int spacemit_i2s_hw_params(struct snd_pcm_substream *substream,
if (ret)
return ret;
- return clk_set_rate(i2s->sspa_clk, bclk_rate);
+ return clk_set_rate(i2s->func_clk, bclk_rate);
}
static int spacemit_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, int clk_id,
@@ -445,14 +445,14 @@ static int spacemit_i2s_probe(struct platform_device *pdev)
if (IS_ERR(i2s->bclk))
return dev_err_probe(i2s->dev, PTR_ERR(i2s->bclk), "failed to enable bit clock\n");
- clk = devm_clk_get_enabled(i2s->dev, "sspa_bus");
+ clk = devm_clk_get_enabled(i2s->dev, "bus");
if (IS_ERR(clk))
- return dev_err_probe(i2s->dev, PTR_ERR(clk), "failed to enable sspa_bus clock\n");
+ return dev_err_probe(i2s->dev, PTR_ERR(clk), "failed to enable bus clock\n");
- i2s->sspa_clk = devm_clk_get_enabled(i2s->dev, "sspa");
- if (IS_ERR(i2s->sspa_clk))
- return dev_err_probe(i2s->dev, PTR_ERR(i2s->sspa_clk),
- "failed to enable sspa clock\n");
+ i2s->func_clk = devm_clk_get_enabled(i2s->dev, "func");
+ if (IS_ERR(i2s->func_clk))
+ return dev_err_probe(i2s->dev, PTR_ERR(i2s->func_clk),
+ "failed to enable func clock\n");
i2s->sysclk_div = devm_clk_get_optional_enabled(i2s->dev, "sysclk_div");
if (IS_ERR(i2s->sysclk_div))
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] dt-bindings: sound: spacemit,k1-i2s: allow 6 clocks for K3 i2s1
2026-07-22 2:35 [PATCH 0/3] SpacemiT K3: fix I2S DT integration and add controller nodes Troy Mitchell
2026-07-22 2:35 ` [PATCH 1/3] ASoC: spacemit: rename clock inputs to match binding Troy Mitchell
@ 2026-07-22 2:35 ` Troy Mitchell
2026-07-22 2:35 ` [PATCH 3/3] riscv: dts: spacemit: k3: add i2s0-i2s5 nodes Troy Mitchell
2 siblings, 0 replies; 6+ messages in thread
From: Troy Mitchell @ 2026-07-22 2:35 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Yixun Lan, Jinmei Wei, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: linux-sound, linux-riscv, spacemit, linux-kernel, devicetree,
Troy Mitchell
The K3 I2S controllers normally use the published 7-clock layout:
sysclk, bclk, bus, func, sysclk_div, c_sysclk, c_bclk
However, K3 i2s1 has no dedicated sysclk divider and therefore uses a
6-clock layout:
sysclk, bclk, bus, func, c_sysclk, c_bclk
Describe the 4-clock K1 and both K3 layouts as separate tuples. Lower
the K3 minimum from 7 to 6 clocks while preserving the existing
7-clock ordering.
Fixes: 6bc6b28c0314 ("ASoC: dt-bindings: add SpacemiT K3 SoC compatible")
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
.../devicetree/bindings/sound/spacemit,k1-i2s.yaml | 64 +++++++++++++++-------
1 file changed, 44 insertions(+), 20 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/spacemit,k1-i2s.yaml b/Documentation/devicetree/bindings/sound/spacemit,k1-i2s.yaml
index 240d90402e4f..72723f067b2a 100644
--- a/Documentation/devicetree/bindings/sound/spacemit,k1-i2s.yaml
+++ b/Documentation/devicetree/bindings/sound/spacemit,k1-i2s.yaml
@@ -23,9 +23,9 @@ allOf:
then:
properties:
clocks:
- minItems: 7
+ minItems: 6
clock-names:
- minItems: 7
+ minItems: 6
else:
properties:
clocks:
@@ -43,26 +43,50 @@ properties:
maxItems: 1
clocks:
- minItems: 4
- items:
- - description: clock for I2S sysclk
- - description: clock for I2S bclk
- - description: clock for I2S bus
- - description: clock for I2S controller
- - description: clock for I2S sysclk divider
- - description: clock for I2S common sysclk
- - description: clock for I2S common bclk
+ oneOf:
+ - items:
+ - description: clock for I2S sysclk
+ - description: clock for I2S bclk
+ - description: clock for I2S bus
+ - description: clock for I2S controller
+ - items:
+ - description: clock for I2S sysclk
+ - description: clock for I2S bclk
+ - description: clock for I2S bus
+ - description: clock for I2S controller
+ - description: clock for I2S common sysclk
+ - description: clock for I2S common bclk
+ - items:
+ - description: clock for I2S sysclk
+ - description: clock for I2S bclk
+ - description: clock for I2S bus
+ - description: clock for I2S controller
+ - description: clock for I2S sysclk divider
+ - description: clock for I2S common sysclk
+ - description: clock for I2S common bclk
clock-names:
- minItems: 4
- items:
- - const: sysclk
- - const: bclk
- - const: bus
- - const: func
- - const: sysclk_div
- - const: c_sysclk
- - const: c_bclk
+ oneOf:
+ - items:
+ - const: sysclk
+ - const: bclk
+ - const: bus
+ - const: func
+ - items:
+ - const: sysclk
+ - const: bclk
+ - const: bus
+ - const: func
+ - const: c_sysclk
+ - const: c_bclk
+ - items:
+ - const: sysclk
+ - const: bclk
+ - const: bus
+ - const: func
+ - const: sysclk_div
+ - const: c_sysclk
+ - const: c_bclk
dmas:
minItems: 1
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] riscv: dts: spacemit: k3: add i2s0-i2s5 nodes
2026-07-22 2:35 [PATCH 0/3] SpacemiT K3: fix I2S DT integration and add controller nodes Troy Mitchell
2026-07-22 2:35 ` [PATCH 1/3] ASoC: spacemit: rename clock inputs to match binding Troy Mitchell
2026-07-22 2:35 ` [PATCH 2/3] dt-bindings: sound: spacemit,k1-i2s: allow 6 clocks for K3 i2s1 Troy Mitchell
@ 2026-07-22 2:35 ` Troy Mitchell
2026-07-22 2:47 ` sashiko-bot
2 siblings, 1 reply; 6+ messages in thread
From: Troy Mitchell @ 2026-07-22 2:35 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Yixun Lan, Jinmei Wei, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: linux-sound, linux-riscv, spacemit, linux-kernel, devicetree,
Troy Mitchell
Add the six SSPA-based I2S controller nodes for the K3 SoC.
i2s0 and i2s2-i2s5 each have a dedicated per-controller sysclk
divider, so they use the published 7-clock layout (sysclk, bclk, bus,
func, sysclk_div, c_sysclk, c_bclk).
i2s1 uses 6 clocks (sysclk, bclk, bus, func, c_sysclk, c_bclk) because
its sysclk is driven directly by a DDN (ISCCR0) and has no separate
divider stage.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
arch/riscv/boot/dts/spacemit/k3.dtsi | 119 +++++++++++++++++++++++++++++++++++
1 file changed, 119 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index 19fc9b49668e..967e5d87527a 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -1081,6 +1081,125 @@ uart10: serial@d401f000 {
status = "disabled";
};
+ i2s0: i2s@d4026000 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4026000 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S0_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S0_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S0_BUS>,
+ <&syscon_apbc CLK_APBC_I2S0>,
+ <&syscon_mpmu CLK_MPMU_I2S0_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma 21>, <&pdma 22>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S0>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s1: i2s@d4026800 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4026800 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S1_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S1_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S1_BUS>,
+ <&syscon_apbc CLK_APBC_I2S1>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "c_sysclk", "c_bclk";
+ dmas = <&pdma 23>, <&pdma 24>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S1>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s2: i2s@d4027000 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4027000 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S2_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S2_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S2_BUS>,
+ <&syscon_apbc CLK_APBC_I2S2>,
+ <&syscon_mpmu CLK_MPMU_I2S2_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma 56>, <&pdma 57>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S2>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s3: i2s@d4027800 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4027800 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S3_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S3_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S3_BUS>,
+ <&syscon_apbc CLK_APBC_I2S3>,
+ <&syscon_mpmu CLK_MPMU_I2S3_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma 58>, <&pdma 59>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S3>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s4: i2s@d4041000 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4041000 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S4_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S4_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S4_BUS>,
+ <&syscon_apbc CLK_APBC_I2S4>,
+ <&syscon_mpmu CLK_MPMU_I2S4_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma 60>, <&pdma 61>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S4>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
+ i2s5: i2s@d4041800 {
+ compatible = "spacemit,k3-i2s";
+ reg = <0x0 0xd4041800 0x0 0x30>;
+ clocks = <&syscon_mpmu CLK_MPMU_I2S5_SYSCLK>,
+ <&syscon_apbc CLK_APBC_I2S5_BCLK>,
+ <&syscon_apbc CLK_APBC_I2S5_BUS>,
+ <&syscon_apbc CLK_APBC_I2S5>,
+ <&syscon_mpmu CLK_MPMU_I2S5_SYSCLK_DIV>,
+ <&syscon_mpmu CLK_MPMU_I2S_SYSCLK>,
+ <&syscon_mpmu CLK_MPMU_I2S_BCLK>;
+ clock-names = "sysclk", "bclk", "bus", "func",
+ "sysclk_div", "c_sysclk", "c_bclk";
+ dmas = <&pdma 62>, <&pdma 63>;
+ dma-names = "tx", "rx";
+ resets = <&syscon_apbc RESET_APBC_I2S5>;
+ #sound-dai-cells = <0>;
+
+ status = "disabled";
+ };
+
syscon_mpmu: system-controller@d4050000 {
compatible = "spacemit,k3-syscon-mpmu";
reg = <0x0 0xd4050000 0x0 0x10000>;
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread