From patchwork Thu May 12 20:51:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9086151 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-renesas-soc@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 E374C9F372 for ; Thu, 12 May 2016 20:51:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FA29200D4 for ; Thu, 12 May 2016 20:51:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 581C82025A for ; Thu, 12 May 2016 20:51:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987AbcELUvh (ORCPT ); Thu, 12 May 2016 16:51:37 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:36016 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbcELUvg (ORCPT ); Thu, 12 May 2016 16:51:36 -0400 Received: by mail-lf0-f41.google.com with SMTP id u64so78648070lff.3 for ; Thu, 12 May 2016 13:51:35 -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=MtK6TKthz3tu5vg7BbcwiCjL9rn746sKArYB+s1O3t0=; b=zuSzCDsQLa5XDZ7LWvd/q2LU2Qc3/As25hdD/mTcDiD3gqBUDQHE3TAkWDCZGfhydk fdOY2r0737J0f02lkgPHflO6o+pIceu9gmiJoZzdtM5sXCXvgqewBxCNGXzxAszb31fS 6LNMpHrvFIJvXD8FnM0Z5B1bWwTk0mtD9JnDTIqJgV1o8kEbNT6TND/BC83T7rTMgTM3 D2v5dBd1c+jtFLG/rB496w8gxwKRms6LunL3auOAW3I+EUke0aAA/PblFwqEZmtaRvTL 68DjKmuFhfwFBNwjPva5E3FxbbYFR/Q3MVsE04qb10GCeEcdpbgYanSAdrpT9gV+AIq6 AFQg== 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=MtK6TKthz3tu5vg7BbcwiCjL9rn746sKArYB+s1O3t0=; b=Ad4N8m2j9g4oFTUTPgaY2In0Uiy661rRNaqqXTtbFVrthWduauI29JKvT0YJUox2xJ f55A7EEAm4ZgmP7atjsAkXcByKMYwpPK8b9PnHR6lAQGx/bFX/iUJYfJKj80betM9jPH OrRyrUSwIURjr3y/wFrQ84veZd3/wtI8Np/nqyJaJIvkbXTnvtUY8lP2mQJNf7CNoWhy A8OvVAEfxlDBCyrzA+9vf1+n+7/fNUJv5u3caVThLbUAb/h3qzpyr7tlrtUkoNYyzkkG nbF+yHU7N1ohYqa9A2WQv1ygtPG8b40a1mD7jOTtU+o8hr9Ln96H21zjrYutbQ9oByg5 B5CQ== X-Gm-Message-State: AOPr4FXNUnKUH2V0I6YMIWZWdXg+O8q79iWdif/qdrfKMzYp5gqCUoyw2z7lSzD8n/+xqw== X-Received: by 10.25.78.68 with SMTP id c65mr4570534lfb.21.1463086294842; Thu, 12 May 2016 13:51:34 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.81.173]) by smtp.gmail.com with ESMTPSA id jw6sm2347119lbc.13.2016.05.12.13.51.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2016 13:51:34 -0700 (PDT) From: Sergei Shtylyov To: horms@verge.net.au, linux-renesas-soc@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, devicetree@vger.kernel.org Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 6/6] ARM: dts: silk: add sound support Date: Thu, 12 May 2016 23:51:32 +0300 Message-ID: <9205499.bquhjWrlAH@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.4.8-200.fc22.x86_64; KDE/4.14.17; x86_64; ; ) In-Reply-To: <2378837.cigT3tNQPe@wasted.cogentembedded.com> References: <2378837.cigT3tNQPe@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,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 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 --- This patch is against the 'renesas-devel-20160509-v4.6-rc7' tag of Simon Horman's 'renesas.git' repo. It depends on the 5 R8A7794 sound support patches posted earlier in order to build... 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; +};