From patchwork Wed Oct 26 14:14:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 9397365 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F41B760231 for ; Wed, 26 Oct 2016 14:14:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA77329BDF for ; Wed, 26 Oct 2016 14:14:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEF2929BDE; Wed, 26 Oct 2016 14:14:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 808A529BD8 for ; Wed, 26 Oct 2016 14:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932549AbcJZOOZ (ORCPT ); Wed, 26 Oct 2016 10:14:25 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40549 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932115AbcJZOOY (ORCPT ); Wed, 26 Oct 2016 10:14:24 -0400 Received: by mail-wm0-f68.google.com with SMTP id b80so3675732wme.7 for ; Wed, 26 Oct 2016 07:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=3rjEbKq9yrdSvL2l68tzc/8MuCYK+GbiRNYt9wbfWPI=; b=UanJUoM1pHZQyRdpluE906JUvsrewAhov7zT3SE2ao0YFKaovpgjKuPtnR756w81Vz cKjM/M3oZfLFVUThlehvSurwwEAygDvcOq9u4jdEqvi0Tww4c0oYLALw59Rkx5MrSIPt mbMUFPAAXAnPZr+R3dn7GABBBsAkAufWtv2SbbdSd4/j0ZgwoxNxNRSkghxqA6eEpcGU dYkDXRD9Sjv4VF3Zy28SQAnDuD0yPR6FGDoq/TkE6kW8tMUZshvz3wKVrrYvBTaoDkDy mY1hC15Pj2rSeVaPj2bLGOEia6Rb9pdstjgVrb6h6lk5vs+kCkuxFGAlO7up1Qsy4/wT RmOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=3rjEbKq9yrdSvL2l68tzc/8MuCYK+GbiRNYt9wbfWPI=; b=CyzqBH663lHI6GsrGneZGquMofmE7LOPowyY+59ruCD0nTIZFpkdiniqQlPCG9Me7E kJPHCVD/l6Km1xaYa0tAFzpnfggP4aBugZIQpZQrWB3ZlVo9PnHhvnLwUY8IxeZbxF79 jHNK4nvh7tfLX/KV0ldlO3bYAunBxWfnt+8WVYVIXKyNBqEU9NG1hEkF7LOa+mM47IaO r1NQtxboVda1rBf6OxrGzvjIzir++9xeLlAZ/1LgnEPWAIiSHvOeV0HhtEbX+CRGj8L/ RrqIvU47wZPNwx9swUBCrgBIfbYngAy5nwSAVSTWj089c0W6AVHLzVOinaI3IY/SS8nc clNA== X-Gm-Message-State: ABUngvedhqFoomnn3kyfV7xe5cLbIkTJcBSs09SalmUZx3JyVjcyxu5HVgnfEqqHXuU7tQ== X-Received: by 10.194.119.162 with SMTP id kv2mr2449203wjb.182.1477491262922; Wed, 26 Oct 2016 07:14:22 -0700 (PDT) Received: from groucho.site (ipb21bf290.dynamic.kabel-deutschland.de. [178.27.242.144]) by smtp.gmail.com with ESMTPSA id jx8sm2913248wjc.2.2016.10.26.07.14.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Oct 2016 07:14:22 -0700 (PDT) From: Ulrich Hecht To: linux-renesas-soc@vger.kernel.org, horms@verge.net.au Cc: geert@linux-m68k.org, magnus.damm@gmail.com, wsa@the-dreams.de, Ulrich Hecht Subject: [PATCH v2 2/5] pinctrl: sh-pfc: r8a7796: add I2C pin support Date: Wed, 26 Oct 2016 16:14:06 +0200 Message-Id: <1477491249-2976-3-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477491249-2976-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1477491249-2976-1-git-send-email-ulrich.hecht+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven --- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c index dc9b671..42db745 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c @@ -1490,6 +1490,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 */ @@ -1912,6 +1963,13 @@ static const unsigned int sdhi3_ds_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), @@ -1969,6 +2027,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { SH_PFC_PIN_GROUP(sdhi3_ds), }; +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", @@ -2058,6 +2132,9 @@ static const char * const sdhi3_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),