Skip to contentSkip to conversation

Add tested digital audio blocks to A64

PATCH Superseded codekipper at gmail.com 3 participants 20 messages Jan 24, 2018 – Jan 25, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add tested digital audio blocks to A64

From: Marcus Cooper <[email protected]>

Hi All,

this patch series adds the digital audio blocks to the A64 SoC. No block changes are necessary.

BR,
CK

Marcus Cooper (5):
arm64: allwinner: a64: Add the SPDIF block
arm64: allwinner: a64: Add SPDIF TX pin to the A64
arm64: allwinner: a64: Add SPDIF to the A64
arm64: allwinner: a64: Add SPDIF to the Pine64
arm64: allwinner: a64: Add DAI nodes

 .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts |  7 +++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      | 63 ++++++++++++++++++++++
 2 files changed, 70 insertions(+)
Signature · 1 line
2.16.0
#1 lore raw

PATCH 1/5 arm64: allwinner: a64: Add the SPDIF block

From: Marcus Cooper <[email protected]>

Add the SPDIF transceiver controller block to the A64 dtsi.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +13 -0
index d783d164b9c3..c82979038b0b 100644
@@ -382,6 +382,19 @@
 			};
 		};
 
+		spdif: spdif at 1c21000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-h3-spdif";
+			reg = <0x01c21000 0x400>;
+			interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
+			resets = <&ccu RST_BUS_SPDIF>;
+			clock-names = "apb", "spdif";
+			dmas = <&dma 2>;
+			dma-names = "tx";
+			status = "disabled";
+		};
+
 		uart0: serial at 1c28000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x01c28000 0x400>;
Signature · 1 line
2.16.0
#2 lore raw

PATCH 1/5 arm64: allwinner: a64: Add the SPDIF block

Hi,

Quoted 14 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the SPDIF transceiver controller block to the A64 dtsi.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index d783d164b9c3..c82979038b0b 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 387

Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
@@ -382,6 +382,19 @@
 			};
 		};
 
+		spdif: spdif at 1c21000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-h3-spdif";

Please add a SoC-specific compatible here, in addition the H3.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180124/4c2b7f9c/attachment.sig>
#3 lore raw

PATCH 2/5 arm64: allwinner: a64: Add SPDIF TX pin to the A64

In reply to codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the SPDIF TX pin to the A64 dtsi.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +5 -0
index c82979038b0b..db1694ec3ee4 100644
@@ -336,6 +336,11 @@
 				drive-strength = <40>;
 			};
 
+			spdif_tx_pins_a: spdif at 0 {
+				pins = "PH8";
+				function = "spdif";
+			};
+
 			spi0_pins: spi0 {
 				pins = "PC0", "PC1", "PC2", "PC3";
 				function = "spi0";
Signature · 1 line
2.16.0
#4 lore raw

PATCH 2/5 arm64: allwinner: a64: Add SPDIF TX pin to the A64

Quoted 14 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the SPDIF TX pin to the A64 dtsi.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index c82979038b0b..db1694ec3ee4 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 339

Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +1 -0
@@ -336,6 +336,11 @@
 				drive-strength = <40>;
 			};
 
