All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: [PATCH] pinctrl: sh-pfc: r8a77970: add QSPI pins, groups, and functions
Date: Tue, 6 Nov 2018 21:52:55 +0300	[thread overview]
Message-ID: <38b17a18-59d6-3fbf-8413-915005b274f6@cogentembedded.com> (raw)
In-Reply-To: <21306a59-8f20-ad08-fdc1-bcc6333c01d4@cogentembedded.com>

From: Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>

Add the QSPI{0|1} pins/groups/functions to the R8A77970 PFC driver.

[Sergei: ported to the upstream driver, fixed up the swapped QSPI0 SPCLK/
SSL pins, fixed up the comments, moved the QSPI pins/groups/functions to
be in the alphanumeric order, removed unneeded empty lines, renamed the
patch.]

Signed-off-by: Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the 'sh-pfc' branch of Geert's 'renesas-drivers.git' repo.

 drivers/pinctrl/sh-pfc/pfc-r8a77970.c |   70 ++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

Index: renesas-drivers/drivers/pinctrl/sh-pfc/pfc-r8a77970.c
===================================================================
--- renesas-drivers.orig/drivers/pinctrl/sh-pfc/pfc-r8a77970.c
+++ renesas-drivers/drivers/pinctrl/sh-pfc/pfc-r8a77970.c
@@ -1382,6 +1382,56 @@ static const unsigned int pwm4_b_mux[] =
 	PWM4_B_MARK,
 };
 
+/* - QSPI0 ------------------------------------------------------------------ */
+static const unsigned int qspi0_ctrl_pins[] = {
+	/* SPCLK, SSL */
+	RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 5),
+};
+static const unsigned int qspi0_ctrl_mux[] = {
+	QSPI0_SPCLK_MARK, QSPI0_SSL_MARK,
+};
+static const unsigned int qspi0_data2_pins[] = {
+	/* MOSI_IO0, MISO_IO1 */
+	RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2),
+};
+static const unsigned int qspi0_data2_mux[] = {
+	QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
+};
+static const unsigned int qspi0_data4_pins[] = {
+	/* MOSI_IO0, MISO_IO1, IO2, IO3 */
+	RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2),
+	RCAR_GP_PIN(5, 3), RCAR_GP_PIN(5, 4),
+};
+static const unsigned int qspi0_data4_mux[] = {
+	QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
+	QSPI0_IO2_MARK, QSPI0_IO3_MARK
+};
+
+/* - QSPI1 ------------------------------------------------------------------ */
+static const unsigned int qspi1_ctrl_pins[] = {
+	/* SPCLK, SSL */
+	RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 11),
+};
+static const unsigned int qspi1_ctrl_mux[] = {
+	QSPI1_SPCLK_MARK, QSPI1_SSL_MARK,
+};
+static const unsigned int qspi1_data2_pins[] = {
+	/* MOSI_IO0, MISO_IO1 */
+	RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 8),
+};
+static const unsigned int qspi1_data2_mux[] = {
+	QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
+};
+static const unsigned int qspi1_data4_pins[] = {
+	/* MOSI_IO0, MISO_IO1, IO2, IO3 */
+	RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 8),
+	RCAR_GP_PIN(5, 9), RCAR_GP_PIN(5, 10),
+};
+static const unsigned int qspi1_data4_mux[] = {
+	QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
+	QSPI1_IO2_MARK, QSPI1_IO3_MARK
+};
+
 /* - SCIF Clock ------------------------------------------------------------- */
 static const unsigned int scif_clk_a_pins[] = {
 	/* SCIF_CLK */
@@ -1756,6 +1806,12 @@ static const struct sh_pfc_pin_group pin
 	SH_PFC_PIN_GROUP(pwm3_b),
 	SH_PFC_PIN_GROUP(pwm4_a),
 	SH_PFC_PIN_GROUP(pwm4_b),
+	SH_PFC_PIN_GROUP(qspi0_ctrl),
+	SH_PFC_PIN_GROUP(qspi0_data2),
+	SH_PFC_PIN_GROUP(qspi0_data4),
+	SH_PFC_PIN_GROUP(qspi1_ctrl),
+	SH_PFC_PIN_GROUP(qspi1_data2),
+	SH_PFC_PIN_GROUP(qspi1_data4),
 	SH_PFC_PIN_GROUP(scif_clk_a),
 	SH_PFC_PIN_GROUP(scif_clk_b),
 	SH_PFC_PIN_GROUP(scif0_data),
@@ -1950,6 +2006,18 @@ static const char * const pwm4_groups[]
 	"pwm4_b",
 };
 
