From patchwork Thu Sep 10 07:17:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7151421 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 9F82F9F39B for ; Thu, 10 Sep 2015 07:17:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0509208D6 for ; Thu, 10 Sep 2015 07:17:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 963EA20903 for ; Thu, 10 Sep 2015 07:17:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055AbbIJHRS (ORCPT ); Thu, 10 Sep 2015 03:17:18 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:17981 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751594AbbIJHRQ (ORCPT ); Thu, 10 Sep 2015 03:17:16 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie1.idc.renesas.com with ESMTP; 10 Sep 2015 16:17:15 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 96C3748F02; Thu, 10 Sep 2015 16:17:15 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 9332C1806F; Thu, 10 Sep 2015 16:17:15 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 8D5D81800A; Thu, 10 Sep 2015 16:17:15 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id SAB15547; Thu, 10 Sep 2015 16:17:15 +0900 X-IronPort-AV: E=Sophos;i="5.17,502,1437404400"; d="scan'";a="194140576" Received: from mail-sg2apc01lp0246.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.246]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 10 Sep 2015 16:17:14 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR06MB0595.apcprd06.prod.outlook.com (10.161.187.146) with Microsoft SMTP Server (TLS) id 15.1.262.15; Thu, 10 Sep 2015 07:17:13 +0000 Message-ID: <87fv2mn3wd.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 08/14][RFC] arm64: renesas: salvator-x: add PIO sound support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Wolfram Sang , Simon CC: Magnus , Linux-SH In-Reply-To: <87si6mn452.wl%kuninori.morimoto.gx@renesas.com> References: <87si6mn452.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 10 Sep 2015 07:17:13 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0015.jpnprd01.prod.outlook.com (25.161.24.25) To HK2PR06MB0595.apcprd06.prod.outlook.com (25.161.187.146) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0595; 2:tq6kYVTt2Gb5tAKTDsIZULr1Fwg0i8rBdkY2bCscEQvlW95zOxULMhdIZguDu3FxAyej9STMZ/Kvspv+5qbxNqvGGWKfucXm4N4wMwJGOckaw0a02HfRUF6yvedjjU85ry9R8x266UE8mwINePH/iQOPCynvmDm+LP/eAismCts=; 3:jaT12EK9Bb+wNar6UuA5dgqoXjT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HRCyQNLSu87BMXKy4i808GSXYzsoagBm9Zy9R4gNICTDZMs1RNuJehYx25IlkoVmKBAW0sxJbATKqJLP9xQhyKhOWpSotQ4wvFzYSfBLXOxWfxe2hWoxUfHcNzSLW6EyoYQq9V+2R9vTZogikTZLesgCU05up1Ngr5b8etTubrwTRiEuqx5myjfwohCWVdZlQxRDET29yDudACjFrAK4iARSUYRpL42zkSe5QrB2ssPYHuG7iXz1lgagLVVauqd3Zuz7FTh8q/vuIMK8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(3002001); SRVR:HK2PR06MB0595; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0595; X-Forefront-PRVS: 06952FC175 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(229853001)(68736005)(105586002)(50986999)(42186005)(76176999)(54356999)(77156002)(106356001)(33646002)(5001830100001)(5001960100002)(19580405001)(50466002)(189998001)(19580395003)(5001860100001)(83506001)(46406003)(86362001)(87976001)(46102003)(69596002)(62966003)(53416004)(36756003)(5004730100002)(23726002)(47776003)(92566002)(5001770100001)(5007970100001)(40100003)(2950100001)(66066001)(122386002)(101416001)(4001540100001)(4001350100001)(81156007)(77096005)(64706001)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0595; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0595; 23:3LpUXGBJ9hAo1FrB40GZwD+CcbcuZvGXKjIJZ2nMi?= =?us-ascii?Q?fTAEOn/OfAJ6GMfrk2vJDkp4ZJpz28aWV8p3+pUltOzH7bhXMK2B/QzdHQBj?= =?us-ascii?Q?B44sWTphAgFGd6rFPaX+I7e1OFCMt6oU+vW20pW10trQOcp+YUmDij9uihdb?= =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PK2HlZCLRhVlGDO+i37fjuQLhS60AndXdWiXoGbhk?= =?us-ascii?Q?bERXbjM4vFsEf+0Viak1X7jLbmrlouuchHI5ClRIuW0hpN+mePOz76pt2BFy?= =?us-ascii?Q?GWf49RcB5+qiJjH6mGYTDX4/L/hdvi8OET7BLBXIAPTPSIxx8CEo7GaXYvzo?= =?us-ascii?Q?7/LINi3Hzq656Z5GcnTIsMcywjDbdwjDHdYMZbnHe9N8Z91Vaf+rxGfYm4+m?= =?us-ascii?Q?qVcMIDfK7338t0Zn/k=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0595; 5:QWLvvtJTiUw0dsD24o5aumxM5Rair2xUUD+SHPOa6kqs8kuIjMkohyTPPbeoua5VDQG74z3n235eoO+T19jovBGt/EgzzqwR5W+76GxL8F0bB0GL4JWAaqWAw0fsMGwq2i1ffLQUOWGnpx25vsqeMQ==; 24:Ew4H13t8R7SboOK+xXz85fx/6PZ33/Nwt0t1OAiLMrVCX5uCVL+NesD8cNUeb8Ab4S1/H1tdk3RUQhZsX1MFuwYimv/7x9NKi+VKLMbm8RA=; 20:6dUWEIfW3yfLttB621E8GdcWsZmyFTHboCbDX0y0ZLJYaqOHItzX5M+TwdSokSKF73DFdN7VI17guH4kXee6ygYb7KZJuPkDTR6CGQ86Zv0zhCgiF3V9B5xOUQmkf5eo8NR1OFmuNac2agwQOIdH/PVhcyKXPvWDXk8PgpQj4h8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2015 07:17:13.0437 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0595 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Kuninori Morimoto This patch adds PIO sound support for Salvator-X board. Signed-off-by: Kuninori Morimoto --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index 0599b2b..be045a9 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -30,6 +30,28 @@ /* first 128MB is reserved for secure area. */ reg = <0x0 0x48000000 0x0 0x38000000>; }; + + x12_clk: x12_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + }; + + rsnd_ak4613: sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcpu>; + simple-audio-card,frame-master = <&sndcpu>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4613>; + }; + }; }; &extal_clk { @@ -50,6 +72,16 @@ renesas,groups = "i2c2_a"; renesas,function = "i2c2"; }; + + sound_pins: sound { + renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_a_data"; + renesas,function = "ssi"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clkout3_a"; + renesas,function = "audio_clk"; + }; }; &scif1 { @@ -71,4 +103,63 @@ pinctrl-names = "default"; status = "okay"; + + ak4613: codec@0x10 { + compatible = "asahi-kasei,ak4613"; + #sound-dai-cells = <0>; + reg = <0x10>; + clocks = <&rcar_sound 3>; + }; + + cs2000: clk_multiplier@0x4f { + compatible = "cirrus,cs2000-cp"; + reg = <0x4f>; + clocks = <&rcar_sound 0>, <&x12_clk>; + clock-frequency = <24576000>; /* 1/1 divide */ + }; +}; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + /* audio_clkout0/1/2/3 */ + #clock-cells = <1>; + clock-frequency = <12288000>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +}; + +&audio_clk_a { + clock-frequency = <22579200>; +}; + +&audio_clk_b { + /* + * It should be below here, but it will be dead-lock + * since cs2000 requests audio_clkout (= <&rcar_sound 0>) + * and, rcar_sound (= audio_clk_b) requests cs2000. + * Here assumes cs2000 outputs fixed clock-frequency + * clocks = <&cs2000>; + */ + clock-frequency = <24576000>; };