+			spdif_tx_pins_a: spdif at 0 {

This will generate a dtc warning, you should use a syntax similar to the other nodes there (ie. spdif if that's the only muxing option, or spdif-0).

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180124/044d6642/attachment.sig>
#5 lore raw

PATCH 2/5 arm64: allwinner: a64: Add SPDIF TX pin to the A64

Quoted 18 lines · Maxime Ripard
Quoted 17 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the SPDIF TX pin to the A64 dtsi.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index c82979038b0b..db1694ec3ee4 100644
@@ -336,6 +336,11 @@
                              drive-strength = <40>;
                      };
 
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 339

Quoted 1 line
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +1 -0
+                     spdif_tx_pins_a: spdif at 0 {

This will generate a dtc warning, you should use a syntax similar to the other nodes there (ie. spdif if that's the only muxing option, or spdif-0).

Furthermore, if this is the only option, you should set it as the default in the .dtsi, so boards don't have to, and possibly squash this patch into the first one.

ChenYu

#6 lore raw

PATCH 2/5 arm64: allwinner: a64: Add SPDIF TX pin to the A64

Quoted 26 lines · Chen-Yu Tsai
Quoted 18 lines · Maxime Ripard
Quoted 17 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the SPDIF TX pin to the A64 dtsi.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index c82979038b0b..db1694ec3ee4 100644
@@ -336,6 +336,11 @@
                              drive-strength = <40>;
                      };
 
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 339

Quoted 1 line
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +1 -0
+                     spdif_tx_pins_a: spdif at 0 {

This will generate a dtc warning, you should use a syntax similar to the other nodes there (ie. spdif if that's the only muxing option, or spdif-0).

Quoted 3 lines

Furthermore, if this is the only option, you should set it as the default in the .dtsi, so boards don't have to, and possibly squash this patch into the first one.

ACK
Thanks,
CK

Quoted 2 lines

ChenYu

#7 lore raw

PATCH 3/5 arm64: allwinner: a64: Add SPDIF to the A64

In reply to codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the device tree sound bindings for the S/PDIF block.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +19 -0
index db1694ec3ee4..f060a58f374c 100644
@@ -112,6 +112,25 @@
 		method = "smc";
 	};
 
+
+	sound_spdif {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "On-board SPDIF";
+
+		simple-audio-card,cpu {
+			sound-dai = <&spdif>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&spdif_out>;
+		};
+	};
+
+	spdif_out: spdif-out {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13
Signature · 1 line
2.16.0
#8 lore raw

PATCH 3/5 arm64: allwinner: a64: Add SPDIF to the A64

Quoted 14 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the device tree sound bindings for the S/PDIF block.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index db1694ec3ee4..f060a58f374c 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 116

Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +2 -0
@@ -112,6 +112,25 @@
 		method = "smc";
 	};
 
+
+	sound_spdif {

Nit: You should drop the extra blank line here.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180124/edd4a981/attachment.sig>
#9 lore raw

PATCH 3/5 arm64: allwinner: a64: Add SPDIF to the A64

Quoted 18 lines · Maxime Ripard
Quoted 17 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the device tree sound bindings for the S/PDIF block.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index db1694ec3ee4..f060a58f374c 100644
@@ -112,6 +112,25 @@
              method = "smc";
      };
 
Quoted 4 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 116

Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +2 -0
+
+     sound_spdif {

Nit: You should drop the extra blank line here.

ACK
Thanks,
CK

Quoted 7 lines

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

#10 lore raw

PATCH 4/5 arm64: allwinner: a64: Add SPDIF to the Pine64

In reply to codekipper at gmail.com

From: Marcus Cooper <[email protected]>

---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +7 -0
index 604cdaedac38..70e8ff9a1f38 100644
@@ -230,6 +230,13 @@
 	regulator-name = "vcc-rtc";
 };
 
+/* On Euler connector */
+&spdif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spdif_tx_pins_a>;
+	status = "disabled";
+};
+
 /* On Exp and Euler connectors */
 &uart0 {
 	pinctrl-names = "default";
Signature · 1 line
2.16.0
#11 lore raw

PATCH 4/5 arm64: allwinner: a64: Add SPDIF to the Pine64

Quoted 2 lines · On 24 January 2018 at 11:39, <[email protected]> wrote:

From: Marcus Cooper <[email protected]>

NACK.....just noticed the lack of commit message...mmmm BR,
CK

Quoted 25 lines
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +7 -1
index 604cdaedac38..70e8ff9a1f38 100644
@@ -230,6 +230,13 @@
        regulator-name = "vcc-rtc";
 };
 
+/* On Euler connector */
+&spdif {
+       pinctrl-names = "default";
+       pinctrl-0 = <&spdif_tx_pins_a>;
+       status = "disabled";
+};
+
 /* On Exp and Euler connectors */
 &uart0 {
        pinctrl-names = "default";
--

2.16.0

#12 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

In reply to codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +26 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
 			status = "disabled";
 		};
 
+		i2s0: i2s at 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";
+			resets = <&ccu RST_BUS_I2S0>;
+			dma-names = "rx", "tx";
+			dmas = <&dma 3>, <&dma 3>;
+			status = "disabled";
+		};
+
+		i2s1: i2s at 1c22400 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-h3-i2s";
+			reg = <0x01c22400 0x400>;
+			interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>;
+			clock-names = "apb", "mod";
+			resets = <&ccu RST_BUS_I2S1>;
+			dma-names = "rx", "tx";
+			dmas = <&dma 4>, <&dma 4>;
+			status = "disabled";
+		};
+
 		uart0: serial at 1c28000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x01c28000 0x400>;
