linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Kevin Hilman <khilman@baylibre.com>, Carlo Caione <carlo@caione.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 14/14] arm64: dts: meson-axg: add s400 sound card
Date: Tue, 24 Jul 2018 14:52:38 +0200	[thread overview]
Message-ID: <20180724125238.14567-15-jbrunet@baylibre.com> (raw)
In-Reply-To: <20180724125238.14567-1-jbrunet@baylibre.com>

Add the sound card of the s400. With it the following interface
should be working:
 * Lineout
 * Daugther card speaker 1 (same output as lineout)
 * Linein
 * SPDIF output

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---

 Compared to what is actually available on the platform, the following
 is not provided ATM:
 * SPDIF input: WIP.
 * PDM DMICs: WIP.
 * TDM A - BT Codec: missing BT codec.
 * TDM B - Speaker analog loopback: missing tlv320adc codec.

 .../arm64/boot/dts/amlogic/meson-axg-s400.dts | 108 ++++++++++++++++++
 1 file changed, 108 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 9f5d81c3ee29..1b89c2cc5414 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -204,6 +204,113 @@
 		status = "okay";
 		sound-name-prefix = "DIT";
 	};
+
+	sound {
+		compatible = "amlogic,axg-sound-card";
+		amlogic,name = "AXG-S400";
+		amlogic,aux-devs = <&tdmin_a>, <&tdmin_b>,  <&tdmin_c>,
+				   <&tdmin_lb>, <&tdmout_c>;
+		amlogic,widgets = "Line", "Lineout",
+				  "Line", "Linein",
+				  "Speaker", "Speaker1 Left",
+				  "Speaker", "Speaker1 Right";
+		amlogic,routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+				  "SPDIFOUT IN 0", "FRDDR_A OUT 3",
+				  "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+				  "SPDIFOUT IN 1", "FRDDR_B OUT 3",
+				  "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+				  "SPDIFOUT IN 2", "FRDDR_C OUT 3",
+				  "TDM_C Playback", "TDMOUT_C OUT",
+				  "TDMIN_A IN 2", "TDM_C Capture",
+				  "TDMIN_A IN 5", "TDM_C Loopback",
+				  "TDMIN_B IN 2", "TDM_C Capture",
+				  "TDMIN_B IN 5", "TDM_C Loopback",
+				  "TDMIN_C IN 2", "TDM_C Capture",
+				  "TDMIN_C IN 5", "TDM_C Loopback",
+				  "TDMIN_LB IN 2", "TDM_C Loopback",
+				  "TDMIN_LB IN 5", "TDM_C Capture",
+				  "TODDR_A IN 0", "TDMIN_A OUT",
+				  "TODDR_B IN 0", "TDMIN_A OUT",
+				  "TODDR_C IN 0", "TDMIN_A OUT",
+				  "TODDR_A IN 1", "TDMIN_B OUT",
+				  "TODDR_B IN 1", "TDMIN_B OUT",
+				  "TODDR_C IN 1", "TDMIN_B OUT",
+				  "TODDR_A IN 2", "TDMIN_C OUT",
+				  "TODDR_B IN 2", "TDMIN_C OUT",
+				  "TODDR_C IN 2", "TDMIN_C OUT",
+				  "TODDR_A IN 6", "TDMIN_LB OUT",
+				  "TODDR_B IN 6", "TDMIN_LB OUT",
+				  "TODDR_C IN 6", "TDMIN_LB OUT",
+				  "Lineout", "Lineout AOUTL",
+				  "Lineout", "Lineout AOUTR",
+				  "Speaker1 Left", "SPK1 OUT_A",
+				  "Speaker1 Left", "SPK1 OUT_B",
+				  "Speaker1 Right", "SPK1 OUT_C",
+				  "Speaker1 Right", "SPK1 OUT_D",
+				  "Linein AINL", "Linein",
+				  "Linein AINR", "Linein";
+		assigned-clocks = <&clkc CLKID_HIFI_PLL>,
+				  <&clkc CLKID_MPLL0>,
+				  <&clkc CLKID_MPLL1>;
+		assigned-clock-parents = <0>, <0>, <0>;
+		assigned-clock-rates = <589824000>,
+				       <270950400>,
+				       <393216000>;
+		status = "okay";
+
+		amlogic,dai-link@0 {
+			sound-dai = <&frddr_a>;
+		};
+
+		amlogic,dai-link@1 {
+			sound-dai = <&frddr_b>;
+		};
+
+		amlogic,dai-link@2 {
+			sound-dai = <&frddr_c>;
+		};
+
+		amlogic,dai-link@3 {
+			sound-dai = <&toddr_a>;
+		};
+
+		amlogic,dai-link@4 {
+			sound-dai = <&toddr_b>;
+		};
+
+		amlogic,dai-link@5 {
+			sound-dai = <&toddr_c>;
+		};
+
+		amlogic,dai-link@6 {
+			sound-dai = <&tdmif_c>;
+			dai-format = "i2s";
+			dai-tdm-slot-tx-mask-2 = <1 1>;
+			dai-tdm-slot-rx-mask-1 = <1 1>;
+			mclk-fs = <256>;
+
+			codec@0 {
+				sound-dai = <&lineout>;
+			};
+
+			codec@1 {
+				sound-dai = <&speaker_amp1>;
+			};
+
+			codec@2 {
+				sound-dai = <&linein>;
+			};
+
+		};
+
+		amlogic,dai-link@7 {
+			sound-dai = <&spdifout>;
+
+			codec {
+				sound-dai = <&spdif_dit>;
+			};
+		};
+	};
 };
 
 &ethmac {
@@ -272,6 +379,7 @@
 		PVDD_B-supply = <&main_12v>;
 		PVDD_C-supply = <&main_12v>;
 		PVDD_D-supply = <&main_12v>;
+		sound-name-prefix = "SPK1";
 	};
 };
 
