linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add i2s support for sun8i V3 and S3 SoCs
@ 2021-02-26 10:30 Tobias Schramm
  2021-02-26 10:30 ` [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node Tobias Schramm
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tobias Schramm @ 2021-02-26 10:30 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, Tobias Schramm, linux-kernel,
	Rob Herring, linux-arm-kernel

The V3 and S3 sun8i SoCs have an i2s peripheral. This set of
patches adds it to their dts.

Additionally this patchset also adds the V3s DMA controller to its
dts, since the i2s peripheral requires DMA to function properly.

Tobias Schramm (3):
  ARM: dts: sun8i: V3s/V3/S3: add dma controller node
  ARM: dts: sun8i: V3s/V3/S3: add soc node label
  ARM: dts: sun8i: V3/S3: add i2s peripheral

 arch/arm/boot/dts/sun8i-v3.dtsi  | 15 +++++++++++++++
 arch/arm/boot/dts/sun8i-v3s.dtsi | 11 ++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

-- 
2.30.1


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

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

* [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node
  2021-02-26 10:30 [PATCH 0/3] Add i2s support for sun8i V3 and S3 SoCs Tobias Schramm
@ 2021-02-26 10:30 ` Tobias Schramm
  2021-03-02  9:11   ` Maxime Ripard
  2021-02-26 10:30 ` [PATCH 2/3] ARM: dts: sun8i: V3s/V3/S3: add soc node label Tobias Schramm
  2021-02-26 10:30 ` [PATCH 3/3] ARM: dts: sun8i: V3/S3: add i2s peripheral Tobias Schramm
  2 siblings, 1 reply; 6+ messages in thread
From: Tobias Schramm @ 2021-02-26 10:30 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, Tobias Schramm, linux-kernel,
	Rob Herring, linux-arm-kernel

The V3s, V3 and S3 SoCs have a dma controller. Add it to the dts.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index f8f19d8fa795..89286d3d35d1 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -163,6 +163,15 @@ syscon: system-control@1c00000 {
 			ranges;
 		};
 
+		dma: dma-controller@1c02000 {
+			compatible = "allwinner,sun8i-v3s-dma";
+			reg = <0x01c02000 0x1000>;
+			interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_DMA>;
+			resets = <&ccu RST_BUS_DMA>;
+			#dma-cells = <1>;
+		};
+
 		tcon0: lcd-controller@1c0c000 {
 			compatible = "allwinner,sun8i-v3s-tcon";
 			reg = <0x01c0c000 0x1000>;
-- 
2.30.1


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

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

* [PATCH 2/3] ARM: dts: sun8i: V3s/V3/S3: add soc node label
  2021-02-26 10:30 [PATCH 0/3] Add i2s support for sun8i V3 and S3 SoCs Tobias Schramm
  2021-02-26 10:30 ` [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node Tobias Schramm
@ 2021-02-26 10:30 ` Tobias Schramm
  2021-02-26 10:30 ` [PATCH 3/3] ARM: dts: sun8i: V3/S3: add i2s peripheral Tobias Schramm
  2 siblings, 0 replies; 6+ messages in thread
From: Tobias Schramm @ 2021-02-26 10:30 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, Tobias Schramm, linux-kernel,
	Rob Herring, linux-arm-kernel

The V3/S3 add an i2s peripheral over the features of the V3s. Add a label
to the soc node, such that the V3 dts can add the i2s peripheral.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index 89286d3d35d1..308ba85f4661 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -113,7 +113,7 @@ osc32k: osc32k_clk {
 		};
 	};
 