Signature · 1 line
2.16.0
#13 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

Hi,

Quoted 15 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
@@ -419,6 +419,32 @@
 			status = "disabled";
 		};
 
+		i2s0: i2s at 1c22000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180124/768252f6/attachment.sig>
#14 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

Quoted 21 lines · Maxime Ripard

Hi,

Quoted 18 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
                      status = "disabled";
              };
 
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
+             i2s0: i2s at 1c22000 {
+                     #sound-dai-cells = <0>;
+                     compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Is that really necessary?..for example on the a20 the functionality of the i2s is the same as the a10 so it is down as "allwinner,sun4i-a10-i2s", likewise here it's the same as the changes required for the H3. I was planning on using the compatible "allwinner,sun50i-a64-i2s" for the audio codec as there are some quirks that need to be addressed.

Thanks,
CK

Quoted 8 lines

Thanks!
Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

#15 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

Quoted 23 lines · Code Kipper
Quoted 21 lines · Maxime Ripard

Hi,

Quoted 18 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
                      status = "disabled";
              };
 
Quoted 7 lines
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
+             i2s0: i2s at 1c22000 {
+                     #sound-dai-cells = <0>;
+                     compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Is that really necessary?..

Yes.

Quoted 5 lines

for example on the a20 the functionality of the i2s is the same as the a10 so it is down as "allwinner,sun4i-a10-i2s", likewise here it's the same as the changes required for the H3. I was planning on using the compatible "allwinner,sun50i-a64-i2s" for the audio codec as there are some quirks that need to be addressed.

And this is exactly why it is necessary. If we ever find a quirk in the future, supporting that quirk will be smooth if we already have a compatible for that SoC in the DT, and a pain if we don't.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180125/5a086062/attachment.sig>
#16 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

Quoted 40 lines · Maxime Ripard
Quoted 23 lines · Code Kipper
Quoted 21 lines · Maxime Ripard

Hi,

Quoted 18 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
                      status = "disabled";
              };
 
Quoted 7 lines
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
+             i2s0: i2s at 1c22000 {
+                     #sound-dai-cells = <0>;
+                     compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Is that really necessary?..

Yes.

Quoted 5 lines

for example on the a20 the functionality of the i2s is the same as the a10 so it is down as "allwinner,sun4i-a10-i2s", likewise here it's the same as the changes required for the H3. I was planning on using the compatible "allwinner,sun50i-a64-i2s" for the audio codec as there are some quirks that need to be addressed.

Quoted 3 lines

And this is exactly why it is necessary. If we ever find a quirk in the future, supporting that quirk will be smooth if we already have a compatible for that SoC in the DT, and a pain if we don't.

ACK, but is there any reason why we're not doing this for i2c? BR,
CK

Quoted 7 lines

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

#17 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

Quoted 42 lines · Code Kipper
Quoted 40 lines · Maxime Ripard
Quoted 23 lines · Code Kipper
Quoted 21 lines · Maxime Ripard

Hi,

Quoted 18 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
                      status = "disabled";
              };
 
