linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add CAN & CAN FD pinctrl support for r8a7795 SoC
@ 2016-02-26 11:10 Ramesh Shanmugasundaram
  2016-02-26 11:10 ` [PATCH v2 1/2] pinctrl: sh-pfc: r8a7795: Add CAN support Ramesh Shanmugasundaram
  2016-02-26 11:10 ` [PATCH v2 2/2] pinctrl: sh-pfc: r8a7795: Add CAN FD support Ramesh Shanmugasundaram
  0 siblings, 2 replies; 4+ messages in thread
From: Ramesh Shanmugasundaram @ 2016-02-26 11:10 UTC (permalink / raw)
  To: laurent.pinchart, geert+renesas, linus.walleij
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, chris.paterson2,
	Ramesh Shanmugasundaram

Hi Geert,

   Thanks for the comments (https://lkml.org/lkml/2016/2/25/531).
   I have incorporated those and created this v2 patch set.

   Changes since v1:
   * Inserted pin block in alphabetical order
   * Corrected controller name in comment

Ramesh Shanmugasundaram (2):
  pinctrl: sh-pfc: r8a7795: Add CAN support
  pinctrl: sh-pfc: r8a7795: Add CAN FD support

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

-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] pinctrl: sh-pfc: r8a7795: Add CAN support
  2016-02-26 11:10 [PATCH v2 0/2] Add CAN & CAN FD pinctrl support for r8a7795 SoC Ramesh Shanmugasundaram
@ 2016-02-26 11:10 ` Ramesh Shanmugasundaram
  2016-02-26 12:13   ` Geert Uytterhoeven
  2016-02-26 11:10 ` [PATCH v2 2/2] pinctrl: sh-pfc: r8a7795: Add CAN FD support Ramesh Shanmugasundaram
  1 sibling, 1 reply; 4+ messages in thread
From: Ramesh Shanmugasundaram @ 2016-02-26 11:10 UTC (permalink / raw)
  To: laurent.pinchart, geert+renesas, linus.walleij
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, chris.paterson2,
	Ramesh Shanmugasundaram

This patch adds CAN[0-1] pinmux support to r8a7795 SoC.

Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 52 ++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index ce4f5cd..847fecb 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -1535,6 +1535,38 @@ static const unsigned int audio_clkout3_b_mux[] = {
 	AUDIO_CLKOUT3_B_MARK,
 };
 
+/* - CAN ------------------------------------------------------------------ */
+static const unsigned int can0_data_a_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(1, 23),	RCAR_GP_PIN(1, 24),
+};
+static const unsigned int can0_data_a_mux[] = {
+	CAN0_TX_A_MARK,		CAN0_RX_A_MARK,
+};
+static const unsigned int can0_data_b_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(2, 0),	RCAR_GP_PIN(2, 1),
+};
+static const unsigned int can0_data_b_mux[] = {
+	CAN0_TX_B_MARK,		CAN0_RX_B_MARK,
+};
+static const unsigned int can1_data_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(1, 22),	RCAR_GP_PIN(1, 26),
+};
+static const unsigned int can1_data_mux[] = {
+	CAN1_TX_MARK,		CAN1_RX_MARK,
+};
+
+/* - CAN Clock -------------------------------------------------------------- */
+static const unsigned int can_clk_pins[] = {
+	/* CLK */
+	RCAR_GP_PIN(1, 25),
+};
+static const unsigned int can_clk_mux[] = {
+	CAN_CLK_MARK,
+};
+
 /* - EtherAVB --------------------------------------------------------------- */
 static const unsigned int avb_link_pins[] = {
 	/* AVB_LINK */
@@ -3117,6 +3149,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(avb_avtp_capture_a),
 	SH_PFC_PIN_GROUP(avb_avtp_match_b),
 	SH_PFC_PIN_GROUP(avb_avtp_capture_b),
+	SH_PFC_PIN_GROUP(can0_data_a),
+	SH_PFC_PIN_GROUP(can0_data_b),
+	SH_PFC_PIN_GROUP(can1_data),
+	SH_PFC_PIN_GROUP(can_clk),
 	SH_PFC_PIN_GROUP(hscif0_data),
 	SH_PFC_PIN_GROUP(hscif0_clk),
 	SH_PFC_PIN_GROUP(hscif0_ctrl),
@@ -3356,6 +3392,19 @@ static const char * const avb_groups[] = {
 	"avb_avtp_capture_b",
 };
 
+static const char * const can0_groups[] = {
+	"can0_data_a",
+	"can0_data_b",
+};
+
+static const char * const can1_groups[] = {
+	"can1_data",
+};
+
+static const char * const can_clk_groups[] = {
+	"can_clk",
+};
+
 static const char * const hscif0_groups[] = {
 	"hscif0_data",
 	"hscif0_clk",
@@ -3639,6 +3688,9 @@ static const char * const ssi_groups[] = {
 static const struct sh_pfc_function pinmux_functions[] = {
 	SH_PFC_FUNCTION(audio_clk),
 	SH_PFC_FUNCTION(avb),
+	SH_PFC_FUNCTION(can0),
+	SH_PFC_FUNCTION(can1),
+	SH_PFC_FUNCTION(can_clk),
 	SH_PFC_FUNCTION(hscif0),
 	SH_PFC_FUNCTION(hscif1),
 	SH_PFC_FUNCTION(hscif2),
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] pinctrl: sh-pfc: r8a7795: Add CAN FD support
  2016-02-26 11:10 [PATCH v2 0/2] Add CAN & CAN FD pinctrl support for r8a7795 SoC Ramesh Shanmugasundaram
  2016-02-26 11:10 ` [PATCH v2 1/2] pinctrl: sh-pfc: r8a7795: Add CAN support Ramesh Shanmugasundaram
