All of lore.kernel.org
 help / color / mirror / Atom feed
From: horms+renesas@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 09/14] ARM: dts: gose: Enable sound PIO support in device tree
Date: Mon, 18 Jan 2016 14:28:04 +0900	[thread overview]
Message-ID: <1453094889-25204-10-git-send-email-horms+renesas@verge.net.au> (raw)
In-Reply-To: <1453094889-25204-1-git-send-email-horms+renesas@verge.net.au>

Enable sound PIO support in the r8a7793/gose device tree.

Based on similar work for the r8a7791/koelsch by Kuninori Morimoto.

Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7793-gose.dts | 76 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index 987ed03b1e02..a90af303e21a 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -8,6 +8,17 @@
  * kind, whether express or implied.
  */
 
+/*
+ * SSI-AK4643
+ *
+ * SW1: 1: AK4643
+ *      2: CN22
+ *      3: ADV7511
+ *
+ * This command is required when Playback/Capture
+ *
+ *	amixer set "LINEOUT Mixer DACL" on
+ */
 /dts-v1/;
 #include "r8a7793.dtsi"
 #include <dt-bindings/gpio/gpio.h>
@@ -129,6 +140,30 @@
 			label = "LED8";
 		};
 	};
+
+	audio_clock: clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <11289600>;
+		clock-output-names = "audio_clock";
+	};
+
+	rsnd_ak4643: sound {
+		compatible = "simple-audio-card";
+
+		simple-audio-card,format = "left_j";
+		simple-audio-card,bitclock-master = <&sndcodec>;
+		simple-audio-card,frame-master = <&sndcodec>;
+
+		sndcpu: simple-audio-card,cpu {
+			sound-dai = <&rcar_sound>;
+		};
+
+		sndcodec: simple-audio-card,codec {
+			sound-dai = <&ak4643>;
+			clocks = <&audio_clock>;
+		};
+	};
 };
 
 &extal_clk {
@@ -165,6 +200,16 @@
 		renesas,groups = "qspi_ctrl", "qspi_data4";
 		renesas,function = "qspi";
 	};
+
+	sound_pins: sound {
+		renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
+		renesas,function = "ssi";
+	};
+
+	sound_clk_pins: sound_clk {
+		renesas,groups = "audio_clk_a";
+		renesas,function = "audio_clk";
+	};
 };
 
 &ether {
@@ -247,9 +292,40 @@
 	status = "okay";
 	clock-frequency = <100000>;
 
+	ak4643: codec at 12 {
+		compatible = "asahi-kasei,ak4643";
+		#sound-dai-cells = <0>;
+		reg = <0x12>;
+	};
 	eeprom at 50 {
 		compatible = "renesas,r1ex24002", "atmel,24c02";
 		reg = <0x50>;
 		pagesize = <16>;
 	};
 };
+
+&rcar_sound {
+	pinctrl-0 = <&sound_pins &sound_clk_pins>;
+	pinctrl-names = "default";
+
+	/* Single DAI */
+	#sound-dai-cells = <0>;
+
+	status = "okay";
+
+	rcar_sound,dai {
+		dai0 {
+			playback = <&ssi0>;
+			capture  = <&ssi1>;
+		};
+	};
+};
+
+&ssi0 {
+	pio-transfer;
+};
+
+&ssi1 {
+	pio-transfer;
+	shared-pin;
+};
-- 
2.1.4

  parent reply	other threads:[~2016-01-18  5:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  5:27 [PATCH v4 00/14] r8a7793, gose: Add audio support to device tree Simon Horman
2016-01-18  5:27 ` Simon Horman
2016-01-18  5:27 ` [PATCH v4 01/14] ARM: dts: r8a7793: add MSTP10 clocks " Simon Horman
2016-01-18  5:27   ` Simon Horman
2016-01-18  5:27 ` [PATCH v4 02/14] ARM: dts: r8a7793: add audio clock " Simon Horman
2016-01-18  5:27 ` [PATCH v4 03/14] ARM: dts: r8a7793: add m2 " Simon Horman
2016-01-18  5:27   ` Simon Horman
2016-01-18  5:27 ` [PATCH v4 04/14] ARM: dts: r8a7793: add R-Car sound support " Simon Horman
2016-01-18  5:27   ` Simon Horman
2016-01-18  5:28 ` [PATCH v4 05/14] ARM: dts: r8a7793: add DVC " Simon Horman
2016-01-18  5:28 ` [PATCH v4 06/14] ARM: dts: r8a7793: add audio DMAC clocks " Simon Horman
2016-01-18  5:28 ` [PATCH v4 07/14] ARM: dts: r8a7793: add audio DMAC " Simon Horman
2016-01-18  5:28   ` Simon Horman
2016-01-18  5:28 ` [PATCH v4 08/14] ARM: dts: r8a7793: enable Audio DMAC peri peri via sound driver Simon Horman
2016-01-18  5:28   ` Simon Horman
2016-01-18  5:28 ` Simon Horman [this message]
2016-01-18  5:28 ` [PATCH v4 10/14] ARM: dts: gose: enable sound DMA support in device tree Simon Horman
2016-01-18  5:28   ` Simon Horman
2016-01-18  5:28 ` [PATCH v4 11/14] ARM: dts: gose: enable sound DMA support via BUSIF " Simon Horman
2016-01-18  5:28   ` Simon Horman
2016-01-18  5:28 ` [PATCH v4 12/14] ARM: dts: gose: enable sound DMA support via SRC " Simon Horman
2016-01-18  5:28   ` Simon Horman
2016-01-18  5:28 ` [PATCH v4 13/14] ARM: dts: gose: enable sound DMA support via DVC " Simon Horman
2016-01-18  5:28   ` Simon Horman
2016-01-18  5:28 ` [PATCH v4 14/14] ARM: dts: r8a7793: enable audio DMAC " Simon Horman
2016-01-27 11:24 ` [PATCH v4 00/14] r8a7793, gose: Add audio support to " Simon Horman
2016-01-27 11:24   ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2015-12-18 10:51 [PATCH] ARM: shmobile: armadillo800eva dts: Correct extal1 frequency to 24 MHz Geert Uytterhoeven
2016-01-05 13:37 ` Geert Uytterhoeven
2016-01-18  1:55   ` Simon Horman
2016-01-18  1:55     ` [PATCH] ARM: shmobile: armadillo800eva dts: Correct extal1 frequency to 24 MHz, [PATCH v4 02/14] ARM: dts: r8a7793: add audio clock to device tree Simon Horman, Simon Horman

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=1453094889-25204-10-git-send-email-horms+renesas@verge.net.au \
    --to=horms+renesas@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.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.