+static const char * const qspi0_groups[] = {
+	"qspi0_ctrl",
+	"qspi0_data2",
+	"qspi0_data4",
+};
+
+static const char * const qspi1_groups[] = {
+	"qspi1_ctrl",
+	"qspi1_data2",
+	"qspi1_data4",
+};
+
 static const char * const scif_clk_groups[] = {
 	"scif_clk_a",
 	"scif_clk_b",
@@ -2033,6 +2101,8 @@ static const struct sh_pfc_function pinm
 	SH_PFC_FUNCTION(pwm2),
 	SH_PFC_FUNCTION(pwm3),
 	SH_PFC_FUNCTION(pwm4),
+	SH_PFC_FUNCTION(qspi0),
+	SH_PFC_FUNCTION(qspi1),
 	SH_PFC_FUNCTION(scif_clk),
 	SH_PFC_FUNCTION(scif0),
 	SH_PFC_FUNCTION(scif1),

  parent reply	other threads:[~2018-11-07  4:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 19:10 [PATCH v2 0/2] Add Renesas R8A77980 PFC driver Sergei Shtylyov
2018-03-08 19:12 ` [PATCH v2 1/2] pinctrl: sh-pfc: add PORT_GP_CFG_25() helper macro Sergei Shtylyov
2018-03-08 19:14 ` [PATCH v2 2/2] pinctrl: sh-pfc: add R8A77980 PFC support Sergei Shtylyov
2018-03-09 12:14   ` Geert Uytterhoeven
2018-03-13 19:54 ` [PATCH] pinctrl: sh-pfc: r8a77970: add EtherAVB pin groups Sergei Shtylyov
2018-03-14 13:41   ` Geert Uytterhoeven
2018-04-13 18:29 ` [PATCH] pinctrl: sh-pfc: r8a77970: add pin I/O voltage control Sergei Shtylyov
2018-04-13 18:31   ` Sergei Shtylyov
2018-04-13 18:33     ` Sergei Shtylyov
2018-04-16 13:02   ` Geert Uytterhoeven
2018-04-16 15:06     ` Sergei Shtylyov
2018-04-17  7:42       ` Geert Uytterhoeven
2018-04-19 12:54   ` Geert Uytterhoeven
2018-04-18 20:06 ` [PATCH] pinctrl: sh-pfc: r8a77970: fix pin I/O voltage control support Sergei Shtylyov
2018-04-18 20:20   ` Sergei Shtylyov
2018-04-18 20:26 ` [PATCH v2] " Sergei Shtylyov
2018-04-19 13:06   ` Geert Uytterhoeven
2018-04-19 16:03     ` Sergei Shtylyov
2018-04-19 16:03     ` Sergei Shtylyov
2018-04-19 18:27 ` [PATCH v2] pinctrl: sh-pfc: r8a77980: add " Sergei Shtylyov
2018-04-24 10:22   ` Geert Uytterhoeven
2018-04-19 18:52 ` [PATCH v3] pinctrl: sh-pfc: r8a77970: fix " Sergei Shtylyov
2018-04-24 10:22   ` Geert Uytterhoeven
2018-11-06 18:52 ` Sergei Shtylyov [this message]
2018-11-07 11:12   ` [PATCH] pinctrl: sh-pfc: r8a77970: add QSPI pins, groups, and functions Simon Horman
2018-11-08 13:11   ` Geert Uytterhoeven
2018-11-19 17:30 ` [PATCH] pinctrl: sh-pfc: r8a77980: " Sergei Shtylyov
2018-11-20  8:27   ` Geert Uytterhoeven
2020-06-05 20:23 ` [PATCH] pinctrl: sh-pfc: r8a77980: add RPC " Sergei Shtylyov
2020-06-08 12:58   ` Geert Uytterhoeven
2020-06-18 19:46 ` [PATCH] pinctrl: sh-pfc: r8a77970: " Sergei Shtylyov
2020-06-19 12:58   ` Geert Uytterhoeven
2020-06-19 15:23     ` Sergei Shtylyov
2020-06-19 17:54 ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38b17a18-59d6-3fbf-8413-915005b274f6@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=geert+renesas@glider.be \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.