All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN FD support
@ 2016-11-22 13:49 Chris Paterson
  2016-11-22 13:49 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support Chris Paterson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chris Paterson @ 2016-11-22 13:49 UTC (permalink / raw)
  To: laurent.pinchart, geert+renesas, linus.walleij
  Cc: linux-renesas-soc, linux-gpio, ramesh.shanmugasundaram, Chris Paterson

This patch series adds pinctrl support for CAN and CAN FD to the r8a7796.

Based on renesas-drivers-2016-11-15-v4.9-rc5.

Chris Paterson (2):
  pinctrl: sh-pfc: r8a7796: Add CAN support
  pinctrl: sh-pfc: r8a7796: Add CAN FD support

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

-- 
1.9.1


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

* [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support
  2016-11-22 13:49 [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN FD support Chris Paterson
@ 2016-11-22 13:49 ` Chris Paterson
  2016-11-23  8:14   ` Geert Uytterhoeven
  2016-11-22 13:49 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7796: Add CAN FD support Chris Paterson
  2016-11-23  8:15 ` [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN " Geert Uytterhoeven
  2 siblings, 1 reply; 8+ messages in thread
From: Chris Paterson @ 2016-11-22 13:49 UTC (permalink / raw)
  To: laurent.pinchart, geert+renesas, linus.walleij
  Cc: linux-renesas-soc, linux-gpio, ramesh.shanmugasundaram, Chris Paterson

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

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

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index 14b3512..f1f0026 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -1649,6 +1649,38 @@ enum {
 	AVB_AVTP_CAPTURE_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,
+};
+
 /* - DRIF0 --------------------------------------------------------------- */
 static const unsigned int drif0_ctrl_a_pins[] = {
 	/* CLK, SYNC */
@@ -2612,6 +2644,10 @@ enum {
 	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(drif0_ctrl_a),
 	SH_PFC_PIN_GROUP(drif0_data0_a),
 	SH_PFC_PIN_GROUP(drif0_data1_a),
@@ -2751,6 +2787,19 @@ enum {
 	"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 drif0_groups[] = {
 	"drif0_ctrl_a",
 	"drif0_data0_a",
@@ -2950,6 +2999,9 @@ enum {
 
 static const struct sh_pfc_function pinmux_functions[] = {
 	SH_PFC_FUNCTION(avb),
+	SH_PFC_FUNCTION(can0),
+	SH_PFC_FUNCTION(can1),
+	SH_PFC_FUNCTION(can_clk),
 	SH_PFC_FUNCTION(drif0),
 	SH_PFC_FUNCTION(drif1),
 	SH_PFC_FUNCTION(drif2),
-- 
1.9.1

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

* [PATCH 2/2] pinctrl: sh-pfc: r8a7796: Add CAN FD support
  2016-11-22 13:49 [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN FD support Chris Paterson
  2016-11-22 13:49 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support Chris Paterson
@ 2016-11-22 13:49 ` Chris Paterson
  2016-11-23  8:14   ` Geert Uytterhoeven
  2016-11-23  8:15 ` [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN " Geert Uytterhoeven
  2 siblings, 1 reply; 8+ messages in thread
From: Chris Paterson @ 2016-11-22 13:49 UTC (permalink / raw)
  To: laurent.pinchart, geert+renesas, linus.walleij
  Cc: linux-renesas-soc, linux-gpio, ramesh.shanmugasundaram, Chris Paterson

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

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

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index f1f0026..865f4b9 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -1681,6 +1681,29 @@ enum {
 	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,
+};
+
 /* - DRIF0 --------------------------------------------------------------- */
 static const unsigned int drif0_ctrl_a_pins[] = {
 	/* CLK, SYNC */
@@ -2648,6 +2671,9 @@ enum {
 	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(drif0_ctrl_a),
 	SH_PFC_PIN_GROUP(drif0_data0_a),
 	SH_PFC_PIN_GROUP(drif0_data1_a),
@@ -2800,6 +2826,15 @@ enum {
 	"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 drif0_groups[] = {
 	"drif0_ctrl_a",
 	"drif0_data0_a",
@@ -3002,6 +3037,8 @@ enum {
 	SH_PFC_FUNCTION(can0),
 	SH_PFC_FUNCTION(can1),
 	SH_PFC_FUNCTION(can_clk),
+	SH_PFC_FUNCTION(canfd0),
+	SH_PFC_FUNCTION(canfd1),
 	SH_PFC_FUNCTION(drif0),
 	SH_PFC_FUNCTION(drif1),
 	SH_PFC_FUNCTION(drif2),
-- 
1.9.1

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

* Re: [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support
  2016-11-22 13:49 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support Chris Paterson
@ 2016-11-23  8:14   ` Geert Uytterhoeven
  2016-11-23  8:39     ` Chris Paterson
  0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2016-11-23  8:14 UTC (permalink / raw)
  To: Chris Paterson
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
	Linux-Renesas, linux-gpio, Ramesh Shanmugasundaram

Hi Chris,

On Tue, Nov 22, 2016 at 2:49 PM, Chris Paterson
<chris.paterson2@renesas.com> wrote:
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

BTW, as all patches in this series were Signed-off-by Ramesh first, does
that mean he's the author, and you should have added his From: line, too?

Thanks!

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] 8+ messages in thread

* Re: [PATCH 2/2] pinctrl: sh-pfc: r8a7796: Add CAN FD support
  2016-11-22 13:49 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7796: Add CAN FD support Chris Paterson
@ 2016-11-23  8:14   ` Geert Uytterhoeven
  0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2016-11-23  8:14 UTC (permalink / raw)
  To: Chris Paterson
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
	Linux-Renesas, linux-gpio, Ramesh Shanmugasundaram

On Tue, Nov 22, 2016 at 2:49 PM, Chris Paterson
<chris.paterson2@renesas.com> wrote:
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 8+ messages in thread

* Re: [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN FD support
  2016-11-22 13:49 [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN FD support Chris Paterson
  2016-11-22 13:49 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support Chris Paterson
  2016-11-22 13:49 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7796: Add CAN FD support Chris Paterson
@ 2016-11-23  8:15 ` Geert Uytterhoeven
  2 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2016-11-23  8:15 UTC (permalink / raw)
  To: Chris Paterson
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
	Linux-Renesas, linux-gpio, Ramesh Shanmugasundaram

Hi Chris,

On Tue, Nov 22, 2016 at 2:49 PM, Chris Paterson
<chris.paterson2@renesas.com> wrote:
> This patch series adds pinctrl support for CAN and CAN FD to the r8a7796.
>
> Based on renesas-drivers-2016-11-15-v4.9-rc5.
>
> Chris Paterson (2):
>   pinctrl: sh-pfc: r8a7796: Add CAN support
>   pinctrl: sh-pfc: r8a7796: Add CAN FD support

Thank you, will queue in sh-pfc-for-v4.11 once the authorship has been
clarified.

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] 8+ messages in thread

* RE: [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support
  2016-11-23  8:14   ` Geert Uytterhoeven
@ 2016-11-23  8:39     ` Chris Paterson
  2016-11-23  9:26       ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Paterson @ 2016-11-23  8:39 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
	Linux-Renesas, linux-gpio, Ramesh Shanmugasundaram

Hello Geert,

Thank you for the review.

> -----Original Message-----
> From: geert.uytterhoeven@gmail.com
> [mailto:geert.uytterhoeven@gmail.com] On Behalf Of Geert Uytterhoeven
> Sent: 23 November 2016 08:14
> To: Chris Paterson <Chris.Paterson2@renesas.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>; Geert
> Uytterhoeven <geert+renesas@glider.be>; Linus Walleij
> <linus.walleij@linaro.org>; Linux-Renesas <linux-renesas-
> soc@vger.kernel.org>; linux-gpio@vger.kernel.org; Ramesh
> Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support
> 
> Hi Chris,
> 
> On Tue, Nov 22, 2016 at 2:49 PM, Chris Paterson
> <chris.paterson2@renesas.com> wrote:
> > Signed-off-by: Ramesh Shanmugasundaram
> > <ramesh.shanmugasundaram@bp.renesas.com>
> > Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> BTW, as all patches in this series were Signed-off-by Ramesh first, does that
> mean he's the author, and you should have added his From: line, too?

Technically I authored these patches, but they are direct ports from Ramesh's r8a7795 patches [1][2].

[1] a4d9791 pinctrl: sh-pfc: r8a7795: Add CAN support
[2] 4412bb5 pinctrl: sh-pfc: r8a7795: Add CAN FD support

Apologies for not making this clear in the cover letter.

Kind regards, Chris

> 
> Thanks!
> 
> 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] 8+ messages in thread

* Re: [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support
  2016-11-23  8:39     ` Chris Paterson
@ 2016-11-23  9:26       ` Geert Uytterhoeven
  0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2016-11-23  9:26 UTC (permalink / raw)
  To: Chris Paterson
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
	Linux-Renesas, linux-gpio, Ramesh Shanmugasundaram

Hi Chris,

On Wed, Nov 23, 2016 at 9:39 AM, Chris Paterson
<Chris.Paterson2@renesas.com> wrote:
>> From: geert.uytterhoeven@gmail.com
>> On Tue, Nov 22, 2016 at 2:49 PM, Chris Paterson
>> <chris.paterson2@renesas.com> wrote:
>> > Signed-off-by: Ramesh Shanmugasundaram
>> > <ramesh.shanmugasundaram@bp.renesas.com>
>> > Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>
>>
>> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>> BTW, as all patches in this series were Signed-off-by Ramesh first, does that
>> mean he's the author, and you should have added his From: line, too?
>
> Technically I authored these patches, but they are direct ports from Ramesh's r8a7795 patches [1][2].

OK, I'll replace his SoB by "based on patches for r8a7795 by Ramesh...".

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] 8+ messages in thread

end of thread, other threads:[~2016-11-23  9:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 13:49 [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN FD support Chris Paterson
2016-11-22 13:49 ` [PATCH 1/2] pinctrl: sh-pfc: r8a7796: Add CAN support Chris Paterson
2016-11-23  8:14   ` Geert Uytterhoeven
2016-11-23  8:39     ` Chris Paterson
2016-11-23  9:26       ` Geert Uytterhoeven
2016-11-22 13:49 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7796: Add CAN FD support Chris Paterson
2016-11-23  8:14   ` Geert Uytterhoeven
2016-11-23  8:15 ` [PATCH 0/2] pinctrl: sh-pfc: r8a7796: Add CAN/CAN " Geert Uytterhoeven

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.