Quoted 7 lines
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
+             i2s0: i2s at 1c22000 {
+                     #sound-dai-cells = <0>;
+                     compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Is that really necessary?..

Yes.

Quoted 5 lines

for example on the a20 the functionality of the i2s is the same as the a10 so it is down as "allwinner,sun4i-a10-i2s", likewise here it's the same as the changes required for the H3. I was planning on using the compatible "allwinner,sun50i-a64-i2s" for the audio codec as there are some quirks that need to be addressed.

Quoted 5 lines
Quoted 3 lines

And this is exactly why it is necessary. If we ever find a quirk in the future, supporting that quirk will be smooth if we already have a compatible for that SoC in the DT, and a pain if we don't.

ACK, but is there any reason why we're not doing this for i2c?

We try to do that for all the IPs, but some fell through the cracks.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180125/7c248d0d/attachment.sig>
#18 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

In reply to Maxime Ripard
Quoted 40 lines · Maxime Ripard
Quoted 23 lines · Code Kipper
Quoted 21 lines · Maxime Ripard

Hi,

Quoted 18 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
                      status = "disabled";
              };
 
Quoted 7 lines
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
+             i2s0: i2s at 1c22000 {
+                     #sound-dai-cells = <0>;
+                     compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Is that really necessary?..

Yes.

Quoted 5 lines

for example on the a20 the functionality of the i2s is the same as the a10 so it is down as "allwinner,sun4i-a10-i2s", likewise here it's the same as the changes required for the H3. I was planning on using the compatible "allwinner,sun50i-a64-i2s" for the audio codec as there are some quirks that need to be addressed.

Quoted 3 lines

And this is exactly why it is necessary. If we ever find a quirk in the future, supporting that quirk will be smooth if we already have a compatible for that SoC in the DT, and a pain if we don't.

Hi Maxime,
so just to comfirm. I'll make this change
compatible = "allwinner,sun50i-a64-i2s", "allwinner,sun8i-h3-i2s"; to the dtsi and later will add to the i2s driver the compatible "allwinner,sun50i-a64-i2s-audio-codec"(or something other than allwinner,sun50i-a64-i2s) for the quirks required for the i2s block used for the audio codec.
BR,
CK

Quoted 7 lines

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

#19 lore raw

PATCH 5/5 arm64: allwinner: a64: Add DAI nodes

Quoted 45 lines · Code Kipper
Quoted 40 lines · Maxime Ripard
Quoted 23 lines · Code Kipper
Quoted 21 lines · Maxime Ripard

Hi,

Quoted 18 lines · codekipper at gmail.com

From: Marcus Cooper <[email protected]>

Add the DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0 -0
index f060a58f374c..f3354f8c2026 100644
@@ -419,6 +419,32 @@
                      status = "disabled";
              };
 
Quoted 7 lines
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi line 424

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
+             i2s0: i2s at 1c22000 {
+                     #sound-dai-cells = <0>;
+                     compatible = "allwinner,sun8i-h3-i2s";

Same remark than for the spdif, please add a soc-specific compatible.

Is that really necessary?..

Yes.

Quoted 5 lines

for example on the a20 the functionality of the i2s is the same as the a10 so it is down as "allwinner,sun4i-a10-i2s", likewise here it's the same as the changes required for the H3. I was planning on using the compatible "allwinner,sun50i-a64-i2s" for the audio codec as there are some quirks that need to be addressed.

Quoted 3 lines

And this is exactly why it is necessary. If we ever find a quirk in the future, supporting that quirk will be smooth if we already have a compatible for that SoC in the DT, and a pain if we don't.

Quoted 7 lines

Hi Maxime,
so just to comfirm. I'll make this change
compatible = "allwinner,sun50i-a64-i2s", "allwinner,sun8i-h3-i2s"; to the dtsi and later will add to the i2s driver the compatible "allwinner,sun50i-a64-i2s-audio-codec"(or something other than allwinner,sun50i-a64-i2s) for the quirks required for the i2s block used for the audio codec.

That looks reasonable yes.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180125/c8289507/attachment-0001.sig>