From patchwork Fri Aug 30 12:37:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 2851972 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A7C6A9F313 for ; Fri, 30 Aug 2013 12:40:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F292203AD for ; Fri, 30 Aug 2013 12:40:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 258ED203E6 for ; Fri, 30 Aug 2013 12:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756225Ab3H3MkH (ORCPT ); Fri, 30 Aug 2013 08:40:07 -0400 Received: from mail-ea0-f169.google.com ([209.85.215.169]:34323 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756066Ab3H3MjP (ORCPT ); Fri, 30 Aug 2013 08:39:15 -0400 Received: by mail-ea0-f169.google.com with SMTP id k11so894313eaj.0 for ; Fri, 30 Aug 2013 05:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XWyg65P9O3Wu3iuouIfjMVAIpNB82cZxYtD49iHdhY8=; b=OL+apOjLUljGzDXOXRiD6VAipROlKJsUvwDZfiJkbb3raaSnRxWDbe7Gt4FnPOKaRJ 1NrXFaFHnrYIxaE79VaPNv7lmntSEReHJPxkPJfYEmh18lqGvqKQUDfOgH3vw7V+IXlD 5xzXdJbXcgBe/QwOavrM6UTdfhWwyJ7s+5FMplx6WD/SwO/8zB3iFG7CveOsI1c6HuJC EgPPjlDH7n3/vHy09cB15dLnFpfhEqsHvOieYDC5PHKUg3yBw4vHc/V3qr8wrwFm0efx TJcKmdxx9YC96BMsldkVAp7RnT2/Lc/s/XRryo1NOP9xCMKslqTqBeHn72EZ18At9OGu P9Zg== X-Received: by 10.15.83.2 with SMTP id b2mr12531620eez.28.1377866353684; Fri, 30 Aug 2013 05:39:13 -0700 (PDT) Received: from groucho.site ([109.201.152.242]) by mx.google.com with ESMTPSA id j7sm54444384eeo.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Aug 2013 05:39:13 -0700 (PDT) From: Ulrich Hecht To: linux-sh@vger.kernel.org Cc: magnus.damm@gmail.com, Ulrich Hecht Subject: [RFC 07/10] ARM: shmobile: r8a7790: i2c pinmux Date: Fri, 30 Aug 2013 14:37:41 +0200 Message-Id: <1377866264-21110-8-git-send-email-ulrich.hecht@gmail.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1377866264-21110-1-git-send-email-ulrich.hecht@gmail.com> References: <1377866264-21110-1-git-send-email-ulrich.hecht@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Adds pinmux for i2c bus 1 and 2. (Pins for 0 and 3 are not multiplexed.) Signed-off-by: Ulrich Hecht Acked-by: Laurent Pinchart --- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 90 ++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c index 95b38fa..aebbbd7 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c @@ -1800,6 +1800,72 @@ static const unsigned int eth_rmii_mux[] = { ETH_RXD0_MARK, ETH_RXD1_MARK, ETH_RX_ER_MARK, ETH_CRS_DV_MARK, ETH_TXD0_MARK, ETH_TXD1_MARK, ETH_TX_EN_MARK, ETH_REF_CLK_MARK, }; + +/* - I2C -------------------------------------------------------------------- */ +static const unsigned int i2c1_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17), +}; +static const unsigned int i2c1_mux[] = { + SCL1_CIS_MARK, SDA1_CIS_MARK, +}; + +static const unsigned int i2c1_b_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), +}; +static const unsigned int i2c1_b_mux[] = { + SCL1_CIS_B_MARK, SDA1_CIS_B_MARK, +}; + +static const unsigned int i2c1_c_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 27), +}; +static const unsigned int i2c1_c_mux[] = { + SCL1_CIS_C_MARK, SDA1_CIS_C_MARK, +}; + +static const unsigned int i2c2_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6), +}; +static const unsigned int i2c2_mux[] = { + SCL2_CIS_MARK, SDA2_CIS_MARK, +}; + +static const unsigned int i2c2_b_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), +}; +static const unsigned int i2c2_b_mux[] = { + SCL2_CIS_B_MARK, SDA2_CIS_B_MARK, +}; + +static const unsigned int i2c2_c_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), +}; +static const unsigned int i2c2_c_mux[] = { + SCL2_CIS_C_MARK, SDA2_CIS_C_MARK, +}; + +static const unsigned int i2c2_d_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15), +}; +static const unsigned int i2c2_d_mux[] = { + SCL2_CIS_D_MARK, SDA2_CIS_D_MARK, +}; + +static const unsigned int i2c2_e_pins[] = { + /* SCL, SDA */ + RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19), +}; +static const unsigned int i2c2_e_mux[] = { + SCL2_CIS_E_MARK, SDA2_CIS_E_MARK, +}; + /* - INTC ------------------------------------------------------------------- */ static const unsigned int intc_irq0_pins[] = { /* IRQ */ @@ -2686,6 +2752,14 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(hscif1_data_b), SH_PFC_PIN_GROUP(hscif1_clk_b), SH_PFC_PIN_GROUP(hscif1_ctrl_b), + SH_PFC_PIN_GROUP(i2c1), + SH_PFC_PIN_GROUP(i2c1_b), + SH_PFC_PIN_GROUP(i2c1_c), + SH_PFC_PIN_GROUP(i2c2), + SH_PFC_PIN_GROUP(i2c2_b), + SH_PFC_PIN_GROUP(i2c2_c), + SH_PFC_PIN_GROUP(i2c2_d), + SH_PFC_PIN_GROUP(i2c2_e), SH_PFC_PIN_GROUP(intc_irq0), SH_PFC_PIN_GROUP(intc_irq1), SH_PFC_PIN_GROUP(intc_irq2), @@ -2795,6 +2869,20 @@ static const char * const eth_groups[] = { "eth_rmii", }; +static const char * const i2c1_groups[] = { + "i2c1", + "i2c1_b", + "i2c1_c", +}; + +static const char * const i2c2_groups[] = { + "i2c2", + "i2c2_b", + "i2c2_c", + "i2c2_d", + "i2c2_e", +}; + static const char * const intc_groups[] = { "intc_irq0", "intc_irq1", @@ -2972,6 +3060,8 @@ static const struct sh_pfc_function pinmux_functions[] = { SH_PFC_FUNCTION(eth), SH_PFC_FUNCTION(hscif0), SH_PFC_FUNCTION(hscif1), + SH_PFC_FUNCTION(i2c1), + SH_PFC_FUNCTION(i2c2), SH_PFC_FUNCTION(intc), SH_PFC_FUNCTION(mmc0), SH_PFC_FUNCTION(mmc1),