From patchwork Fri Sep 18 01:54:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7212351 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 3AB629F336 for ; Fri, 18 Sep 2015 01:54:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 305E8207A0 for ; Fri, 18 Sep 2015 01:54:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FB1C2079C for ; Fri, 18 Sep 2015 01:54:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbbIRByJ (ORCPT ); Thu, 17 Sep 2015 21:54:09 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:36659 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752043AbbIRByI (ORCPT ); Thu, 17 Sep 2015 21:54:08 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 18 Sep 2015 10:54:06 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 2439F43A75; Fri, 18 Sep 2015 10:54:06 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 0842F8002E; Fri, 18 Sep 2015 10:54:06 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 0118D8002D; Fri, 18 Sep 2015 10:54:06 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id LAN03822; Fri, 18 Sep 2015 10:54:05 +0900 X-IronPort-AV: E=Sophos;i="5.17,550,1437404400"; d="scan'";a="194699861" Received: from mail-pu1apc01lp0024.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.24]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Sep 2015 10:54:04 +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 SIXPR06MB0605.apcprd06.prod.outlook.com (10.160.237.147) with Microsoft SMTP Server (TLS) id 15.1.274.16; Fri, 18 Sep 2015 01:54:02 +0000 Message-ID: <87pp1g1op7.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/3 v2] pinctrl: sh-pfc: r8a7795: add Audio clock pin 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 , Linus Walleij , Laurent CC: "linux-gpio@vger.kernel.org" , Wolfram Sang , Magnus , Linux-SH , Geert Uytterhoeven In-Reply-To: <87si6c1org.wl%kuninori.morimoto.gx@renesas.com> References: <87twqs1osz.wl%kuninori.morimoto.gx@renesas.com> <87si6c1org.wl%kuninori.morimoto.gx@renesas.com> Date: Fri, 18 Sep 2015 01:54:02 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR0201CA0025.apcprd02.prod.outlook.com (25.164.90.163) To SIXPR06MB0605.apcprd06.prod.outlook.com (25.160.237.147) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0605; 2:eGr8Z6nd8Tp/LmhtnK7slKsJsWCr+LwnWu8DidhlbmBHoMzmhx0DccN4DfyXIngdf5ndvo/0CfJjUtqbFiS9ukfDuWXJ7jNdKSlGogAfy1/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E/jSLQYvrpTIAFRiil0fQHRe; 4:vkSCqVysX5eFboNLur5M4CibBlxtVMV0oUZnSQ7E5/v/cALd+IkmnE5kfdr1H4SzJ/CaS+LnTqOzS1u4nUnb+UOIPqvcBDwL+4gUYbrRLbmLY5cFzOosO1dTkFCf55bzw6suW1ZeP/AakdxszMMZdDp1qrVU0BSz4lrHTPSIDZzuco8spOcKRDWNddlq3mhotuuw/yzf8eCN6NhKqhlz1KZYYe3Tqb5dB3DJKWHWVcae4zC+l5SzYS1MjET/8jk2SpR+hpDKx0NlCHiduW1T8hcqt93oQxmZP5fcLv/AZI6AbsszUEqiectIcHULe3dBb1bx7w1LY20fNgYS6Pg9wQ== 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:SIXPR06MB0605; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB0605; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(105586002)(87976001)(5001960100002)(64706001)(66066001)(4001540100001)(42186005)(81156007)(47776003)(5001860100001)(53416004)(4001350100001)(122386002)(36756003)(46102003)(46406003)(54356999)(33646002)(101416001)(76176999)(50986999)(40100003)(5001830100001)(5004730100002)(19580405001)(19580395003)(69596002)(86362001)(106356001)(83506001)(50466002)(77096005)(2950100001)(189998001)(229853001)(5001770100001)(97736004)(23726002)(5007970100001)(92566002)(62966003)(77156002)(68736005); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB0605; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB0605; 23:z2vJURtvtmmkeeytxPZ1Erc7EkxobN8z63ZYtSfNC?= =?us-ascii?Q?oJgyuJ+Bph5kpIuHZqIC5LNa9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a+1+u0BfP0dt0XzFnYNfOmW5aX3pMDAY/CeGZVN+yCb7ldScdNEjrs6lFQ?= =?us-ascii?Q?DjJoGAMnz+tdQSy4QnKIWb721gqUg6wJkGI3JQkGkQGoVN94+U6HKdITYMp1?= =?us-ascii?Q?Ngg13NehG2edpVlzS4CWdOX2GHM3tDH3tf4b2zgFgwK7uqX1uMHdjkD2j6tS?= =?us-ascii?Q?1hChBDUxMdLAzYV8tgZz02lfmJZZBe+PE8xD21h/cViCDgPsrYEE7D63qudj?= =?us-ascii?Q?DbAp+3P3kwXiedPlTXNvGAxr5j02D46QKF6U5L8IO3zpWFQM+D7JmTTPTGm+?= =?us-ascii?Q?3u8YyWIH3XKwgHy9nA=3D?= X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0605; 5:lHErEwWxCm/xaEdyDkDlqfsuVSyY0ZjzSqrz/AQOOWkdkzMvm0DAUURKcYGiDqB3nSNQo1oQBspyC0hSSkknvUWWGxHawz7xojL/qGdOJCVQ0cVwMTlkX4SiJc7Md9M/rdrBzrzAjUxyUaQLcuE6Ug==; 24:WHYytfM1r9K6dJV6XbhD8QBH+lcCawHWcbs5jNNOruHc9QUbe+Vj9p/ukE6cB5OxYZ+XhxtvcPh7jDp6FvvrseHMj3Tqf7niQpoUgz3nO+I=; 20:k9jzYGaXVcqDiy6AXisaVWGlgpqM0A1nc/cy0p5rJ8/wMMotsDnf37tG8miQVf+V4ScnO81H8TkK+Rmj3YaQ6Hy64B0HkBsHhy5biy8t0V4NyD1xL0ViK6DC7yloo/2bwf8gOzslFcLH4Lu4z4euAamBV5Oe5eBzxu+9PQVMxU4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2015 01:54:02.1382 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0605 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 Reviewed-by: Geert Uytterhoeven Acked-by: Linus Walleij --- v1 -> v2 - add missing audio_clkout_d drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 160 +++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c index f6afe71..7ef2f71 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c @@ -1426,6 +1426,128 @@ 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_clkout_d_pins[] = { + /* CLKOUT */ + RCAR_GP_PIN(5, 21), +}; +static const unsigned int audio_clkout_d_mux[] = { + AUDIO_CLKOUT_D_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 +1783,23 @@ 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_clkout_d), + 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 +1834,26 @@ 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_clkout_d", + "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 +1914,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),