@ 2016-02-26 11:10 ` Ramesh Shanmugasundaram
  1 sibling, 0 replies; 4+ messages in thread
From: Ramesh Shanmugasundaram @ 2016-02-26 11:10 UTC (permalink / raw)
  To: laurent.pinchart, geert+renesas, linus.walleij
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, chris.paterson2,
	Ramesh Shanmugasundaram

This patch adds CANFD[0-1] pinmux support to r8a7795 SoC.

Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index 847fecb..be985d5 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -1567,6 +1567,29 @@ static const unsigned int can_clk_mux[] = {
 	CAN_CLK_MARK,
 };
 
+/* - CAN FD --------------------------------------------------------------- */
+static const unsigned int canfd0_data_a_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(1, 23),     RCAR_GP_PIN(1, 24),
+};
+static const unsigned int canfd0_data_a_mux[] = {
+	CANFD0_TX_A_MARK,       CANFD0_RX_A_MARK,
+};
+static const unsigned int canfd0_data_b_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(2, 0),      RCAR_GP_PIN(2, 1),
+};
+static const unsigned int canfd0_data_b_mux[] = {
+	CANFD0_TX_B_MARK,       CANFD0_RX_B_MARK,
+};
+static const unsigned int canfd1_data_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(1, 22),     RCAR_GP_PIN(1, 26),
+};
+static const unsigned int canfd1_data_mux[] = {
+	CANFD1_TX_MARK,         CANFD1_RX_MARK,
+};
+
 /* - EtherAVB --------------------------------------------------------------- */
 static const unsigned int avb_link_pins[] = {
 	/* AVB_LINK */
@@ -3153,6 +3176,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(can0_data_b),
 	SH_PFC_PIN_GROUP(can1_data),
 	SH_PFC_PIN_GROUP(can_clk),
+	SH_PFC_PIN_GROUP(canfd0_data_a),
+	SH_PFC_PIN_GROUP(canfd0_data_b),
+	SH_PFC_PIN_GROUP(canfd1_data),
 	SH_PFC_PIN_GROUP(hscif0_data),
 	SH_PFC_PIN_GROUP(hscif0_clk),
 	SH_PFC_PIN_GROUP(hscif0_ctrl),
@@ -3405,6 +3431,15 @@ static const char * const can_clk_groups[] = {
 	"can_clk",
 };
 
+static const char * const canfd0_groups[] = {
+	"canfd0_data_a",
+	"canfd0_data_b",
+};
+
+static const char * const canfd1_groups[] = {
+	"canfd1_data",
+};
+
 static const char * const hscif0_groups[] = {
 	"hscif0_data",
 	"hscif0_clk",
@@ -3691,6 +3726,8 @@ static const struct sh_pfc_function pinmux_functions[] = {
 	SH_PFC_FUNCTION(can0),
 	SH_PFC_FUNCTION(can1),
 	SH_PFC_FUNCTION(can_clk),
+	SH_PFC_FUNCTION(canfd0),
+	SH_PFC_FUNCTION(canfd1),
 	SH_PFC_FUNCTION(hscif0),
 	SH_PFC_FUNCTION(hscif1),
 	SH_PFC_FUNCTION(hscif2),
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] pinctrl: sh-pfc: r8a7795: Add CAN support
  2016-02-26 11:10 ` [PATCH v2 1/2] pinctrl: sh-pfc: r8a7795: Add CAN support Ramesh Shanmugasundaram
@ 2016-02-26 12:13   ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-02-26 12:13 UTC (permalink / raw)
  To: Ramesh Shanmugasundaram
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
	linux-renesas-soc, linux-gpio, linux-kernel, Chris Paterson

Hi Ramesh,

On Fri, Feb 26, 2016 at 12:10 PM, Ramesh Shanmugasundaram
<ramesh.shanmugasundaram@bp.renesas.com> wrote:
> This patch adds CAN[0-1] pinmux support to r8a7795 SoC.
>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

Thanks for the update!

> --- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
> @@ -1535,6 +1535,38 @@ static const unsigned int audio_clkout3_b_mux[] = {
>         AUDIO_CLKOUT3_B_MARK,
>  };
>
> +/* - CAN ------------------------------------------------------------------ */
> +static const unsigned int can0_data_a_pins[] = {
> +       /* TX, RX */
> +       RCAR_GP_PIN(1, 23),     RCAR_GP_PIN(1, 24),
> +};

[...]

> +static const unsigned int can_clk_mux[] = {
> +       CAN_CLK_MARK,
> +};
> +
>  /* - EtherAVB --------------------------------------------------------------- */
>  static const unsigned int avb_link_pins[] = {
>         /* AVB_LINK */

However, "can" should be below "avb".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-26 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 11:10 [PATCH v2 0/2] Add CAN & CAN FD pinctrl support for r8a7795 SoC Ramesh Shanmugasundaram
2016-02-26 11:10 ` [PATCH v2 1/2] pinctrl: sh-pfc: r8a7795: Add CAN support Ramesh Shanmugasundaram
2016-02-26 12:13   ` Geert Uytterhoeven
2016-02-26 11:10 ` [PATCH v2 2/2] pinctrl: sh-pfc: r8a7795: Add CAN FD support Ramesh Shanmugasundaram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).