From patchwork Wed Jul 27 21:05:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9250413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 887B160757 for ; Wed, 27 Jul 2016 21:08:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F26220855 for ; Wed, 27 Jul 2016 21:08:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63EDD2522B; Wed, 27 Jul 2016 21:08:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 56A0A20855 for ; Wed, 27 Jul 2016 21:08:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSW27-0004l0-JM; Wed, 27 Jul 2016 21:06:27 +0000 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSW23-0004gp-Ak for linux-arm-kernel@lists.infradead.org; Wed, 27 Jul 2016 21:06:24 +0000 Received: by mail-lf0-x233.google.com with SMTP id b199so36078965lfe.0 for ; Wed, 27 Jul 2016 14:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=jQQ/9KXfhGXxsqfqQpe3pMb0u06Rd1Xar49BSsnJvnQ=; b=ZexNpY48MZBovefT12jAH3vqVH3yiggwE1VYYVlLZUv+dtyPW7lAiUqzUGkS4oofGc hsFiu1UEt5N2OibgMIzhNkv7mKnASzkXt+1cPHxitq80L7qoQFvsZolFLB3g34yPOJBX NpLcB04dcdyhpvh002d0lhNKGSvqa5YksvX28bYZcdcRObE4zSEI5rfHrZlGmZhJ/5lO 546VzCtQ0NcADiM4I9cEaV1rdHiu2sTvoM8JCe7mRcptXONAu+8m3m0/h3Sw8yAXAhRe pRZuFOU+3SmvwgmTX5jkV4CfSBAuMFKpDVOh+SpiFvfy1bExzOvJtUND8Kua6KadSRTh LcoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=jQQ/9KXfhGXxsqfqQpe3pMb0u06Rd1Xar49BSsnJvnQ=; b=hARh2qU42Q4PgCpVqhrbjlLD9522b5y5v628mZju4dFCweC/xtEXvKhR0/OIN1V+7q Ry0N6Wfv9Q9PQ4eRvfk/Lpd3G8lA14/zDGCk+4DIF2DgMXhzgbyXzIeSvN9nt5wjZyeg 1BppgWlREv97Zh5LkwVMpjLA1ws1mdfx3+xiXzozHb7PnoPI0aW27K6d4MkQ9pRWluN7 P6kc5RJRCOir2Byx45GoghY5HmS4uBZc5di8CzzO+SGotx4KQJKWgj5W8kGcz9kEegwc hQBQe3cGMPFVqJBTQ/EX+ToDLXUqtpDpLAaCj2gczzpj2DkJdxWEaDOPO/8uah0saLlC TtQg== X-Gm-Message-State: AEkoousC7shtkEK2lbTB+cmKTD0wRUKoCOdq0tJMA9F2KGCHZUrOo4GHy0j6508e1BbSmA== X-Received: by 10.46.33.222 with SMTP id h91mr11816123lji.50.1469653560297; Wed, 27 Jul 2016 14:06:00 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.85.21]) by smtp.gmail.com with ESMTPSA id 196sm1332882ljf.5.2016.07.27.14.05.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 14:05:59 -0700 (PDT) From: Sergei Shtylyov To: horms@verge.net.au, linux-renesas-soc@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org Subject: [PATCH v4 6/6] ARM: dts: silk: add sound support Date: Thu, 28 Jul 2016 00:05:58 +0300 Message-ID: <1642375.kgEH5qZZyN@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.6.4-201.fc23.x86_64; KDE/4.14.20; x86_64; ; ) In-Reply-To: <3910788.ckTpUWEs6B@wasted.cogentembedded.com> References: <3910788.ckTpUWEs6B@wasted.cogentembedded.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160727_140623_588402_051C74E3 X-CRM114-Status: GOOD ( 13.60 ) 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: linux@arm.linux.org.uk, magnus.damm@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Define the SILK board dependent part of the R8A7794 sound device node. Add device node for Asahi Kasei AK4643 stereo codec to the I2C1 bus. Add the "simple-audio-card" device node to interconnect the SoC sound device and the codec. This patch is based on the commit 493b4da7c10c ("ARM: dts: porter: add sound support"). Signed-off-by: Sergei Shtylyov --- Changes in version 3: - new patch in this series; - renamed the X9 clock node, getting rid of the "clock-output-names" property; - removed the "renesas," prefix from the pin properties; - refreshed the patch. arch/arm/boot/dts/r8a7794-silk.dts | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) Index: renesas/arch/arm/boot/dts/r8a7794-silk.dts =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7794-silk.dts +++ renesas/arch/arm/boot/dts/r8a7794-silk.dts @@ -10,6 +10,17 @@ * kind, whether express or implied. */ +/* + * SSI-AK4643 + * + * SW1: 2-1: AK4643 + * 2-3: ADV7511 + * + * This command is required before playback/capture: + * + * amixer set "LINEOUT Mixer DACL" on + */ + /dts-v1/; #include "r8a7794.dtsi" #include @@ -119,6 +130,29 @@ #clock-cells = <0>; clock-frequency = <74250000>; }; + + x9_clk: audio_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12288000>; + }; + + 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 = <&ak4643>; + clocks = <&x9_clk>; + }; + }; }; &extal_clk { @@ -193,6 +227,16 @@ groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out"; function = "du1"; }; + + ssi_pins: sound { + groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + function = "ssi"; + }; + + audio_clk_pins: audio_clk { + groups = "audio_clkc"; + function = "audio_clk"; + }; }; &scif2 { @@ -230,6 +274,12 @@ status = "okay"; clock-frequency = <400000>; + ak4643: codec@12 { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; + composite-in@20 { compatible = "adi,adv7180"; reg = <0x20>; @@ -392,3 +442,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; +};