From patchwork Thu Sep 17 04:10:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7201761 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 424D09F32B for ; Thu, 17 Sep 2015 04:10:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40FAD208F5 for ; Thu, 17 Sep 2015 04:10:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 20257208F4 for ; Thu, 17 Sep 2015 04:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbbIQEKZ (ORCPT ); Thu, 17 Sep 2015 00:10:25 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:11091 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750974AbbIQEKY (ORCPT ); Thu, 17 Sep 2015 00:10:24 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 17 Sep 2015 13:10:22 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 80AE94EA56; Thu, 17 Sep 2015 13:10:22 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 760B08002E; Thu, 17 Sep 2015 13:10:22 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 6D9BD8002D; Thu, 17 Sep 2015 13:10:22 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id PAC28645; Thu, 17 Sep 2015 13:10:22 +0900 X-IronPort-AV: E=Sophos;i="5.17,543,1437404400"; d="scan'";a="194623241" 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; 17 Sep 2015 13:10:21 +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:19 +0000 Message-ID: <87zj0l7kr8.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/3] pinctrl: sh-pfc: r8a7795: add I2C 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:19 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR0201CA0004.apcprd02.prod.outlook.com (25.164.90.142) To HK2PR06MB0594.apcprd06.prod.outlook.com (25.161.187.145) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 2:aWJFX1pw39v5cxwqiRnHL9LlsGNI1fnVG+Ob+Se4qRV2CmPLGviiXA4z60a/yC0VeXa9/j7EZNBxN3g0N7ysHW9FcJnYHJW94EoyUoDZ4ZBh4jDSugLwnHTkA0XS0C/E1MWDOU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Ojg00IM6qpl3/luZXz5LFvRXNI2kZbRdp3A/ngowY8YvDnSAKmxoQ8UEJCZ4rCtIYd5amNjN4xjeIbRwMeTjpZr8KIexN5yBcHOWCXQdvrPcj8DsJWMaj5heOlF2RqL0/Sa6F8iEQzJkcisavXQK1uPwKJ35a0aRhwXlVG+U1bqT1Ozen+AA3FzN/ICqpTsH01X2gbzNnVsA5tP0ldhCClyEx6FLlgOt+eDBTtWUe00RECchuskiXm3yU6rfV2LvZyhQ94S/vXVKlimjDVahhz+z4MPeXnOQMR9FtfVEhg54hAAmenDtDdtB7h77Cate9eG/ctZBle0IQuGI9NHcWHT92Y= 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:CaFC8pPzvgJdIISNVD0A8bJBvIHCPTIVVUJklSBPC?= =?us-ascii?Q?Aeu0Z0w3KcWL9Dw4B8kl8rYBehc7LOkqHOeWo8Ws9FAS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+2kX7kWe/YzyaqPRBJrH83WsvHJXThduWBGWTYCLcVyMozeErskZqeqY3k?= =?us-ascii?Q?rx2TLcFcmoy3bNog6pZIfwGaVdQlmoXiASpTRPdd9SLR2dwM9I2/hlo9EdZn?= =?us-ascii?Q?oLrMLsP1ExnWUWEvnem4e+siSPtENtRNQA96Saiy2fPYeWsQj4iBOmZEbJYZ?= =?us-ascii?Q?S5b7ltjnAJakKPFsiggMpyX/RK5tqIsCXrIosDFlXCppnPw50KF2WRw7+Kaz?= =?us-ascii?Q?PqVrwyJwstqseZS++XQot3/3s+GFpq5cEVCYF+USJ8nOhdjiBEXRdHSvj+c7?= =?us-ascii?Q?BPfwYY5R6eAuKY1f2U=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0594; 5:T+GJ7aWVlg74708anGoDRrcZujDsi2PPm4XgltTGYkPLDopNEWCfwgPBh8AnMfwXyqtiUySIFU79KB5mFg+sy0G3mH5GydT4bEQyUB5TZqdALUeUkb2LUnmScAi2ZfMJgAPk1d4JsG1Vx5ZKw/Xlbg==; 24:sZNduz1nNcJR65neIvw/RD7MeVscJ6pfkB+66ENdAQCaHBawqwlFdYPguZqpqDx7g8+ukRO98cHRPJbX1mL6Sbv4TGJZsiBioCjfqvxoXSU=; 20:F6lw/un+O7x/p7x/Gawo/b+kw2ZswbhYHnxz33YeWUjw1kf77rfmWLhWpLb/8YxS2QWeKqCDyhczuPyMaYc8oIq+kszfCVlKn04yy+eCkriaKYUsZb9z2zdGi5gSju7i9hAby35/huj9buUEym9gkLU+pj+KKhAbdB+5Ere+hXY= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2015 04:10:19.0804 (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 Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c index aff3895..f6afe71 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c @@ -1426,6 +1426,57 @@ static const struct sh_pfc_pin pinmux_pins[] = { PINMUX_GPIO_GP_ALL(), }; +/* - I2C -------------------------------------------------------------------- */ +static const unsigned int i2c1_a_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(5, 11), RCAR_GP_PIN(5, 10), +}; +static const unsigned int i2c1_a_mux[] = { + SDA1_A_MARK, SCL1_A_MARK, +}; +static const unsigned int i2c1_b_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 23), +}; +static const unsigned int i2c1_b_mux[] = { + SDA1_B_MARK, SCL1_B_MARK, +}; +static const unsigned int i2c2_a_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 4), +}; +static const unsigned int i2c2_a_mux[] = { + SDA2_A_MARK, SCL2_A_MARK, +}; +static const unsigned int i2c2_b_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12), +}; +static const unsigned int i2c2_b_mux[] = { + SDA2_B_MARK, SCL2_B_MARK, +}; +static const unsigned int i2c6_a_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11), +}; +static const unsigned int i2c6_a_mux[] = { + SDA6_A_MARK, SCL6_A_MARK, +}; +static const unsigned int i2c6_b_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25), +}; +static const unsigned int i2c6_b_mux[] = { + SDA6_B_MARK, SCL6_B_MARK, +}; +static const unsigned int i2c6_c_pins[] = { + /* SDA, SCL */ + RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14), +}; +static const unsigned int i2c6_c_mux[] = { + SDA6_C_MARK, SCL6_C_MARK, +}; + /* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = { /* RX, TX */ @@ -1610,6 +1661,13 @@ static const unsigned int scif5_clk_mux[] = { }; static const struct sh_pfc_pin_group pinmux_groups[] = { + SH_PFC_PIN_GROUP(i2c1_a), + SH_PFC_PIN_GROUP(i2c1_b), + SH_PFC_PIN_GROUP(i2c2_a), + SH_PFC_PIN_GROUP(i2c2_b), + SH_PFC_PIN_GROUP(i2c6_a), + SH_PFC_PIN_GROUP(i2c6_b), + SH_PFC_PIN_GROUP(i2c6_c), SH_PFC_PIN_GROUP(scif0_data), SH_PFC_PIN_GROUP(scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl), @@ -1637,6 +1695,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(scif5_clk), }; +static const char * const i2c1_groups[] = { + "i2c1_a", + "i2c1_b", +}; + +static const char * const i2c2_groups[] = { + "i2c2_a", + "i2c2_b", +}; + +static const char * const i2c6_groups[] = { + "i2c6_a", + "i2c6_b", + "i2c6_c", +}; + static const char * const scif0_groups[] = { "scif0_data", "scif0_clk", @@ -1681,6 +1755,9 @@ static const char * const scif5_groups[] = { }; static const struct sh_pfc_function pinmux_functions[] = { + SH_PFC_FUNCTION(i2c1), + SH_PFC_FUNCTION(i2c2), + SH_PFC_FUNCTION(i2c6), SH_PFC_FUNCTION(scif0), SH_PFC_FUNCTION(scif1), SH_PFC_FUNCTION(scif2),