From patchwork Fri Dec 11 02:52:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 7823671 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@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 8B53F9FB32 for ; Fri, 11 Dec 2015 02:53:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B2B7420480 for ; Fri, 11 Dec 2015 02:53:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1FDD2056E for ; Fri, 11 Dec 2015 02:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbbLKCxS (ORCPT ); Thu, 10 Dec 2015 21:53:18 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:60851 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751431AbbLKCxS (ORCPT ); Thu, 10 Dec 2015 21:53:18 -0500 Received: from reginn.isobedori.kobe.vergenet.net (p5254-ipbfp1403kobeminato.hyogo.ocn.ne.jp [114.152.48.254]) by kirsty.vergenet.net (Postfix) with ESMTPA id 021DC25BE7A; Fri, 11 Dec 2015 13:53:06 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1449802386; bh=uLboLbnIC8xf8tpnBDJJwiCwvRIooyVEXst2VyNhbZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=STwHU0JL58FVM/W2UuNI/ZnblkjMNWl8V7Ony+ZSJVV5+zhVbNbNTLNseFwv5iOjJ otWr45DYe+BLn3WUR7/agQGtQdVR2JJtDHKQGl6af0yW+UUTkFdSxbpYsHzqYpSVe2 A0LUYDbQJrQZuUlRHCVk7Du3wVF7mfw0BWjD1h8s= Received: by reginn.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id C9AB6940D26; Fri, 11 Dec 2015 11:53:03 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Simon Horman , Kuninori Morimoto Subject: [PATCH/RFC 12/19] ARM: shmobile: gose: Enable sound PIO support in device tree Date: Fri, 11 Dec 2015 11:52:49 +0900 Message-Id: <1449802376-11301-13-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449802376-11301-1-git-send-email-horms+renesas@verge.net.au> References: <1449802376-11301-1-git-send-email-horms+renesas@verge.net.au> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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 Enable sound PIO support in the r8a7793/gose device tree. Based on similar work for the r8a7791/koelsch by Kuninori Morimoto. Cc: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7793-gose.dts | 76 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts index 9a71ff6d4474..64bcde44f4e5 100644 --- a/arch/arm/boot/dts/r8a7793-gose.dts +++ b/arch/arm/boot/dts/r8a7793-gose.dts @@ -8,6 +8,17 @@ * kind, whether express or implied. */ +/* + * SSI-AK4643 + * + * SW1: 1: AK4643 + * 2: CN22 + * 3: ADV7511 + * + * This command is required when Playback/Capture + * + * amixer set "LINEOUT Mixer DACL" on + */ /dts-v1/; #include "r8a7793.dtsi" #include @@ -31,6 +42,30 @@ device_type = "memory"; reg = <0 0x40000000 0 0x40000000>; }; + + audio_clock: clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <11289600>; + clock-output-names = "audio_clock"; + }; + + rsnd_ak4643: sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4643>; + clocks = <&audio_clock>; + }; + }; }; &extal_clk { @@ -67,6 +102,16 @@ renesas,groups = "qspi_ctrl", "qspi_data4"; renesas,function = "qspi"; }; + + sound_pins: sound { + renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clk_a"; + renesas,function = "audio_clk"; + }; }; ðer { @@ -148,9 +193,40 @@ status = "okay"; clock-frequency = <100000>; + ak4643: codec@12 { + compatible = "asahi-kasei,ak4643"; + #sound-dai-cells = <0>; + reg = <0x12>; + }; eeprom@50 { compatible = "renesas,24c02"; reg = <0x50>; pagesize = <16>; }; }; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +};