All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Cc: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	Liam Girdwood <lrg-l0cyMroinI0@public.gmane.org>,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH V2 5/5] ARM: dt: tegra cardhu: basic audio support
Date: Tue, 10 Apr 2012 17:19:40 -0600	[thread overview]
Message-ID: <1334099980-19527-5-git-send-email-swarren@wwwdotorg.org> (raw)
In-Reply-To: <1334099980-19527-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Add WM8903 codec nodes, and top-level sound complex node for basic
analog audio over headset jack and internal speakers.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
v2:
* Adjust sound node compatible value; s/tegra30/tegra/. The requirement
  to specifically version this is removed due to the Tegra ASoC utilities
  code internally determining the chip version.
* Move I2S nodes inside AHUB node, since it's the bus that contains them.
---
 arch/arm/boot/dts/tegra-cardhu.dts |   63 ++++++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/tegra-cardhu.dts b/arch/arm/boot/dts/tegra-cardhu.dts
index 0a9f34a..ab8d901 100644
--- a/arch/arm/boot/dts/tegra-cardhu.dts
+++ b/arch/arm/boot/dts/tegra-cardhu.dts
@@ -51,6 +51,15 @@
 				nvidia,pull = <2>;
 				nvidia,tristate = <0>;
 			};
+			dap2_fs_pa2 {
+				nvidia,pins =	"dap2_fs_pa2",
+						"dap2_sclk_pa3",
+						"dap2_din_pa4",
+						"dap2_dout_pa5";
+				nvidia,function = "i2s1";
+				nvidia,pull = <0>;
+				nvidia,tristate = <0>;
+			};
 		};
 	};
 
@@ -92,6 +101,20 @@
 
 	i2c@7000d000 {
 		clock-frequency = <100000>;
+
+		wm8903: wm8903@1a {
+			compatible = "wlf,wm8903";
+			reg = <0x1a>;
+			interrupt-parent = <&gpio>;
+			interrupts = <179 0x04>; /* gpio PW3 */
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			micdet-cfg = <0>;
+			micdet-delay = <100>;
+			gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
+		};
 	};
 
 	sdhci@78000000 {
@@ -111,4 +134,44 @@
 	sdhci@78000400 {
 		support-8bit;
 	};
+
+	ahub@70080000 {
+		i2s@70080300 {
+			status = "disable";
+		};
+
+		i2s@70080500 {
+			status = "disable";
+		};
+
+		i2s@70080600 {
+			status = "disable";
+		};
+
+		i2s@70080700 {
+			status = "disable";
+		};
+	};
+
+	sound {
+		compatible = "nvidia,tegra-audio-wm8903-cardhu",
+			     "nvidia,tegra-audio-wm8903";
+		nvidia,model = "NVIDIA Tegra Cardhu";
+
+		nvidia,audio-routing =
+			"Headphone Jack", "HPOUTR",
+			"Headphone Jack", "HPOUTL",
+			"Int Spk", "ROP",
+			"Int Spk", "RON",
+			"Int Spk", "LOP",
+			"Int Spk", "LON",
+			"Mic Jack", "MICBIAS",
+			"IN1L", "Mic Jack";
+
+		nvidia,i2s-controller = <&tegra_i2s1>;
+		nvidia,audio-codec = <&wm8903>;
+
+		nvidia,spkr-en-gpios = <&wm8903 2 0>;
+		nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */
+	};
 };
-- 
1.7.0.4

WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 5/5] ARM: dt: tegra cardhu: basic audio support
Date: Tue, 10 Apr 2012 17:19:40 -0600	[thread overview]
Message-ID: <1334099980-19527-5-git-send-email-swarren@wwwdotorg.org> (raw)
In-Reply-To: <1334099980-19527-1-git-send-email-swarren@wwwdotorg.org>

From: Stephen Warren <swarren@nvidia.com>

Add WM8903 codec nodes, and top-level sound complex node for basic
analog audio over headset jack and internal speakers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2:
* Adjust sound node compatible value; s/tegra30/tegra/. The requirement
  to specifically version this is removed due to the Tegra ASoC utilities
  code internally determining the chip version.
* Move I2S nodes inside AHUB node, since it's the bus that contains them.
---
 arch/arm/boot/dts/tegra-cardhu.dts |   63 ++++++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/tegra-cardhu.dts b/arch/arm/boot/dts/tegra-cardhu.dts
index 0a9f34a..ab8d901 100644
--- a/arch/arm/boot/dts/tegra-cardhu.dts
+++ b/arch/arm/boot/dts/tegra-cardhu.dts
@@ -51,6 +51,15 @@
 				nvidia,pull = <2>;
 				nvidia,tristate = <0>;
 			};
+			dap2_fs_pa2 {
+				nvidia,pins =	"dap2_fs_pa2",
+						"dap2_sclk_pa3",
+						"dap2_din_pa4",
+						"dap2_dout_pa5";
+				nvidia,function = "i2s1";
+				nvidia,pull = <0>;
+				nvidia,tristate = <0>;
+			};
 		};
 	};
 
@@ -92,6 +101,20 @@
 
 	i2c at 7000d000 {
 		clock-frequency = <100000>;
+
+		wm8903: wm8903 at 1a {
+			compatible = "wlf,wm8903";
+			reg = <0x1a>;
+			interrupt-parent = <&gpio>;
+			interrupts = <179 0x04>; /* gpio PW3 */
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			micdet-cfg = <0>;
+			micdet-delay = <100>;
+			gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
+		};
 	};
 
 	sdhci at 78000000 {
@@ -111,4 +134,44 @@
 	sdhci at 78000400 {
 		support-8bit;
 	};
+
+	ahub at 70080000 {
+		i2s at 70080300 {
+			status = "disable";
+		};
+
+		i2s at 70080500 {
+			status = "disable";
+		};
+
+		i2s at 70080600 {
+			status = "disable";
+		};
+
+		i2s at 70080700 {
+			status = "disable";
+		};
+	};
+
+	sound {
+		compatible = "nvidia,tegra-audio-wm8903-cardhu",
+			     "nvidia,tegra-audio-wm8903";
+		nvidia,model = "NVIDIA Tegra Cardhu";
+
+		nvidia,audio-routing =
+			"Headphone Jack", "HPOUTR",
+			"Headphone Jack", "HPOUTL",
+			"Int Spk", "ROP",
+			"Int Spk", "RON",
+			"Int Spk", "LOP",
+			"Int Spk", "LON",
+			"Mic Jack", "MICBIAS",
+			"IN1L", "Mic Jack";
+
+		nvidia,i2s-controller = <&tegra_i2s1>;
+		nvidia,audio-codec = <&wm8903>;
+
+		nvidia,spkr-en-gpios = <&wm8903 2 0>;
+		nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */
+	};
 };
-- 
1.7.0.4

  parent reply	other threads:[~2012-04-10 23:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 23:19 [PATCH V2 1/5] ARM: tegra: provide clock aliases for AHUB configlink Stephen Warren
2012-04-10 23:19 ` Stephen Warren
     [not found] ` <1334099980-19527-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-10 23:19   ` [PATCH V2 2/5] ARM: tegra: set up audio clocks for tegra30 dt Stephen Warren
2012-04-10 23:19     ` Stephen Warren
2012-04-10 23:19   ` [PATCH V2 3/5] ARM: tegra: add AUXDATA required for audio Stephen Warren
2012-04-10 23:19     ` Stephen Warren
2012-04-10 23:19   ` [PATCH V2 4/5] ARM: dt: tegra30.dtsi: Add audio-related nodes Stephen Warren
2012-04-10 23:19     ` Stephen Warren
2012-04-11  4:27     ` Olof Johansson
2012-04-11  4:27       ` Olof Johansson
     [not found]       ` <CAOesGMhDDenRK_GeR=jWJbcoacRMUPnjFu5w4DCyUWC=CadnbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-11  5:28         ` Stephen Warren
2012-04-11  5:28           ` Stephen Warren
2012-04-13 20:59           ` Olof Johansson
2012-04-13 20:59             ` Olof Johansson
2012-04-10 23:19   ` Stephen Warren [this message]
2012-04-10 23:19     ` [PATCH V2 5/5] ARM: dt: tegra cardhu: basic audio support Stephen Warren

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=1334099980-19527-5-git-send-email-swarren@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lrg-l0cyMroinI0@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 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.