All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: lgirdwood@gmail.com, broonie@kernel.org, jason@lakedaemon.net,
	andrew@lunn.ch, gregory.clement@free-electrons.com,
	sebastian.hesselbarth@gmail.com
Cc: thomas.petazzoni@free-electrons.com, alior@marvell.com,
	alsa-devel@alsa-project.org, tawfik@marvell.com,
	jaz@semihalf.com, ezequiel.garcia@free-electrons.com,
	mw@semihalf.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: mvebu: add audio support to Armada 385 DB
Date: Wed, 25 Feb 2015 22:58:01 +0100	[thread overview]
Message-ID: <1424901482-3809-4-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1424901482-3809-1-git-send-email-mw@semihalf.com>

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

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 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 16512ef..bf5d9a7 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -82,6 +82,11 @@
 			i2c@11000 {
 				status = "okay";
 				clock-frequency = <100000>;
+				audio_codec: audio-codec@4a {
+					#sound-dai-cells = <0>;
+					compatible = "cirrus,cs42l51";
+					reg = <0x4a>;
+				};
 			};
 
 			i2c@11100 {
@@ -158,6 +163,12 @@
 				no-1-8-v;
 			};
 
+			audio-controller@e8000 {
+				pinctrl-0 = <&i2s_pins>;
+				pinctrl-names = "default";
+				status = "okay";
+			};
+
 			usb3@f0000 {
 				status = "okay";
 			};
@@ -183,4 +194,62 @@
 			};
 		};
 	};
+
+	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 = "okay";
+
+		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";
+	};
 };
-- 
1.8.3.1

WARNING: multiple messages have this Message-ID (diff)
From: mw@semihalf.com (Marcin Wojtas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: mvebu: add audio support to Armada 385 DB
Date: Wed, 25 Feb 2015 22:58:01 +0100	[thread overview]
Message-ID: <1424901482-3809-4-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1424901482-3809-1-git-send-email-mw@semihalf.com>

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

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 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 16512ef..bf5d9a7 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -82,6 +82,11 @@
 			i2c at 11000 {
 				status = "okay";
 				clock-frequency = <100000>;
+				audio_codec: audio-codec at 4a {
+					#sound-dai-cells = <0>;
+					compatible = "cirrus,cs42l51";
+					reg = <0x4a>;
+				};
 			};
 
 			i2c at 11100 {
@@ -158,6 +163,12 @@
 				no-1-8-v;
 			};
 
+			audio-controller at e8000 {
+				pinctrl-0 = <&i2s_pins>;
+				pinctrl-names = "default";
+				status = "okay";
+			};
+
 			usb3 at f0000 {
 				status = "okay";
 			};
@@ -183,4 +194,62 @@
 			};
 		};
 	};
+
+	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 = "okay";
+
+		simple-audio-card,dai-link at 0 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 0>;
+			};
+
+			codec {
+				sound-dai = <&audio_codec>;
+			};
+		};
+
+		simple-audio-card,dai-link at 1 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 1>;
+			};
+
+			codec {
+				sound-dai = <&spdif_out>;
+			};
+		};
+
+		simple-audio-card,dai-link at 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";
+	};
 };
-- 
1.8.3.1

  parent reply	other threads:[~2015-02-25 21:58 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 21:57 [PATCH 0/4] Armada 38x and 370 audio Marcin Wojtas
2015-02-25 21:57 ` Marcin Wojtas
2015-02-25 21:57 ` [PATCH 1/4] ASoC: kirkwood: enable Kirkwood driver for Armada 38x platforms Marcin Wojtas
2015-02-25 21:57   ` Marcin Wojtas
2015-02-25 21:58 ` [PATCH 2/4] ARM: mvebu: add audio I2S controller to Armada 38x Device Tree Marcin Wojtas
2015-02-25 21:58   ` Marcin Wojtas
2015-02-25 22:21   ` Sebastian Hesselbarth
2015-02-25 22:21     ` Sebastian Hesselbarth
2015-02-26  0:11     ` Marcin Wojtas
2015-02-26  0:11       ` Marcin Wojtas
2015-02-26  0:30       ` Sebastian Hesselbarth
2015-02-26  0:30         ` Sebastian Hesselbarth
2015-02-26  9:05         ` Marcin Wojtas
2015-02-26  9:05           ` Marcin Wojtas
2015-02-27 14:03           ` Thomas Petazzoni
2015-02-27 14:03             ` Thomas Petazzoni
2015-02-27 20:22             ` Marcin Wojtas
2015-02-27 20:22               ` Marcin Wojtas
2015-02-28  9:58               ` Thomas Petazzoni
2015-02-28  9:58                 ` Thomas Petazzoni
2015-03-04 12:12                 ` Marcin Wojtas
2015-03-04 12:12                   ` Marcin Wojtas
2015-03-04 12:29                   ` Thomas Petazzoni
2015-03-04 12:29                     ` Thomas Petazzoni
2015-02-25 21:58 ` Marcin Wojtas [this message]
2015-02-25 21:58   ` [PATCH 3/4] ARM: mvebu: add audio support to Armada 385 DB Marcin Wojtas
2015-02-25 21:58 ` [PATCH 4/4] ARM: mvebu: fix routing for analog audio input of Armada 370 DB platform Marcin Wojtas
2015-02-25 21:58   ` Marcin Wojtas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424901482-3809-4-git-send-email-mw@semihalf.com \
    --to=mw@semihalf.com \
    --cc=alior@marvell.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrew@lunn.ch \
    --cc=broonie@kernel.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=jaz@semihalf.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.