From patchwork Thu Sep 17 04:10:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7201771 X-Patchwork-Delegate: geert@linux-m68k.org 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 B2EA39F32B for ; Thu, 17 Sep 2015 04:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A34E720459 for ; Thu, 17 Sep 2015 04:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85C792044B for ; Thu, 17 Sep 2015 04:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750974AbbIQEKq (ORCPT ); Thu, 17 Sep 2015 00:10:46 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:61740 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750740AbbIQEKp (ORCPT ); Thu, 17 Sep 2015 00:10:45 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 17 Sep 2015 13:10:43 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id C4E0E4A02C; Thu, 17 Sep 2015 13:10:43 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id C04AD480A3; Thu, 17 Sep 2015 13:10:43 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id B5E0948014; Thu, 17 Sep 2015 13:10:43 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id PAJ16954; Thu, 17 Sep 2015 13:10:43 +0900 X-IronPort-AV: E=Sophos;i="5.17,543,1437404400"; d="scan'";a="194623304" 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; 17 Sep 2015 13:10:42 +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 HK2PR06MB0594.apcprd06.prod.outlook.com (10.161.187.145) with Microsoft SMTP Server (TLS) id 15.1.268.17; Thu, 17 Sep 2015 04:10:39 +0000 Message-ID: <87y4g57kqn.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/3] pinctrl: sh-pfc: r8a7795: add Audio clock pin support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Simon , Linus Walleij , Laurent CC: "linux-gpio@vger.kernel.org" , Wolfram Sang , Magnus , Linux-SH , Geert Uytterhoeven In-Reply-To: <87mvx4qkzo.wl%kuninori.morimoto.gx@renesas.com> References: <87mvx4qkzo.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 17 Sep 2015 04:10:39 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0006.jpnprd01.prod.outlook.com (25.161.225.144) To HK2PR06MB0594.apcprd06.prod.outlook.com (25.161.187.145) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 2:DtLTqTc3PflBWJJlCKPuqbVjWiOMA6ftcF55Iq7RhJpI0Mj3ai9Kyy6lsAg6r6KVrOf/0VvWl41MOSpT4M5T0h7HchHk43onTgoWkAhLUf6p0R7CcZISO7AA3w1haNqneoVl4qvuGZkii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Bz29szAxnuDs8LX2hx0E58jXPnhoMOvKZKik5uWw4WrsXZHc7YciTDgJNOqbQlUTK/GDzg8Jec5unk/jr9u9k9R2Uzctqh0T+hyJpNAvh06SOuH01drGBzb7sPEEEPz49Gv4n2J4Q7DipbO/hZ0CQD2YqGycRangt4Kwj/WNhx+Qz/ybP+6I9BPap6XDSX/sB2Xw9oUHLY95CNqDfxNgofwG1TaLS9UmXf73cBoDX5Czqshd5YYArA3e5rGzJPBw9AF/J9p3gtCMRO5KnwdpkGLMye2770U9Uaf3jtiTlloY18ijrtGIsZM/XFwC6+PBBP6RujVSzOjkMG7gqJK1OkX4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520075)(520078)(8121501046)(3002001); SRVR:HK2PR06MB0594; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0594; X-Forefront-PRVS: 07025866F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(46406003)(23726002)(47776003)(69596002)(50466002)(66066001)(4001350100001)(5004730100002)(77096005)(5001830100001)(86362001)(5001770100001)(46102003)(64706001)(106356001)(5007970100001)(19580395003)(5001860100001)(19580405001)(101416001)(53416004)(97736004)(5001960100002)(81156007)(40100003)(36756003)(87976001)(189998001)(54356999)(122386002)(229853001)(77156002)(62966003)(2950100001)(4001540100001)(50986999)(33646002)(92566002)(83506001)(105586002)(68736005)(42186005)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0594; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0594; 23:lBJziDhbx4gf/r/zlSjL3EQLcgIEesWEDQH/z0cBr?= =?us-ascii?Q?E+GwGSj2c8Sh1Lh0l0JM2tK5xzmcZ3GVGPDEJ6TSkhxTA0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K0kfSgh0J9edcqJioGWf/eGkCa0wAvdhvWJtp9XjZT?= =?us-ascii?Q?nCFLcwnhrtaGpH1J+IS2NV5Chpwk53WIjzZpixPJbTk+h3yOTNzP/7w6JfTa?= =?us-ascii?Q?11bscM0iCwAvCTCig/xvXNI6Dk9Jf8/4D5trQU1Jae1Ch4NkolvNK0wLzv+K?= =?us-ascii?Q?NhW6Icw/QjsOhJRLpZiP0LzPyL+1uVlYAzUBEDVXNFUY9Im3fbPvo5Kp0ceY?= =?us-ascii?Q?A29heTl3slehjentXKelOqkHwMbi/+VjoW+dNMCsVeE5ZtsHIKbveY/cbTrL?= =?us-ascii?Q?wN5mJkTxlYikbn9psg=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 5:msTJPgOBM8AeJRPs5KDkrmaYNNR6svtLMX596mtGLcD5EWLfApBXuXRki+XiPlKk/vhCWPxb88fTtz0FoMbSZc7FRrqcyERWdTu3ASZpitMjR/VGOf8kPQBmqwyWIY24mNAepHmZLFf+AL91EM76ag==; 24:9lu6TtVcTu6ztadj3zch9PoWDq1nBXn+pkoJCqY2M4hDmMffXq0Ayjn6uEIlvN7YuaLqj2wX0/LTykziWSz3tOWJNjHB6kyI4AKQTIN3G2E=; 20:egjbcXb0wzSpUBnKru7blo55V94msDRExLw4YA64yZvCzddgs2n27bfZ6ovW7UFxPhNBait4tOiwUcpXnyGasIVMP4qt6cAsgBB5eGlUtmlVjOBAQmhGovng75oPNNETcFw8xTKXlWABcWhRpV/fafbhXHlozDXLF0I2SHw6T3o= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2015 04:10:39.9711 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0594 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 Signed-off-by: Kuninori Morimoto --- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 151 +++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c index f6afe71..183178d 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c @@ -1426,6 +1426,121 @@ static const struct sh_pfc_pin pinmux_pins[] = { PINMUX_GPIO_GP_ALL(), }; +/* - AUDIO CLOCK ------------------------------------------------------------ */ +static const unsigned int audio_clk_a_a_pins[] = { + /* CLK A */ + RCAR_GP_PIN(6, 22), +}; +static const unsigned int audio_clk_a_a_mux[] = { + AUDIO_CLKA_A_MARK, +}; +static const unsigned int audio_clk_a_b_pins[] = { + /* CLK A */ + RCAR_GP_PIN(5, 4), +}; +static const unsigned int audio_clk_a_b_mux[] = { + AUDIO_CLKA_B_MARK, +}; +static const unsigned int audio_clk_a_c_pins[] = { + /* CLK A */ + RCAR_GP_PIN(5, 19), +}; +static const unsigned int audio_clk_a_c_mux[] = { + AUDIO_CLKA_C_MARK, +}; +static const unsigned int audio_clk_b_a_pins[] = { + /* CLK B */ + RCAR_GP_PIN(5, 12), +}; +static const unsigned int audio_clk_b_a_mux[] = { + AUDIO_CLKB_A_MARK, +}; +static const unsigned int audio_clk_b_b_pins[] = { + /* CLK B */ + RCAR_GP_PIN(6, 23), +}; +static const unsigned int audio_clk_b_b_mux[] = { + AUDIO_CLKB_B_MARK, +}; +static const unsigned int audio_clk_c_a_pins[] = { + /* CLK C */ + RCAR_GP_PIN(5, 21), +}; +static const unsigned int audio_clk_c_a_mux[] = { + AUDIO_CLKC_A_MARK, +}; +static const unsigned int audio_clk_c_b_pins[] = { + /* CLK C */ + RCAR_GP_PIN(5, 0), +}; +static const unsigned int audio_clk_c_b_mux[] = { + AUDIO_CLKC_B_MARK, +}; +static const unsigned int audio_clkout_a_pins[] = { + /* CLKOUT */ + RCAR_GP_PIN(5, 18), +}; +static const unsigned int audio_clkout_a_mux[] = { + AUDIO_CLKOUT_A_MARK, +}; +static const unsigned int audio_clkout_b_pins[] = { + /* CLKOUT */ + RCAR_GP_PIN(6, 28), +}; +static const unsigned int audio_clkout_b_mux[] = { + AUDIO_CLKOUT_B_MARK, +}; +static const unsigned int audio_clkout_c_pins[] = { + /* CLKOUT */ + RCAR_GP_PIN(5, 3), +}; +static const unsigned int audio_clkout_c_mux[] = { + AUDIO_CLKOUT_C_MARK, +}; +static const unsigned int audio_clkout1_a_pins[] = { + /* CLKOUT1 */ + RCAR_GP_PIN(5, 15), +}; +static const unsigned int audio_clkout1_a_mux[] = { + AUDIO_CLKOUT1_A_MARK, +}; +static const unsigned int audio_clkout1_b_pins[] = { + /* CLKOUT1 */ + RCAR_GP_PIN(6, 29), +}; +static const unsigned int audio_clkout1_b_mux[] = { + AUDIO_CLKOUT1_B_MARK, +}; +static const unsigned int audio_clkout2_a_pins[] = { + /* CLKOUT2 */ + RCAR_GP_PIN(5, 16), +}; +static const unsigned int audio_clkout2_a_mux[] = { + AUDIO_CLKOUT2_A_MARK, +}; +static const unsigned int audio_clkout2_b_pins[] = { + /* CLKOUT2 */ + RCAR_GP_PIN(6, 30), +}; +static const unsigned int audio_clkout2_b_mux[] = { + AUDIO_CLKOUT2_B_MARK, +}; + +static const unsigned int audio_clkout3_a_pins[] = { + /* CLKOUT3 */ + RCAR_GP_PIN(5, 19), +}; +static const unsigned int audio_clkout3_a_mux[] = { + AUDIO_CLKOUT3_A_MARK, +}; +static const unsigned int audio_clkout3_b_pins[] = { + /* CLKOUT3 */ + RCAR_GP_PIN(6, 31), +}; +static const unsigned int audio_clkout3_b_mux[] = { + AUDIO_CLKOUT3_B_MARK, +}; + /* - I2C -------------------------------------------------------------------- */ static const unsigned int i2c1_a_pins[] = { /* SDA, SCL */ @@ -1661,6 +1776,22 @@ static const unsigned int scif5_clk_mux[] = { }; static const struct sh_pfc_pin_group pinmux_groups[] = { + SH_PFC_PIN_GROUP(audio_clk_a_a), + SH_PFC_PIN_GROUP(audio_clk_a_b), + SH_PFC_PIN_GROUP(audio_clk_a_c), + SH_PFC_PIN_GROUP(audio_clk_b_a), + SH_PFC_PIN_GROUP(audio_clk_b_b), + SH_PFC_PIN_GROUP(audio_clk_c_a), + SH_PFC_PIN_GROUP(audio_clk_c_b), + SH_PFC_PIN_GROUP(audio_clkout_a), + SH_PFC_PIN_GROUP(audio_clkout_b), + SH_PFC_PIN_GROUP(audio_clkout_c), + SH_PFC_PIN_GROUP(audio_clkout1_a), + SH_PFC_PIN_GROUP(audio_clkout1_b), + SH_PFC_PIN_GROUP(audio_clkout2_a), + SH_PFC_PIN_GROUP(audio_clkout2_b), + SH_PFC_PIN_GROUP(audio_clkout3_a), + SH_PFC_PIN_GROUP(audio_clkout3_b), SH_PFC_PIN_GROUP(i2c1_a), SH_PFC_PIN_GROUP(i2c1_b), SH_PFC_PIN_GROUP(i2c2_a), @@ -1695,6 +1826,25 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(scif5_clk), }; +static const char * const audio_clk_groups[] = { + "audio_clk_a_a", + "audio_clk_a_b", + "audio_clk_a_c", + "audio_clk_b_a", + "audio_clk_b_b", + "audio_clk_c_a", + "audio_clk_c_b", + "audio_clkout_a", + "audio_clkout_b", + "audio_clkout_c", + "audio_clkout1_a", + "audio_clkout1_b", + "audio_clkout2_a", + "audio_clkout2_b", + "audio_clkout3_a", + "audio_clkout3_b", +}; + static const char * const i2c1_groups[] = { "i2c1_a", "i2c1_b", @@ -1755,6 +1905,7 @@ static const char * const scif5_groups[] = { }; static const struct sh_pfc_function pinmux_functions[] = { + SH_PFC_FUNCTION(audio_clk), SH_PFC_FUNCTION(i2c1), SH_PFC_FUNCTION(i2c2), SH_PFC_FUNCTION(i2c6),