linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC
@ 2023-05-09 12:42 Aidan MacDonald
  2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Aidan MacDonald @ 2023-05-09 12:42 UTC (permalink / raw)
  To: broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt, tsbogend, paul
  Cc: lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

The X1000's AIC is similar to the AIC found on other Ingenic SoCs.
It has symmetric playback/capture rates like the JZ4740, but more
flexible clocking when outputting the system or bit clocks.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 sound/soc/jz4740/jz4740-i2s.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 6d9cfe0a5041..7cb563bb8b09 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -329,6 +329,14 @@ static const struct i2s_soc_info jz4760_i2s_soc_info = {
 	.field_i2sdiv_playback	= REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 3),
 };
 
+static const struct i2s_soc_info x1000_i2s_soc_info = {
+	.dai = &jz4740_i2s_dai,
+	.field_rx_fifo_thresh	= REG_FIELD(JZ_REG_AIC_CONF, 24, 27),
+	.field_tx_fifo_thresh	= REG_FIELD(JZ_REG_AIC_CONF, 16, 20),
+	.field_i2sdiv_capture	= REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 8),
+	.field_i2sdiv_playback	= REG_FIELD(JZ_REG_AIC_CLK_DIV, 0, 8),
+};
+
 static struct snd_soc_dai_driver jz4770_i2s_dai = {
 	.probe = jz4740_i2s_dai_probe,
 	.playback = {
@@ -440,6 +448,7 @@ static const struct of_device_id jz4740_of_matches[] = {
 	{ .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info },
 	{ .compatible = "ingenic,jz4770-i2s", .data = &jz4770_i2s_soc_info },
 	{ .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info },
+	{ .compatible = "ingenic,x1000-i2s", .data = &x1000_i2s_soc_info },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, jz4740_of_matches);
-- 
2.39.2


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

* [PATCH v1 2/3] ASoC: ingenic: Add compatible string for X1000 SoC
  2023-05-09 12:42 [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Aidan MacDonald
@ 2023-05-09 12:42 ` Aidan MacDonald
  2023-05-09 12:53   ` Krzysztof Kozlowski
  2023-05-09 12:42 ` [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node Aidan MacDonald
  2023-05-11  6:02 ` (subset) [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Aidan MacDonald @ 2023-05-09 12:42 UTC (permalink / raw)
  To: broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt, tsbogend, paul
  Cc: lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

The audio controller in the X1000 is similar to the JZ47xx SoCs.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 Documentation/devicetree/bindings/sound/ingenic,aic.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/ingenic,aic.yaml b/Documentation/devicetree/bindings/sound/ingenic,aic.yaml
index c59a7cd9eaa9..d15c000f14e1 100644
--- a/Documentation/devicetree/bindings/sound/ingenic,aic.yaml
+++ b/Documentation/devicetree/bindings/sound/ingenic,aic.yaml
@@ -23,6 +23,7 @@ properties:
           - ingenic,jz4760-i2s
           - ingenic,jz4770-i2s
           - ingenic,jz4780-i2s
+          - ingenic,x1000-i2s
       - items:
           - const: ingenic,jz4725b-i2s
           - const: ingenic,jz4740-i2s
-- 
2.39.2


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

* [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node
  2023-05-09 12:42 [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Aidan MacDonald
  2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
@ 2023-05-09 12:42 ` Aidan MacDonald
  2023-05-23  9:08   ` Thomas Bogendoerfer
  2023-05-11  6:02 ` (subset) [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Aidan MacDonald @ 2023-05-09 12:42 UTC (permalink / raw)
  To: broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt, tsbogend, paul
  Cc: lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

Add a node for the on-board I2S audio controller.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
 arch/mips/boot/dts/ingenic/x1000.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi
index 42e69664efd9..cc264cfff826 100644
--- a/arch/mips/boot/dts/ingenic/x1000.dtsi
+++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
@@ -417,4 +417,22 @@ otg: usb@13500000 {
 
 		status = "disabled";
 	};
+
+	aic: audio-controller@10020000 {
+		compatible = "ingenic,x1000-i2s";
+		reg = <0x10020000 0x38>;
+
+		#sound-dai-cells = <0>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <1>;
+
+		clocks = <&cgu X1000_CLK_AIC>,
+			 <&cgu X1000_CLK_I2S>;
+		clock-names = "aic", "i2s";
+
+		dmas = <&pdma X1000_DMA_I2S0_RX 0xffffffff>,
+			   <&pdma X1000_DMA_I2S0_TX 0xffffffff>;
+		dma-names = "rx", "tx";
+	};
 };
-- 
2.39.2


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

* Re: [PATCH v1 2/3] ASoC: ingenic: Add compatible string for X1000 SoC
  2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
@ 2023-05-09 12:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09 12:53 UTC (permalink / raw)
  To: Aidan MacDonald, broonie, robh+dt, krzysztof.kozlowski+dt,
	conor+dt, tsbogend, paul
  Cc: lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

On 09/05/2023 14:42, Aidan MacDonald wrote:
> The audio controller in the X1000 is similar to the JZ47xx SoCs.
> 
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
> ---
>  Documentation/devicetree/bindings/sound/ingenic,aic.yaml | 1 +

Subject: missing dt-bindings prefix (second).

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: (subset) [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC
  2023-05-09 12:42 [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Aidan MacDonald
  2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
  2023-05-09 12:42 ` [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node Aidan MacDonald
@ 2023-05-11  6:02 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2023-05-11  6:02 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, tsbogend, paul,
	Aidan MacDonald
  Cc: lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

On Tue, 09 May 2023 13:42:36 +0100, Aidan MacDonald wrote:
> The X1000's AIC is similar to the AIC found on other Ingenic SoCs.
> It has symmetric playback/capture rates like the JZ4740, but more
> flexible clocking when outputting the system or bit clocks.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: jz4740-i2s: Add support for X1000 SoC
      commit: bb1b282da4be8af998de7b5a2c600af6ef01aa4f
[2/3] ASoC: ingenic: Add compatible string for X1000 SoC
      commit: d40b28d642d52e4687c73dd098fbd8ac8e2dc1d8

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

* Re: [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node
  2023-05-09 12:42 ` [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node Aidan MacDonald
@ 2023-05-23  9:08   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Bogendoerfer @ 2023-05-23  9:08 UTC (permalink / raw)
  To: Aidan MacDonald
  Cc: broonie, robh+dt, krzysztof.kozlowski+dt, conor+dt, paul,
	lgirdwood, perex, tiwai, alsa-devel, devicetree, linux-kernel,
	linux-mips

On Tue, May 09, 2023 at 01:42:38PM +0100, Aidan MacDonald wrote:
> Add a node for the on-board I2S audio controller.
> 
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
> ---
>  arch/mips/boot/dts/ingenic/x1000.dtsi | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi
> index 42e69664efd9..cc264cfff826 100644
> --- a/arch/mips/boot/dts/ingenic/x1000.dtsi
> +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi
> @@ -417,4 +417,22 @@ otg: usb@13500000 {
>  
>  		status = "disabled";
>  	};
> +
> +	aic: audio-controller@10020000 {
> +		compatible = "ingenic,x1000-i2s";
> +		reg = <0x10020000 0x38>;
> +
> +		#sound-dai-cells = <0>;
> +
> +		interrupt-parent = <&intc>;
> +		interrupts = <1>;
> +
> +		clocks = <&cgu X1000_CLK_AIC>,
> +			 <&cgu X1000_CLK_I2S>;
> +		clock-names = "aic", "i2s";
> +
> +		dmas = <&pdma X1000_DMA_I2S0_RX 0xffffffff>,
> +			   <&pdma X1000_DMA_I2S0_TX 0xffffffff>;
> +		dma-names = "rx", "tx";
> +	};
>  };
> -- 
> 2.39.2

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2023-05-23  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 12:42 [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Aidan MacDonald
2023-05-09 12:42 ` [PATCH v1 2/3] ASoC: ingenic: Add compatible string " Aidan MacDonald
2023-05-09 12:53   ` Krzysztof Kozlowski
2023-05-09 12:42 ` [PATCH v1 3/3] mips: dts: ingenic: x1000: Add AIC device tree node Aidan MacDonald
2023-05-23  9:08   ` Thomas Bogendoerfer
2023-05-11  6:02 ` (subset) [PATCH v1 1/3] ASoC: jz4740-i2s: Add support for X1000 SoC Mark Brown

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