From patchwork Thu Jan 21 22:36:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 8085321 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 6456F9F818 for ; Thu, 21 Jan 2016 22:36:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B916120452 for ; Thu, 21 Jan 2016 22:36:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0904920375 for ; Thu, 21 Jan 2016 22:36:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbcAUWgH (ORCPT ); Thu, 21 Jan 2016 17:36:07 -0500 Received: from mail-lb0-f178.google.com ([209.85.217.178]:36640 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbcAUWgE (ORCPT ); Thu, 21 Jan 2016 17:36:04 -0500 Received: by mail-lb0-f178.google.com with SMTP id oh2so31537307lbb.3 for ; Thu, 21 Jan 2016 14:36:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=U4fK53qbQc4uANO5lmqKfAMqchmA3YpKXKN9sezGP9s=; b=SGUqtLAfm2lWkyDjpYpNIQA4/AFnpfWAEays936hcFGRzkwiIhNWTuazXI9SnMpjtW FmLGdSV/Tdjb0l5VVbKnV9I4LHM6DflhhvjI4gkZ90cGFUTQWj+VmjYqpaseeQubAKW6 jOhtFR1wzyojUPb8n6S97mK2Xd5gUzyJSW7Zsr4OyN0CfRjjyNMVRw1oRqdqWzOBZOHD micQk50kAisJmiGrHN0eIkekoENePJCE6ZELc5AKos/QEe6jIcPbLVKdt/P6+K14CI08 f2/UxTuzK5jAU5o4A5GzdrrysV2KoL2HJOu7TdGW6rl1FY1snnpF9SmPreTTTLdyLDAn /H0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=U4fK53qbQc4uANO5lmqKfAMqchmA3YpKXKN9sezGP9s=; b=gso6rghqj6Xnq/cavhUd0hYbiLc9XpGKakR12nJrQ/xQU2af8MHq96SHLYMQuPIXCi QiLWoErNVeRINrB9bjCpIedlpoFpTXpRVl/9UJ7W5E05YqB82bMcfmJIiwhcPV6GfP3+ MOyvfJz+JuYR4DICe/StLL+cyfWE3MeE4sQ9BW+HlugRtRSIbf+Qw74vr4KdLZ4ReJQB arfhGX1pV8+iZhanddeevPYv9890ZWj5yFjJHyH8ffd72UtioclwH34C/M3XMy5aW8f5 xRl0Qp+Z+/0NGu7LXEREsZYL8FUVsX4kJlysKf9YeZ6ONnclPyVmDvrG8mHf7RQOroEU Iw9w== X-Gm-Message-State: ALoCoQlqmT7KkBChn7Zctu29mec1pwC966Smku2L/J/YojFde42KHUn5VgR+OhcdGYiPC7/08cyMbRNWyEYdBQQTrZFFF+Hc1A== X-Received: by 10.112.134.70 with SMTP id pi6mr13756165lbb.59.1453415762514; Thu, 21 Jan 2016 14:36:02 -0800 (PST) Received: from wasted.cogentembedded.com ([195.16.110.124]) by smtp.gmail.com with ESMTPSA id c192sm493015lfb.16.2016.01.21.14.36.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jan 2016 14:36:01 -0800 (PST) Date: Thu, 21 Jan 2016 14:36:01 -0800 (PST) X-Google-Original-Date: Fri, 22 Jan 2016 01:36 +0300 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: porter: add sound support Message-ID: <1872468.4EonQLNEFn@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.9 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 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 --- This patch is against 'renesas-devel-20160121-v4.4' tag of Simon Horman's 'renesas.git' repo. arch/arm/boot/dts/r8a7791-porter.dts | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) Index: renesas/arch/arm/boot/dts/r8a7791-porter.dts =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7791-porter.dts +++ renesas/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; +};