From patchwork Fri Sep 18 02:03:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7212451 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 071579F32B for ; Fri, 18 Sep 2015 02:04:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCBF3206B5 for ; Fri, 18 Sep 2015 02:04:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD51F2062E for ; Fri, 18 Sep 2015 02:04:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbbIRCED (ORCPT ); Thu, 17 Sep 2015 22:04:03 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:30978 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752043AbbIRCEB (ORCPT ); Thu, 17 Sep 2015 22:04:01 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 18 Sep 2015 11:04:00 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 6BFE7409D3; Fri, 18 Sep 2015 11:04:00 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 6F5EC2806E; Fri, 18 Sep 2015 11:04:00 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 6972C2806D; Fri, 18 Sep 2015 11:04:00 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id MAD07765; Fri, 18 Sep 2015 11:04:00 +0900 X-IronPort-AV: E=Sophos;i="5.17,550,1437404400"; d="scan'";a="194700601" Received: from mail-sg2apc01lp0239.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.239]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Sep 2015 11:03:59 +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 SG2PR06MB0601.apcprd06.prod.outlook.com (10.161.10.151) with Microsoft SMTP Server (TLS) id 15.1.268.17; Fri, 18 Sep 2015 02:03:58 +0000 Message-ID: <877fno1o8i.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 04/18 v3] arm64: renesas: r8a7795: Sound SSI PIO support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Simon CC: Magnus , In-Reply-To: <87d1xg1oc7.wl%kuninori.morimoto.gx@renesas.com> References: <87twqs1osz.wl%kuninori.morimoto.gx@renesas.com> <87d1xg1oc7.wl%kuninori.morimoto.gx@renesas.com> Date: Fri, 18 Sep 2015 02:03:58 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0019.apcprd06.prod.outlook.com (25.164.91.29) To SG2PR06MB0601.apcprd06.prod.outlook.com (25.161.10.151) X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0601; 2:pblpiF23AqQO2mItAEMmqvpGGfuQBSFm5wS7aww16EW17XC38m3x7ZarysmpxmXrf1J/QWvRVDvqIoL0t8R5CoZPIQb9McusMImfcR3tkfe5JPCEoeFgLLevIVOnhXcq3/tBQIHAsEk61uBa8biCBmFDcJRpWv9buNSbLjCXfSc=; 3:SfO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81mNW37zHcMJEFEyFg8Kff3zLtWeKUaYVh0iwNdDTY/A0Zx375qouYsUkL9MSp2ibd0QZ+eDRXZTjN+BSmEBKNf89T9dxfJCCzRW4o8gXlWg3rJPieXJqNlemLdogVLw3eOc4bPVGJg4k9yKNaoFqiyQdJLbTtJd/U8FYz9EBGQ2qbf3WR0d+iEVxnlacbSL2AyVCqkzG1yc1uGHnO6qqb4Rz/i/H9Sad3FNHtPD9XevSyhZAgCgEWorCMGyUpQytWcKO4SdCcSvBP5f1gJbmyLXI7rUfvidCqKyqO8PgzetxyA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(8121501046)(520078)(3002001); SRVR:SG2PR06MB0601; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB0601; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(77096005)(106356001)(36756003)(189998001)(46406003)(5007970100001)(76176999)(81156007)(575784001)(92566002)(5001860100001)(2950100001)(19580405001)(5001830100001)(5004730100002)(40100003)(122386002)(19580395003)(97736004)(86362001)(4001540100001)(33646002)(47776003)(4001350100001)(69596002)(229853001)(50466002)(83506001)(54356999)(110136002)(68736005)(87976001)(5001960100002)(101416001)(66066001)(105586002)(77156002)(42186005)(23726002)(53416004)(62966003)(46102003)(64706001)(50986999)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB0601; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB0601; 23:/iDz2Jbse+3F4auwLN3ja/pGuuQW2dUpwLGP0tV3D?= =?us-ascii?Q?9PH1BrJQeH2RwYsAyR0ndPt5HuTqImoQcEpwNO1exlYKpHkInR/sD/tEzlQB?= =?us-ascii?Q?p/vsfq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ceekPTPea?= =?us-ascii?Q?+ERb0TywwX9phYgi+uFoYMR4uuL4gVIot/BC97EfP2bZQOUoiR2u6FzXg2CB?= =?us-ascii?Q?ugtLPlQtLz0intYJ68K6Z8kh9rVuB1ceMPVEa537WD96FFGq7ISso533pDSr?= =?us-ascii?Q?03tKhMvP525frrjNCXGcv5Y11lgPnlXaQeZDFlhwkrfYi0cWSx83VDe3AqnX?= =?us-ascii?Q?rneHjeZTRVFwybTT1bWteSFWBAltXwTVRCb+G2miJoUn7J43pY1bN1n6DkoD?= =?us-ascii?Q?w8alBULmBgvcLjQ3ce9KmAo428En6WgilKdOcBRvIlZMayyBLlfyKxlwaf/5?= =?us-ascii?B?QT09?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB0601; 5:74Es4FGlqT/uSmUcftzy5W04oLQbAf5Tw6wxWLdIi2uOHnK3/ARlTGxnO1gqpmwQX27uUewMVYXF1wqhwxuLINVQsoOGXzdrpbCNUC+JE6efLL782HwGm/GgKyEQHQmuBgLzPalVNB5Zv7rM9fLQ5w==; 24:TvkQmJlXuYD9/SF0tGq1vIPmpMrZKHrNpr7smuzUA1tC2/piU0LVNGJYTbbUU5eC7oJlv5IlrnrtsUWFlunwqUXV4vEoPatpPzdxwmw6Pus=; 20:Qei8J83ixEZd4j10SrkxC97rakS0EdG8Pw7sKG+8Py6jcskoHOed6LBvRoewp1Hz05SmBX+WfrtvLf9XXE9EZh6KhN/LPaDrPsfqw1RM6aist3N18I3rsGnSbdDFOJvIK6TGjfQPE3ECpBPDxpuuMSYURp5N2Sg0nFtygA0JvXc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2015 02:03:58.0708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0601 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 SSI for PIO sound support Signed-off-by: Kuninori Morimoto --- v2 -> v3 - no change arch/arm64/boot/dts/renesas/r8a7795.dtsi | 104 ++++++++++++++++++++++++++++++ include/dt-bindings/clock/r8a7795-clock.h | 11 ++++ 2 files changed, 115 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index a87c4be..b7ee56b 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -377,6 +377,24 @@ clock-output-names = "lvds"; }; + audio_clk_a: audio_clk_a { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + audio_clk_b: audio_clk_b { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + + audio_clk_c: audio_clk_c { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + cpg_clocks: cpg_clocks@e6150000 { #address-cells = <2>; #size-cells = <2>; @@ -501,6 +519,23 @@ R8A7795_CLK_I2C0 >; }; + + mstp10_clks: mstp10_clks@e6150998 { + compatible = "renesas,r8a7795-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>; + #clock-cells = <1>; + clocks = <&s3d4_clk>, + <&mstp10_clks R8A7795_CLK_SSI_ALL>, <&mstp10_clks R8A7795_CLK_SSI_ALL>, + <&mstp10_clks R8A7795_CLK_SSI_ALL>, <&mstp10_clks R8A7795_CLK_SSI_ALL>, + <&mstp10_clks R8A7795_CLK_SSI_ALL>, <&mstp10_clks R8A7795_CLK_SSI_ALL>, + <&mstp10_clks R8A7795_CLK_SSI_ALL>, <&mstp10_clks R8A7795_CLK_SSI_ALL>, + <&mstp10_clks R8A7795_CLK_SSI_ALL>, <&mstp10_clks R8A7795_CLK_SSI_ALL>; + clock-indices = < + R8A7795_CLK_SSI_ALL + R8A7795_CLK_SSI9 R8A7795_CLK_SSI8 R8A7795_CLK_SSI7 R8A7795_CLK_SSI6 R8A7795_CLK_SSI5 + R8A7795_CLK_SSI4 R8A7795_CLK_SSI3 R8A7795_CLK_SSI2 R8A7795_CLK_SSI1 R8A7795_CLK_SSI0 + >; + }; }; }; @@ -936,6 +971,75 @@ power-domains = <&cpg_clocks>; status = "disabled"; }; + + rcar_sound: sound@ec500000 { + /* + * #sound-dai-cells is required + * + * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>; + * Multi DAI : #sound-dai-cells = <1>; <&rcar_sound N>; + */ + /* + * #clock-cells is required for audio_clkout0/1/2/3 + * + * clkout : #clock-cells = <0>; <&rcar_sound>; + * clkout0/1/2/3: #clock-cells = <1>; <&rcar_sound N>; + */ + compatible = "renesas,rcar_sound-r8a7795", "renesas,rcar_sound-gen3"; + reg = <0 0xec500000 0 0x1000>, /* SCU */ + <0 0xec5a0000 0 0x100>, /* ADG */ + <0 0xec540000 0 0x1000>, /* SSIU */ + <0 0xec541000 0 0x280>, /* SSI */ + <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ + reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; + + clocks = <&mstp10_clks R8A7795_CLK_SSI_ALL>, + <&mstp10_clks R8A7795_CLK_SSI9>, <&mstp10_clks R8A7795_CLK_SSI8>, + <&mstp10_clks R8A7795_CLK_SSI7>, <&mstp10_clks R8A7795_CLK_SSI6>, + <&mstp10_clks R8A7795_CLK_SSI5>, <&mstp10_clks R8A7795_CLK_SSI4>, + <&mstp10_clks R8A7795_CLK_SSI3>, <&mstp10_clks R8A7795_CLK_SSI2>, + <&mstp10_clks R8A7795_CLK_SSI1>, <&mstp10_clks R8A7795_CLK_SSI0>, + <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&s0d4_clk>; + clock-names = "ssi-all", + "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", + "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", + "clk_a", "clk_b", "clk_c", "clk_i"; + power-domains = <&cpg_clocks>; + status = "disabled"; + + rcar_sound,ssi { + ssi0: ssi@0 { + interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi1: ssi@1 { + interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi2: ssi@2 { + interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi3: ssi@3 { + interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi4: ssi@4 { + interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi5: ssi@5 { + interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi6: ssi@6 { + interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi7: ssi@7 { + interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi8: ssi@8 { + interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; + }; + ssi9: ssi@9 { + interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + }; }; }; diff --git a/include/dt-bindings/clock/r8a7795-clock.h b/include/dt-bindings/clock/r8a7795-clock.h index ca370c7..c4cacd9 100644 --- a/include/dt-bindings/clock/r8a7795-clock.h +++ b/include/dt-bindings/clock/r8a7795-clock.h @@ -76,5 +76,16 @@ #define R8A7795_CLK_I2C0 31 /* MSTP10 */ +#define R8A7795_CLK_SSI_ALL 5 +#define R8A7795_CLK_SSI9 6 +#define R8A7795_CLK_SSI8 7 +#define R8A7795_CLK_SSI7 8 +#define R8A7795_CLK_SSI6 9 +#define R8A7795_CLK_SSI5 10 +#define R8A7795_CLK_SSI4 11 +#define R8A7795_CLK_SSI3 12 +#define R8A7795_CLK_SSI2 13 +#define R8A7795_CLK_SSI1 14 +#define R8A7795_CLK_SSI0 15 #endif /* __DT_BINDINGS_CLOCK_R8A7795_H__ */