-	soc {
+	soc: soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.30.1


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

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

* [PATCH 3/3] ARM: dts: sun8i: V3/S3: add i2s peripheral
  2021-02-26 10:30 [PATCH 0/3] Add i2s support for sun8i V3 and S3 SoCs Tobias Schramm
  2021-02-26 10:30 ` [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node Tobias Schramm
  2021-02-26 10:30 ` [PATCH 2/3] ARM: dts: sun8i: V3s/V3/S3: add soc node label Tobias Schramm
@ 2021-02-26 10:30 ` Tobias Schramm
  2021-03-02  9:14   ` Maxime Ripard
  2 siblings, 1 reply; 6+ messages in thread
From: Tobias Schramm @ 2021-02-26 10:30 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, Tobias Schramm, linux-kernel,
	Rob Herring, linux-arm-kernel

The V3 and S3 SoCs feature an i2s peripheral identical to that of the H3.
Add it to the dts.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
 arch/arm/boot/dts/sun8i-v3.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-v3.dtsi b/arch/arm/boot/dts/sun8i-v3.dtsi
index c279e13583ba..17ea6b8f091f 100644
--- a/arch/arm/boot/dts/sun8i-v3.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3.dtsi
@@ -30,3 +30,18 @@ uart1_pg_pins: uart1-pg-pins {
 		function = "uart1";
 	};
 };
+
+&soc {
+		i2s0: i2s@1c22000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-h3-i2s";
+			reg = <0x01c22000 0x400>;
+			interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_I2S0>, <&ccu CLK_I2S0>;
+			clock-names = "apb", "mod";
+			dmas = <&dma 3>, <&dma 3>;
+			dma-names = "rx", "tx";
+			resets = <&ccu RST_BUS_I2S0>;
+			status = "disabled";
+		};
+};
-- 
2.30.1


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

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

* Re: [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node
  2021-02-26 10:30 ` [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node Tobias Schramm
@ 2021-03-02  9:11   ` Maxime Ripard
  0 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2021-03-02  9:11 UTC (permalink / raw)
  To: Tobias Schramm
  Cc: devicetree, Jernej Skrabec, linux-kernel, Chen-Yu Tsai,
	Rob Herring, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 222 bytes --]

On Fri, Feb 26, 2021 at 11:30:26AM +0100, Tobias Schramm wrote:
> The V3s, V3 and S3 SoCs have a dma controller. Add it to the dts.
> 
> Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>

Applied, thanks
Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

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

* Re: [PATCH 3/3] ARM: dts: sun8i: V3/S3: add i2s peripheral
  2021-02-26 10:30 ` [PATCH 3/3] ARM: dts: sun8i: V3/S3: add i2s peripheral Tobias Schramm
@ 2021-03-02  9:14   ` Maxime Ripard
  0 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2021-03-02  9:14 UTC (permalink / raw)
  To: Tobias Schramm
  Cc: devicetree, Jernej Skrabec, linux-kernel, Chen-Yu Tsai,
	Rob Herring, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1012 bytes --]

Hi,

On Fri, Feb 26, 2021 at 11:30:28AM +0100, Tobias Schramm wrote:
> The V3 and S3 SoCs feature an i2s peripheral identical to that of the H3.
> Add it to the dts.
> 
> Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>

Why is it added to the v3 DTSI and not the global one?

> ---
>  arch/arm/boot/dts/sun8i-v3.dtsi | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-v3.dtsi b/arch/arm/boot/dts/sun8i-v3.dtsi
> index c279e13583ba..17ea6b8f091f 100644
> --- a/arch/arm/boot/dts/sun8i-v3.dtsi
> +++ b/arch/arm/boot/dts/sun8i-v3.dtsi
> @@ -30,3 +30,18 @@ uart1_pg_pins: uart1-pg-pins {
>  		function = "uart1";
>  	};
>  };
> +
> +&soc {

You don't need a label for that, you can just put it under / { soc {

> +		i2s0: i2s@1c22000 {
> +			#sound-dai-cells = <0>;
> +			compatible = "allwinner,sun8i-h3-i2s";

We should also have a v3 specific compatible here in addition to the H3
(and document it in the bindings).

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

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

end of thread, other threads:[~2021-03-02  9:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 10:30 [PATCH 0/3] Add i2s support for sun8i V3 and S3 SoCs Tobias Schramm
2021-02-26 10:30 ` [PATCH 1/3] ARM: dts: sun8i: V3s/V3/S3: add dma controller node Tobias Schramm
2021-03-02  9:11   ` Maxime Ripard
2021-02-26 10:30 ` [PATCH 2/3] ARM: dts: sun8i: V3s/V3/S3: add soc node label Tobias Schramm
2021-02-26 10:30 ` [PATCH 3/3] ARM: dts: sun8i: V3/S3: add i2s peripheral Tobias Schramm
2021-03-02  9:14   ` Maxime Ripard

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