From patchwork Fri Sep 2 21:49:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9311715 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 90CC2607D2 for ; Fri, 2 Sep 2016 21:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84105290C5 for ; Fri, 2 Sep 2016 21:49:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 771D42985F; Fri, 2 Sep 2016 21:49:27 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 0CEB7290C5 for ; Fri, 2 Sep 2016 21:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751691AbcIBVtZ (ORCPT ); Fri, 2 Sep 2016 17:49:25 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:36845 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752669AbcIBVtY (ORCPT ); Fri, 2 Sep 2016 17:49:24 -0400 Received: by mail-lf0-f54.google.com with SMTP id g62so92359071lfe.3 for ; Fri, 02 Sep 2016 14:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:organization:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=FLPu1hcgDeyEP3PBRudZsNaJLCssppwzgU56HZQZaIE=; b=1kzsLRGylEB8kBpDCSHOd4JMcb1wnDazvLw9e6RRuKvTTCUcMnrJQu+JUbfQndISgF fQmCYyY52YLrH3mpywR/LRP9H2PdLMdPmHvl83fJScnwQoyKafPsLay1scPpkE7d/oCI 6ASKOPQRgjNy4lvGUwC8L9xmLx4HT1wqIpbr7RSoZkxo2nhIrVjJCEAJvGO6ckmay86H W0oZvglx17vw4H9Yq2lB3uWQdu113f4oWmDzmZ8SapzRvr5JyxMqBOX9A9JtcGhM6jEI QzlDKlqVUqiMjerRXtT7FMx9sUn9k4jqZtsRtYhaqZ9SH0/x/+VwMUH6ilgw5MyYQK+7 v2NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=FLPu1hcgDeyEP3PBRudZsNaJLCssppwzgU56HZQZaIE=; b=VuXUACov0nbVlWyg5vX3ZlO/3WKZEv7tSfMBn0tixxfNsIhLli0hztwlz9rdVSctR/ qYJo+jEA7rzOZcDqNJzhEX23trrrk8pshkBP7gIXTcGpFf9qMlAW8Ad7O5njXugtrVYb 5BfJOrZl54EG6MaLoIKwHZbeMqPRzRJsvt7idSsHJPO73oophIYjAu0hFclyWR+pnzhP hLhDtDZdK12B32aRxp2NSzo0U2dkZQRuSAThGeddKFPNyjH3csScp/fAOEpBdoJerxDm eGgbrUi84dJMrTYSqSE2XvY/HRzR5UG37eFI3M0BjQlryi+5CYFbpYyj5ibHBs4oZZzh tKXg== X-Gm-Message-State: AE9vXwNBmSms6gC/xmWr0CQhswZe0PZiL7iqUOndSm1/AWVSAXODkKvzbiFiQPheC+5fOw== X-Received: by 10.25.18.204 with SMTP id 73mr2288133lfs.186.1472852962315; Fri, 02 Sep 2016 14:49:22 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.81.121]) by smtp.gmail.com with ESMTPSA id 184sm2611420lfz.22.2016.09.02.14.49.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Sep 2016 14:49:21 -0700 (PDT) From: Sergei Shtylyov To: linus.walleij@linaro.org, linux-renesas-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-gpio@vger.kernel.org, geert+renesas@glider.be Subject: [PATCH] pinctrl: sh-pfc: r8a7792: add DU pin groups Date: Sat, 03 Sep 2016 00:49:14 +0300 Message-ID: <1497777.FvT8ieIrQm@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.6.7-200.fc23.x86_64; KDE/4.14.20; x86_64; ; ) In-Reply-To: <1501145.5ro9yfox2Z@wasted.cogentembedded.com> References: <1501145.5ro9yfox2Z@wasted.cogentembedded.com> MIME-Version: 1.0 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 Add QSPI pin groups to the R8A7792 PFC driver. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Sergei Shtylyov --- The patch is against the 'devel' branch of Linus Walleij's 'linux-pinctrl.git' repo... drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) Index: linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7792.c =================================================================== --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/pfc-r8a7792.c +++ linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7792.c @@ -1034,6 +1034,29 @@ static const unsigned int lbsc_ex_cs5_pi static const unsigned int lbsc_ex_cs5_mux[] = { EX_CS5_N_MARK, }; +/* - QSPI ------------------------------------------------------------------- */ +static const unsigned int qspi_ctrl_pins[] = { + /* SPCLK, SSL */ + RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26), +}; +static const unsigned int qspi_ctrl_mux[] = { + SPCLK_MARK, SSL_MARK, +}; +static const unsigned int qspi_data2_pins[] = { + /* MOSI_IO0, MISO_IO1 */ + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), +}; +static const unsigned int qspi_data2_mux[] = { + MOSI_IO0_MARK, MISO_IO1_MARK, +}; +static const unsigned int qspi_data4_pins[] = { + /* MOSI_IO0, MISO_IO1, IO2, IO3 */ + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 23), + RCAR_GP_PIN(3, 24), +}; +static const unsigned int qspi_data4_mux[] = { + MOSI_IO0_MARK, MISO_IO1_MARK, IO2_MARK, IO3_MARK, +}; /* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = { /* RX, TX */ @@ -1585,6 +1608,9 @@ static const struct sh_pfc_pin_group pin SH_PFC_PIN_GROUP(lbsc_ex_cs3), SH_PFC_PIN_GROUP(lbsc_ex_cs4), SH_PFC_PIN_GROUP(lbsc_ex_cs5), + SH_PFC_PIN_GROUP(qspi_ctrl), + SH_PFC_PIN_GROUP(qspi_data2), + SH_PFC_PIN_GROUP(qspi_data4), SH_PFC_PIN_GROUP(scif0_data), SH_PFC_PIN_GROUP(scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl), @@ -1708,6 +1734,12 @@ static const char * const lbsc_groups[] "lbsc_ex_cs5", }; +static const char * const qspi_groups[] = { + "qspi_ctrl", + "qspi_data2", + "qspi_data4", +}; + static const char * const scif0_groups[] = { "scif0_data", "scif0_clk", @@ -1808,6 +1840,7 @@ static const struct sh_pfc_function pinm SH_PFC_FUNCTION(du1), SH_PFC_FUNCTION(intc), SH_PFC_FUNCTION(lbsc), + SH_PFC_FUNCTION(qspi), SH_PFC_FUNCTION(scif0), SH_PFC_FUNCTION(scif3), SH_PFC_FUNCTION(sdhi0),