-- 
2.17.1


  parent reply	other threads:[~2018-07-24 12:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 12:52 [PATCH 00/14] arm64: dts: meson-axg: add audio support Jerome Brunet
2018-07-24 12:52 ` [PATCH 01/14] arm64: dts: meson-axg: improve power supplies description Jerome Brunet
2018-07-24 12:52 ` [PATCH 02/14] arm64: dts: meson-axg: add vcc 5v regulator on the s400 Jerome Brunet
2018-07-24 12:52 ` [PATCH 03/14] arm64: dts: meson-axg: add usb power regulator Jerome Brunet
2018-07-24 12:52 ` [PATCH 04/14] arm64: dts: meson-axg: add audio arb reset controller Jerome Brunet
2018-07-24 12:52 ` [PATCH 05/14] arm64: dts: meson-axg: add audio fifos Jerome Brunet
2018-07-24 12:52 ` [PATCH 06/14] arm64: dts: meson-axg: add spdifout Jerome Brunet
2018-07-24 12:52 ` [PATCH 07/14] arm64: dts: meson-axg: add tdmin formatters Jerome Brunet
2018-07-24 12:52 ` [PATCH 08/14] arm64: dts: meson-axg: add tdmout formatters Jerome Brunet
2018-07-24 12:52 ` [PATCH 09/14] arm64: dts: meson-axg: add tdm interfaces Jerome Brunet
2018-07-24 12:52 ` [PATCH 10/14] arm64: dts: meson-axg: add linein codec Jerome Brunet
2018-07-25 19:18   ` Martin Blumenstingl
2018-07-25 22:07     ` jbrunet
2018-07-24 12:52 ` [PATCH 11/14] arm64: dts: meson-axg: add lineout codec Jerome Brunet
2018-07-24 12:52 ` [PATCH 12/14] arm64: dts: meson-axg: add spdif-dit codec Jerome Brunet
2018-07-24 12:52 ` [PATCH 13/14] arm64: dts: meson-axg: s400: enable audio devices Jerome Brunet
2018-07-24 12:52 ` Jerome Brunet [this message]
2018-07-25 19:11 ` [PATCH 00/14] arm64: dts: meson-axg: add audio support Martin Blumenstingl
2018-07-25 21:19   ` jbrunet
2018-07-25 21:26     ` Martin Blumenstingl
2018-07-26 21:38       ` Kevin Hilman

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=20180724125238.14567-15-jbrunet@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=carlo@caione.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 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).