2022-09-20 14:08:05

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 0/5] ARM: mvebu: Add audio support for Armada 38x

This patch series add audio support for Armada 38x. It contains commits
from Marvell linux repository

https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/a1d70444cb0476a7524273274ca8e6d52ce6f1fe
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/f365c93237787c7a64f2617da9425eb01e09e71f
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/b645bfa9121214d6456de3df6b8e577f2c01c6b3
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/829c96c206f2930e5323064cef57158bd780730d

first two squashed, rebased on top of the current linux master branch
(at v6.0-rc6) with additional patches which adds S/PDIF support on
Turris Omnia - A385 board.

Marcin Wojtas (3):
ASoC: kirkwood: enable Kirkwood driver for Armada 38x platforms
ARM: mvebu: add audio I2S controller to Armada 38x Device Tree
ARM: mvebu: add audio support to Armada 385 DB

Pali Rohár (2):
ARM: mvebu: Add spdif-pins mpp pins for Armada 38x
ARM: dts: turris-omnia: Define S/PDIF audio card

.../devicetree/bindings/sound/mvebu-audio.txt | 14 +-
arch/arm/boot/dts/armada-385-turris-omnia.dts | 27 ++++
arch/arm/boot/dts/armada-388-db.dts | 69 +++++++++
arch/arm/boot/dts/armada-38x.dtsi | 24 ++++
sound/soc/kirkwood/kirkwood-i2s.c | 136 +++++++++++++++++-
sound/soc/kirkwood/kirkwood.h | 2 +
6 files changed, 269 insertions(+), 3 deletions(-)

--
2.20.1


2022-09-20 14:08:24

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 3/5] ARM: mvebu: add audio support to Armada 385 DB

From: Marcin Wojtas <[email protected]>

This commit adds the necessary Device Tree information to enable
audio support on the Armada 385 DB platform. In details it:

* Instantiates the CS42L51 audio codec on the I2C0 bus

* Adds simple-card DT binding for audio on Armada 385 DB

* Adds description for both analog I2S and S/PDIF I/O

* Disabled by default

Signed-off-by: Marcin Wojtas <[email protected]>
Signed-off-by: Nadav Haklai <[email protected]>
Tested-by: Star_Automation <[email protected]>
Tested-by: Lior Amsalem <[email protected]>
---
arch/arm/boot/dts/armada-388-db.dts | 69 +++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)

diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts
index 5130eccc32af..2bcec5419b66 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -36,6 +36,11 @@
i2c@11000 {
status = "okay";
clock-frequency = <100000>;
+ audio_codec: audio-codec@4a {
+ #sound-dai-cells = <0>;
+ compatible = "cirrus,cs42l51";
+ reg = <0x4a>;
+ };
};

i2c@11100 {
@@ -99,6 +104,12 @@
no-1-8-v;
};

+ audio-controller@e8000 {
+ pinctrl-0 = <&i2s_pins>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+
usb3@f0000 {
status = "okay";
};
@@ -128,6 +139,64 @@
};
};
};
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Armada 385 DB Audio";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Headphone", "Out Jack",
+ "Line", "In Jack";
+ simple-audio-card,routing =
+ "Out Jack", "HPL",
+ "Out Jack", "HPR",
+ "AIN1L", "In Jack",
+ "AIN1R", "In Jack";
+ status = "disabled";
+
+ simple-audio-card,dai-link@0 {
+ format = "i2s";
+ cpu {
+ sound-dai = <&audio_controller 0>;
+ };
+
+ codec {
+ sound-dai = <&audio_codec>;
+ };
+ };
+
+ simple-audio-card,dai-link@1 {
+ format = "i2s";
+ cpu {
+ sound-dai = <&audio_controller 1>;
+ };
+
+ codec {
+ sound-dai = <&spdif_out>;
+ };
+ };
+
+ simple-audio-card,dai-link@2 {
+ format = "i2s";
+ cpu {
+ sound-dai = <&audio_controller 1>;
+ };
+
+ codec {
+ sound-dai = <&spdif_in>;
+ };
+ };
+ };
+
+ spdif_out: spdif-out {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ };
+
+ spdif_in: spdif-in {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dir";
+ };
};

&spi0 {
--
2.20.1

2022-09-20 14:48:21

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 3/5] ARM: mvebu: add audio support to Armada 385 DB

On Tue, Sep 20, 2022 at 03:26:46PM +0200, Pali Roh?r wrote:
> From: Marcin Wojtas <[email protected]>
>
> This commit adds the necessary Device Tree information to enable
> audio support on the Armada 385 DB platform. In details it:
>
> * Instantiates the CS42L51 audio codec on the I2C0 bus
>
> * Adds simple-card DT binding for audio on Armada 385 DB
>
> * Adds description for both analog I2S and S/PDIF I/O
>
> * Disabled by default
>
> Signed-off-by: Marcin Wojtas <[email protected]>
> Signed-off-by: Nadav Haklai <[email protected]>
> Tested-by: Star_Automation <[email protected]>
> Tested-by: Lior Amsalem <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2022-09-23 15:24:36

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH 0/5] ARM: mvebu: Add audio support for Armada 38x

Pali Rohár <[email protected]> writes:

> This patch series add audio support for Armada 38x. It contains commits
> from Marvell linux repository
>
> https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/a1d70444cb0476a7524273274ca8e6d52ce6f1fe
> https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/f365c93237787c7a64f2617da9425eb01e09e71f
> https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/b645bfa9121214d6456de3df6b8e577f2c01c6b3
> https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/829c96c206f2930e5323064cef57158bd780730d
>
> first two squashed, rebased on top of the current linux master branch
> (at v6.0-rc6) with additional patches which adds S/PDIF support on
> Turris Omnia - A385 board.
>
> Marcin Wojtas (3):
> ASoC: kirkwood: enable Kirkwood driver for Armada 38x platforms
> ARM: mvebu: add audio I2S controller to Armada 38x Device Tree
> ARM: mvebu: add audio support to Armada 385 DB
>
> Pali Rohár (2):
> ARM: mvebu: Add spdif-pins mpp pins for Armada 38x
> ARM: dts: turris-omnia: Define S/PDIF audio card
>

Patches 2 to 5 applied on mvebu/dt

The first one has to be applied in sound subsystem.

Thanks,

Gregory


> .../devicetree/bindings/sound/mvebu-audio.txt | 14 +-
> arch/arm/boot/dts/armada-385-turris-omnia.dts | 27 ++++
> arch/arm/boot/dts/armada-388-db.dts | 69 +++++++++
> arch/arm/boot/dts/armada-38x.dtsi | 24 ++++
> sound/soc/kirkwood/kirkwood-i2s.c | 136 +++++++++++++++++-
> sound/soc/kirkwood/kirkwood.h | 2 +
> 6 files changed, 269 insertions(+), 3 deletions(-)
>
> --
> 2.20.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com