From patchwork Fri Sep 18 01:53:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7212341 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E769FBEEC1 for ; Fri, 18 Sep 2015 01:53:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC63A207A0 for ; Fri, 18 Sep 2015 01:53:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 983842079C for ; Fri, 18 Sep 2015 01:53:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752538AbbIRBxk (ORCPT ); Thu, 17 Sep 2015 21:53:40 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:16802 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752415AbbIRBxi (ORCPT ); Thu, 17 Sep 2015 21:53:38 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 18 Sep 2015 10:53:37 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id B44DF40E90; Fri, 18 Sep 2015 10:53:37 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 83C8B480A3; Fri, 18 Sep 2015 10:53:37 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 7B77548014; Fri, 18 Sep 2015 10:53:37 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id LAG27197; Fri, 18 Sep 2015 10:53:37 +0900 X-IronPort-AV: E=Sophos;i="5.17,550,1437404400"; d="scan'";a="194699832" 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 10:53:36 +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.268.17; Fri, 18 Sep 2015 01:53:33 +0000 Message-ID: <87r3lw1opu.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/3 v2] pinctrl: sh-pfc: r8a7795: add I2C 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:53:33 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0011.jpnprd01.prod.outlook.com (25.161.24.21) To HK2PR06MB0595.apcprd06.prod.outlook.com (25.161.187.146) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0595; 2:AdrVdAd5uWpm6754brj1Qpx3IDDzXtds78uD5NnLYERscHVq6vfoS1io5FxxWdF54G89Rv9RNmF4E5gh1M2V8soJgzisPUWkNkm+15xSDPq4z1s+O2QUGZoZ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ykPu6vkxb4AW+QBFhzMqY1xhXX209t+bk8Uo9E3WCLwM08629e/pn7Vd7JzcE/CLDJ/7rtxEU+25pjXNw7wvPpBuBqnqOmz5uND0XkrNYvSQqo994fOJsu6kcjsFIcJ2HRr0QGgJhsy+3VJI2loDwFAPmkLj+1+kpn/8jMc7g+nw8Bt4/Fj6YtkaoVDkeg1D2Ma4yWnb2RGIKcs/6yOvA2war09tI5Lu/HlfGteNxWC5sPM1pcdSLqA+BSxa1QKuAk/RqakOQGo9ZcuF6YLinbwryvtfFvJK0EbWz7YqeXWoDjsPK6ITg0vXTBTBSkm3KzxVHBb7UzkxA== 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:HK2PR06MB0595; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB0595; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(77156002)(5001860100001)(4001350100001)(5004730100002)(77096005)(5001830100001)(46102003)(53416004)(5001960100002)(229853001)(36756003)(62966003)(68736005)(189998001)(23726002)(106356001)(105586002)(2950100001)(5001770100001)(50986999)(5007970100001)(97736004)(81156007)(19580395003)(50466002)(92566002)(46406003)(76176999)(66066001)(83506001)(33646002)(4001540100001)(42186005)(69596002)(122386002)(40100003)(19580405001)(64706001)(86362001)(87976001)(47776003)(54356999)(101416001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0595; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0595; 23:noKlXed1mw5eq8EEL5R13aHazmF50ugEBgQKC3Lk9?= =?us-ascii?Q?lNW4egW0QfxLkmqSlPjUgu4H6IZXbgYaczJ14PGyDrvFbeM/vLfL6clF1eA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b0YLBC10m8oDC+Unx8xodO?= =?us-ascii?Q?XLdciJR5pqCcUxYgHMRay9ofkKNrE+GHv+vgMzpbWpiv6LNr27JoQhwiUz+/?= =?us-ascii?Q?lWo27vWYEZuJT7Byq3W3tDJsZ4lqZ+XMCItiEiJA82bl0W9oSZ92CDt4k6KN?= =?us-ascii?Q?ICIicbkHK6WJlEN15hVfS08Tb9JMR7L9jnYQ4a90NsWz1c2dn4zD1Pue/ij6?= =?us-ascii?Q?hWfEKCJirFgJ4uLjzmppzmuE+QAgVJ/MTNKpzwaT44m6iaiO0z+NStOniXYr?= =?us-ascii?Q?3r5KrsHcCetUAr3uhs=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0595; 5:ZueLwmxNBVvIlgNiTZRAjOasbqqguQIgYTQualqz4bQ9cXV8xNwm5w3IVx4niHz2WKKxbqBBp5FEHjjNxSwLKpi0k2wwm+kKmc/y0fkOEetjiPk1//m/w4sTgJURyJJiVvIxGoYTQ6egNCxkCNcwOg==; 24:s1flqIJyib4vsDdyzJaKJMwgrDF0kbDXlU7pTSmBoSGiKlgHzymtLNtsBQN4obdfZfMp+NK47dxqK1adguOET7Iuy6AzIN5htDhxrPvNs4M=; 20:HjHVPyWVzirge4ZM3Ui3OZeDpUqzygb8z/ILXXLGgKDeQLsOm9XZz1JO1VXYmuQnG+d8xQIfym1c55efs2/1+UKj5UluUcK1wffr9Q7U3vsWjiwDZblkRHgA4+32o/dS0S8DHSCkgxzYxAtA1IGcPCmpaInxuNr7KBFRi9QRLAg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2015 01:53:33.6662 (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 Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven --- v2 -> v3 - add Geert's Reviewed-by 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),