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: 8284861 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-renesas-soc@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 497BBBEEE5 for ; Thu, 11 Feb 2016 20:26:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D01E20380 for ; Thu, 11 Feb 2016 20:26:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86B2A202EB for ; Thu, 11 Feb 2016 20:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751067AbcBKU0o (ORCPT ); Thu, 11 Feb 2016 15:26:44 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:34457 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbcBKU0n (ORCPT ); Thu, 11 Feb 2016 15:26:43 -0500 Received: by mail-lf0-f44.google.com with SMTP id j78so39303869lfb.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=Xs8Mmm9ok6L9+fHuDfhRbsD4K1cikC1ZSFJ9/BCEoAQW8QvR47EwnlLTPs1N15tXz7 nZmrF4kU+D5JYT/qPxJvZroxNngfzqQqQ7XVcBXtSK7iSGBOkBYGEsYpxE9Ddy5p20PB r+RpFEjb7+7kWxGwOoWn351sgJaZdcv9FYlLV1bhgBBd4/9+tgLpTmz3E/KTLND+IMcO L9rm86TBcxJyMvCtsNgN8In2R56drmd3mr1jsW+HMiCIamedJ1Gg5n+XguKKv+/1HVsv hkqE+zpK1oMKo/zmyB2C2pksCoAwae0SVl+JneFUF29OkdqbGgSYQ4G+1g+xHAZoa7mY leXw== X-Gm-Message-State: AG10YOTu0zGMpm7Cl9jnza8MQJRjnbFJHxPYXy9MRvREuEGdyzbYZWWKVKgRyhq81CXuTg== 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 Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.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 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=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB,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 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; +};