From patchwork Fri Feb 12 19:05:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 8296401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 81B219F372 for ; Fri, 12 Feb 2016 19:17:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51BA120454 for ; Fri, 12 Feb 2016 19:17:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34CFC20452 for ; Fri, 12 Feb 2016 19:17:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aUJC0-0007o1-OF; Fri, 12 Feb 2016 19:15:48 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aUJ5N-0006j0-L9 for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2016 19:09:05 +0000 Received: from penelope.kanocho.kobe.vergenet.net (128-47-71-217.dyn.estpak.ee [217.71.47.128]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 373CB25BE9C; Sat, 13 Feb 2016 06:06:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1455303993; bh=xr3bYTq3donqe3It4lOUnwLAsoxA4LR+tNyNgeJO0A0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TeeeRZdH8opbLEAzGdLMWAhoy9bTMTVHgLRGTseaOC8wAy/6TrRHqS/txXq6DgOwe 0scA+EJ0bTzhMH5coq0uPxN2AhymSwc34iNqJO7s9mAZgG9Qs/x1PLbMZkgZh2HN+e KUX7wAIBfYP+AE7sj6dtMGwrsik/Z5GdBSwQDQjw= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id BD30860AF0; Sat, 13 Feb 2016 06:06:10 +1100 (AEDT) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Subject: [PATCH 19/68] ARM: dts: porter: add sound support Date: Fri, 12 Feb 2016 20:05:09 +0100 Message-Id: <493b4da7c10ca647850627849bcf6031c0a80f13.1455303422.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160212_110858_652281_D8638951 X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Horman , Magnus Damm , Sergei Shtylyov , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sergei Shtylyov Define the Porter board dependent part of the R8A7791 sound device node. Add device node for Asahi Kasei AK4642 stereo codec to the I2C2 bus. Add the "simple-audio-card" device node to interconnect the SoC sound device and the codec. Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7791-porter.dts | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts index fe81fa0e478c..5015eaa0ae50 100644 --- a/arch/arm/boot/dts/r8a7791-porter.dts +++ b/arch/arm/boot/dts/r8a7791-porter.dts @@ -8,6 +8,17 @@ * kind, whether express or implied. */ +/* + * SSI-AK4642 + * + * SW3: 1: AK4642 + * 3: ADV7511 + * + * This command is required before playback/capture: + * + * amixer set "LINEOUT Mixer DACL" on + */ + /dts-v1/; #include "r8a7791.dtsi" #include @@ -101,6 +112,30 @@ #clock-cells = <0>; clock-frequency = <74250000>; }; + + x14_clk: x14-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <11289600>; + clock-output-names = "audio_clock"; + }; + + sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&soundcodec>; + simple-audio-card,frame-master = <&soundcodec>; + + simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + soundcodec: simple-audio-card,codec { + sound-dai = <&ak4642>; + clocks = <&x14_clk>; + }; + }; }; &extal_clk { @@ -167,6 +202,16 @@ renesas,groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0"; renesas,function = "du"; }; + + ssi_pins: sound { + renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + renesas,function = "ssi"; + }; + + audio_clk_pins: audio_clk { + renesas,groups = "audio_clk_a"; + renesas,function = "audio_clk"; + }; }; &scif0 { @@ -257,6 +302,12 @@ status = "okay"; clock-frequency = <400000>; + ak4642: codec@12 { + compatible = "asahi-kasei,ak4642"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; + composite-in@20 { compatible = "adi,adv7180"; reg = <0x20>; @@ -385,3 +436,23 @@ }; }; }; + +&rcar_sound { + pinctrl-0 = <&ssi_pins &audio_clk_pins>; + pinctrl-names = "default"; + status = "okay"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi1 { + shared-pin; +};