Discussion:
[PATCH 0/5] Add tested digital audio blocks to A64
(too old to reply)
c***@gmail.com
2018-01-24 10:39:38 UTC
Permalink
From: Marcus Cooper <***@gmail.com>

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(+)
--
2.16.0
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2018-01-24 10:39:40 UTC
Permalink
From: Marcus Cooper <***@gmail.com>

Add the SPDIF TX pin to the A64 dtsi.

Signed-off-by: Marcus Cooper <***@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index c82979038b0b..db1694ec3ee4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -336,6 +336,11 @@
drive-strength = <40>;
};

+ spdif_tx_pins_a: ***@0 {
+ pins = "PH8";
+ function = "spdif";
+ };
+
spi0_pins: spi0 {
pins = "PC0", "PC1", "PC2", "PC3";
function = "spi0";
--
2.16.0
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-24 11:00:31 UTC
Permalink
Post by c***@gmail.com
Add the SPDIF TX pin to the A64 dtsi.
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index c82979038b0b..db1694ec3ee4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -336,6 +336,11 @@
drive-strength = <40>;
};
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
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Chen-Yu Tsai
2018-01-24 11:02:08 UTC
Permalink
On Wed, Jan 24, 2018 at 7:00 PM, Maxime Ripard
Post by Maxime Ripard
Post by c***@gmail.com
Add the SPDIF TX pin to the A64 dtsi.
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index c82979038b0b..db1694ec3ee4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -336,6 +336,11 @@
drive-strength = <40>;
};
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
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Code Kipper
2018-01-24 11:40:37 UTC
Permalink
Post by Chen-Yu Tsai
On Wed, Jan 24, 2018 at 7:00 PM, Maxime Ripard
Post by Maxime Ripard
Post by c***@gmail.com
Add the SPDIF TX pin to the A64 dtsi.
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index c82979038b0b..db1694ec3ee4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -336,6 +336,11 @@
drive-strength = <40>;
};
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.
ACK
Thanks,
CK
Post by Chen-Yu Tsai
ChenYu
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2018-01-24 10:39:39 UTC
Permalink
From: Marcus Cooper <***@gmail.com>

Add the SPDIF transceiver controller block to the A64 dtsi.

Signed-off-by: Marcus Cooper <***@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index d783d164b9c3..c82979038b0b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -382,6 +382,19 @@
};
};

+ spdif: ***@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: ***@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
--
2.16.0
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-24 10:59:25 UTC
Permalink
Hi,
Post by c***@gmail.com
Add the SPDIF transceiver controller block to the A64 dtsi.
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index d783d164b9c3..c82979038b0b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -382,6 +382,19 @@
};
};
+ #sound-dai-cells = <0>;
+ compatible = "allwinner,sun8i-h3-spdif";
Please add a SoC-specific compatible here, in addition the H3.

Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2018-01-24 10:39:42 UTC
Permalink
From: Marcus Cooper <***@gmail.com>

---
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 604cdaedac38..70e8ff9a1f38 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -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
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Code Kipper
2018-01-24 12:10:58 UTC
Permalink
NACK.....just noticed the lack of commit message...mmmm
BR,
CK
Post by c***@gmail.com
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 604cdaedac38..70e8ff9a1f38 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -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
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2018-01-24 10:39:41 UTC
Permalink
From: Marcus Cooper <***@gmail.com>

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

Signed-off-by: Marcus Cooper <***@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index db1694ec3ee4..f060a58f374c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -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
--
2.16.0
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-24 11:01:24 UTC
Permalink
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index db1694ec3ee4..f060a58f374c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -112,6 +112,25 @@
method = "smc";
};
+
+ sound_spdif {
Nit: You should drop the extra blank line here.

Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Code Kipper
2018-01-24 11:40:10 UTC
Permalink
On 24 January 2018 at 12:01, Maxime Ripard
Post by Maxime Ripard
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index db1694ec3ee4..f060a58f374c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -112,6 +112,25 @@
method = "smc";
};
+
+ sound_spdif {
Nit: You should drop the extra blank line here.
ACK
Thanks,
CK
Post by Maxime Ripard
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
c***@gmail.com
2018-01-24 10:39:43 UTC
Permalink
From: Marcus Cooper <***@gmail.com>

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

Signed-off-by: Marcus Cooper <***@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};

+ i2s0: ***@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: ***@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: ***@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
--
2.16.0
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-24 11:02:22 UTC
Permalink
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #sound-dai-cells = <0>;
+ compatible = "allwinner,sun8i-h3-i2s";
Same remark than for the spdif, please add a soc-specific compatible.

Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Code Kipper
2018-01-24 11:39:31 UTC
Permalink
On 24 January 2018 at 12:02, Maxime Ripard
Post by Maxime Ripard
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #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
Post by Maxime Ripard
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-25 08:29:04 UTC
Permalink
Post by Code Kipper
On 24 January 2018 at 12:02, Maxime Ripard
Post by Maxime Ripard
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #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.
Post by Code Kipper
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
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Code Kipper
2018-01-25 09:07:45 UTC
Permalink
On 25 January 2018 at 09:29, Maxime Ripard
Post by Maxime Ripard
Post by Code Kipper
On 24 January 2018 at 12:02, Maxime Ripard
Post by Maxime Ripard
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #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.
Post by Code Kipper
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.
ACK, but is there any reason why we're not doing this for i2c?
BR,
CK
Post by Maxime Ripard
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-25 15:13:47 UTC
Permalink
Post by Code Kipper
On 25 January 2018 at 09:29, Maxime Ripard
Post by Maxime Ripard
Post by Code Kipper
On 24 January 2018 at 12:02, Maxime Ripard
Post by Maxime Ripard
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #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.
Post by Code Kipper
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.
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
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Code Kipper
2018-01-25 09:46:15 UTC
Permalink
On 25 January 2018 at 09:29, Maxime Ripard
Post by Maxime Ripard
Post by Code Kipper
On 24 January 2018 at 12:02, Maxime Ripard
Post by Maxime Ripard
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #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.
Post by Code Kipper
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.
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
Post by Maxime Ripard
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
2018-01-25 15:31:42 UTC
Permalink
Post by Code Kipper
On 25 January 2018 at 09:29, Maxime Ripard
Post by Maxime Ripard
Post by Code Kipper
On 24 January 2018 at 12:02, Maxime Ripard
Post by Maxime Ripard
Hi,
Post by c***@gmail.com
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(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index f060a58f374c..f3354f8c2026 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -419,6 +419,32 @@
status = "disabled";
};
+ #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.
Post by Code Kipper
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.
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
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...