From patchwork Thu Feb 11 20:26:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 8284871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BCDCABEEE5 for ; Thu, 11 Feb 2016 20:30:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DBC8220364 for ; Thu, 11 Feb 2016 20:30:00 +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 C0103202EB for ; Thu, 11 Feb 2016 20:29:59 +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 1aTxpU-0002yZ-9v; Thu, 11 Feb 2016 20:27:08 +0000 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTxpP-0002xG-JP for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2016 20:27:04 +0000 Received: by mail-lf0-x22e.google.com with SMTP id j78so39303857lfb.1 for ; Thu, 11 Feb 2016 12:26:42 -0800 (PST) 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 :content-type; bh=D05bZC7MkO/Se6ol3wFkyTyqbj/p0HPqLb3kHdV98hI=; b=hS/zLuUDFlyd5OO0L1mDIR7AVPYgzucJRygEAcCR0LsTjBwrM8X3xpfIqiDDpSoejD 8csYmpC2OXdsqmWVK7kWdmzKuX+3hMVNKIdz9oIlBDZR7xKAJJ/NzP24zbt2+bDI7ixW qsw3ndzEcBZ/VmiF0uhrW2XecCAGJmZOBgXAQkfKT92HbiBO9QSsKzZTpNO9oLn/TZuR qqPGkffmpOWqleY8xV2ZrmtT0RQBOhsY2dCxWgOOVFUHH+N6XACmACAPn6MxmDsE5rO7 NBV6wBRGYUBihwlm9vaJxI1ozKHoexz5Wr3R4fjLUO06j5HXhs6VQww9bMNQiOXGj4Kv LpJw== 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:content-type; bh=D05bZC7MkO/Se6ol3wFkyTyqbj/p0HPqLb3kHdV98hI=; b=Q/XaIR23L8qmpGdmTTlVkRCHLRWvJw+ayi/8W93uNQ/xE6tN+fg/790wFronvsA6V2 YYI4Jayy5uCTAeUmCQRmJSH0KxIFJMJDnpFqX/sRA89IuacznyZrYXS3cafIk6qL7vxZ ec4KkzxxynAtBF1TyOpwB5AzsxDpRMlLNRrQ2tbI+93ZZnByYNyJpFvpeaVERiLQrh1m lo6SXtXorM+ShHHZOnfohbFGQyCjt/njtfP9jYwLhT2c23Qg0xsYrpGYmZ+wecrVezsJ TJlycc48dlCAKMn6mzboG2xS0YoVxDCrcCzAHkwaQJ8RIsRr0j4PMcSjDrXd8ZNKZmKm sd+Q== X-Gm-Message-State: AG10YOTTO7SfOh7uGUshigTuk6cj5RnuTpguikV1gwWuDkUnYAn0ti+s0JpQWyQCoTTw+g== X-Received: by 10.25.81.144 with SMTP id f138mr19590923lfb.146.1455222401391; Thu, 11 Feb 2016 12:26:41 -0800 (PST) Received: from wasted.cogentembedded.com ([83.149.9.59]) by smtp.gmail.com with ESMTPSA id m8sm1441375lfe.32.2016.02.11.12.26.39 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Feb 2016 12:26:40 -0800 (PST) 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 Subject: [PATCH] ARM: dts: silk: add sound support Date: Thu, 11 Feb 2016 23:26:38 +0300 Message-ID: <4246644.0ZLx3MiCIL@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.2.8-200.fc22.x86_64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <1674850.BZpGW9kEud@wasted.cogentembedded.com> References: <1674850.BZpGW9kEud@wasted.cogentembedded.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160211_122703_901034_3F33A0CD X-CRM114-Status: GOOD ( 13.77 ) X-Spam-Score: -1.8 (-) 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-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_WEB,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 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 Acked-by: Kuninori Morimoto --- This patch is against the 'renesas-devel-20160209-v4.5-rc3' tag of Simon Horman's 'renesas.git' repo. It depends on the 5 R8A7794 sound support patches in posted earlier this week in order to build and the R8A7794 PFC driver patches posted yesterday in order for the pins to be properly configured (but works without the pins configured too)... arch/arm/boot/dts/r8a7794-silk.dts | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 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,30 @@ #clock-cells = <0>; clock-frequency = <74250000>; }; + + x9_clk: x9-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12288000>; + 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 = <&ak4643>; + clocks = <&x9_clk>; + }; + }; }; &extal_clk { @@ -183,6 +218,16 @@ renesas,groups = "usb1"; renesas,function = "usb1"; }; + + ssi_pins: sound { + renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + renesas,function = "ssi"; + }; + + audio_clk_pins: audio_clk { + renesas,groups = "audio_clkc"; + renesas,function = "audio_clk"; + }; }; &scif2 { @@ -220,6 +265,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>; @@ -380,3 +431,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; +};