linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>
Cc: SoC Team <soc@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Lubomir Rintel <lkundrak@v3.sk>
Subject: [PATCH v2 09/13] ARM: dts: mmp2-olpc-xo-1-75: Enable audio support
Date: Sat, 18 Jul 2020 22:50:15 +0200	[thread overview]
Message-ID: <20200718205019.184927-10-lkundrak@v3.sk> (raw)
In-Reply-To: <20200718205019.184927-1-lkundrak@v3.sk>

This enables the audio SRAM, DMA engine, I2S interface, and codec, hooks
them together and adds a audio-graph-card instance.

It also removes the jack gpios from the gpio-keys instance, because the
audio jack driver registers an input device.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 65 ++++++++++++++++++-------
 1 file changed, 47 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
index 392f546f7915b..5f1da58550987 100644
--- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
+++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
@@ -57,24 +57,6 @@ tablet_mode {
 			linux,code = <SW_TABLET_MODE>;
 			wakeup-source;
 		};
-
-		microphone_insert {
-			label = "Microphone Plug";
-			gpios = <&gpio 96 GPIO_ACTIVE_HIGH>;
-			linux,input-type = <EV_SW>;
-			linux,code = <SW_MICROPHONE_INSERT>;
-			debounce-interval = <100>;
-			wakeup-source;
-		};
-
-		headphone_insert {
-			label = "Headphone Plug";
-			gpios = <&gpio 97 GPIO_ACTIVE_HIGH>;
-			linux,input-type = <EV_SW>;
-			linux,code = <SW_HEADPHONE_INSERT>;
-			debounce-interval = <100>;
-			wakeup-source;
-		};
 	};
 
 	i2c {
@@ -123,6 +105,18 @@ wlan_pwrseq: pwrseq0 {
 		reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
 	};
 
+	sound-card {
+		compatible = "audio-graph-card";
+		label = "OLPC XO";
+		dais = <&sspa0_dai>;
+		routing = "Headphones", "HPOL",
+			  "Headphones", "HPOR",
+			  "MIC2", "Mic Jack";
+		widgets = "Headphone", "Headphones", "Microphone", "Mic Jack";
+		hp-det-gpio = <&gpio 97 GPIO_ACTIVE_HIGH>;
+		mic-det-gpio = <&gpio 96 GPIO_ACTIVE_HIGH>;
+	};
+
 	soc {
 		axi@d4200000 {
 			ap-sp@d4290000 {
@@ -197,6 +191,14 @@ audio-codec@1a {
 		compatible = "realtek,alc5631";
 		reg = <0x1a>;
 		status = "okay";
+
+		port {
+			rt5631_0: endpoint {
+				mclk-fs = <256>;
+				clocks = <&audio_clk 0>;
+				remote-endpoint = <&sspa0_0>;
+			};
+		};
 	};
 };
 
@@ -243,3 +245,30 @@ camera0_0: endpoint {
 		};
 	};
 };
+
+&asram {
+	status = "okay";
+};
+
+&adma0 {
+	status = "okay";
+};
+
+&audio_clk {
+	status = "okay";
+};
+
+&sspa0 {
+	status = "okay";
+	dmas = <&adma0 0>, <&adma0 1>;
+	dma-names = "tx", "rx";
+
+	sspa0_dai: port {
+		sspa0_0: endpoint {
+			remote-endpoint = <&rt5631_0>;
+			frame-master;
+			bitclock-master;
+			dai-format = "i2s";
+		};
+	};
+};
-- 
2.26.2


  parent reply	other threads:[~2020-07-18 20:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 20:50 [PATCH v2 00/13] MMP DTS updates for 5.9 Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 01/13] ARM: dts: mmp2-olpc-xo-1-75: Fix camera I2C node validation Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 02/13] ARM: dts: mmp2-olpc-xo-1-75: Delete #address-cells from ssp3 Lubomir Rintel
2020-11-10  3:19   ` Florian Fainelli
2020-07-18 20:50 ` [PATCH v2 03/13] ARM: dts: mmp2: Add #power-domain-cells to /clocks Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 04/13] ARM: dts: mmp2: Extend the MPMU reg range Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 05/13] ARM: dts: mmp2: Add Audio SRAM Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 06/13] ARM: dts: mmp2: Add DMA nodes Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 07/13] ARM: dts: mmp2: Add Audio Clock controller Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 08/13] ARM: dts: mmp2: Add SSPA nodes Lubomir Rintel
2020-07-18 20:50 ` Lubomir Rintel [this message]
2020-07-18 20:50 ` [PATCH v2 10/13] ARM: dts: mmp2: Add the GPU Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 11/13] ARM: dts: mmp2-olpc-xo-1-75: Enable " Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 12/13] ARM: dts: mmp3: Add " Lubomir Rintel
2020-07-18 20:50 ` [PATCH v2 13/13] ARM: dts: mmp3-dell-ariel: Enable " Lubomir Rintel

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=20200718205019.184927-10-lkundrak@v3.sk \
    --to=lkundrak@v3.sk \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=soc@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).