diff mbox series

[4.19y,01/10] pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions

Message ID 1554126947-32747-2-git-send-email-fabrizio.castro@bp.renesas.com
State Accepted
Delegated to: Pavel Machek
Headers show
Series Pinctrl driver updates for RZ/G2E | expand

Commit Message

Fabrizio Castro April 1, 2019, 1:55 p.m. UTC
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

commit c1e5bd286fe501992165608551f889ec69f5901a upstream.

This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
 drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 51 +++++++++++++++++++++++++++++++++--
 1 file changed, 49 insertions(+), 2 deletions(-)

Comments

Pavel Machek April 9, 2019, 9:03 p.m. UTC | #1
On Mon 2019-04-01 14:55:38, Fabrizio Castro wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> 
> commit c1e5bd286fe501992165608551f889ec69f5901a upstream.
> 
> This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC.
> 
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

This does not apply. My kernel still has:

> -     struct sh_pfc_pin_group common[117];

while this expects... way higher number. I tried to look at pending patches
in patchwork, that maybe if I tried to apply everything it would work, but
could not get that to work, either.

Current status of the tree is at:

https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip

Could the patches that depend on each other go into one series? If it is
hard identifying what depends on what, maybe the best way forward is to 
create a big series on top of 64729dc0be4847961550cdcca4ddc66adf556aaa
with all patches you have pending. Your patches seem to be in good shape,
so applying it should not be a big deal.

Thanks and sorry for confusion,
								Pavel

> @@ -3475,7 +3504,7 @@ static const unsigned int vin5_clk_b_mux[] = {
>  };
>  
>  static const struct {
> -	struct sh_pfc_pin_group common[238];
> +	struct sh_pfc_pin_group common[241];
>  	struct sh_pfc_pin_group automotive[0];
>  } pinmux_groups = {
>  	.common = {
> @@ -3504,6 +3533,9 @@ static const struct {
Fabrizio Castro April 10, 2019, 9:16 a.m. UTC | #2
Hello Pavel,

Thank you for your feedback.

> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 09 April 2019 22:04
> To: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Biju Das <biju.das@bp.renesas.com>
> Subject: Re: [cip-dev] [PATCH 4.19y 01/10] pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions
> 
> On Mon 2019-04-01 14:55:38, Fabrizio Castro wrote:
> > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >
> > commit c1e5bd286fe501992165608551f889ec69f5901a upstream.
> >
> > This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC.
> >
> > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> 
> This does not apply. My kernel still has:
> 
> > -     struct sh_pfc_pin_group common[117];
> 
> while this expects... way higher number. I tried to look at pending patches
> in patchwork, that maybe if I tried to apply everything it would work, but
> could not get that to work, either.
> 
> Current status of the tree is at:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip
> 
> Could the patches that depend on each other go into one series? If it is
> hard identifying what depends on what, maybe the best way forward is to
> create a big series on top of 64729dc0be4847961550cdcca4ddc66adf556aaa
> with all patches you have pending. Your patches seem to be in good shape,
> so applying it should not be a big deal.

I went through the emails on the cip-dev mailing list and I could find all the
necessary patches this patch depends on, this patch applies cleanly once
its dependencies have been applied, so perhaps we should do what you are
suggesting, which is sending you another big series to apply on top of the
current branch.

Thanks,
Fab

> 
> Thanks and sorry for confusion,
> 								Pavel
> 
> > @@ -3475,7 +3504,7 @@ static const unsigned int vin5_clk_b_mux[] = {
> >  };
> >
> >  static const struct {
> > -	struct sh_pfc_pin_group common[238];
> > +	struct sh_pfc_pin_group common[241];
> >  	struct sh_pfc_pin_group automotive[0];
> >  } pinmux_groups = {
> >  	.common = {
> > @@ -3504,6 +3533,9 @@ static const struct {
> 
> 
> 
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Fabrizio Castro April 10, 2019, 9:28 a.m. UTC | #3
Hello Pavel,

> -----Original Message-----
> From: cip-dev-bounces@lists.cip-project.org <cip-dev-bounces@lists.cip-project.org> On Behalf Of Fabrizio Castro
> Sent: 10 April 2019 10:17
> To: Pavel Machek <pavel@denx.de>
> Cc: cip-dev@lists.cip-project.org; Biju Das <biju.das@bp.renesas.com>
> Subject: Re: [cip-dev] [PATCH 4.19y 01/10] pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions
> 
> Hello Pavel,
> 
> Thank you for your feedback.
> 
> > -----Original Message-----
> > From: Pavel Machek <pavel@denx.de>
> > Sent: 09 April 2019 22:04
> > To: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Cc: cip-dev@lists.cip-project.org; Biju Das <biju.das@bp.renesas.com>
> > Subject: Re: [cip-dev] [PATCH 4.19y 01/10] pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions
> >
> > On Mon 2019-04-01 14:55:38, Fabrizio Castro wrote:
> > > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > >
> > > commit c1e5bd286fe501992165608551f889ec69f5901a upstream.
> > >
> > > This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC.
> > >
> > > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >
> > This does not apply. My kernel still has:
> >
> > > -     struct sh_pfc_pin_group common[117];
> >
> > while this expects... way higher number. I tried to look at pending patches
> > in patchwork, that maybe if I tried to apply everything it would work, but
> > could not get that to work, either.
> >
> > Current status of the tree is at:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip
> >
> > Could the patches that depend on each other go into one series? If it is
> > hard identifying what depends on what, maybe the best way forward is to
> > create a big series on top of 64729dc0be4847961550cdcca4ddc66adf556aaa
> > with all patches you have pending. Your patches seem to be in good shape,
> > so applying it should not be a big deal.
> 
> I went through the emails on the cip-dev mailing list and I could find all the
> necessary patches this patch depends on, this patch applies cleanly once
> its dependencies have been applied, so perhaps we should do what you are
> suggesting, which is sending you another big series to apply on top of the
> current branch.

Actually, that would create an even bigger confusion at this point, so I am going to wait
for you guys to work this out for now.

Thanks,
Fab

> 
> Thanks,
> Fab
> 
> >
> > Thanks and sorry for confusion,
> > 								Pavel
> >
> > > @@ -3475,7 +3504,7 @@ static const unsigned int vin5_clk_b_mux[] = {
> > >  };
> > >
> > >  static const struct {
> > > -	struct sh_pfc_pin_group common[238];
> > > +	struct sh_pfc_pin_group common[241];
> > >  	struct sh_pfc_pin_group automotive[0];
> > >  } pinmux_groups = {
> > >  	.common = {
> > > @@ -3504,6 +3533,9 @@ static const struct {
> >
> >
> >
> > --
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> 
> _______________________________________________
> cip-dev mailing list
> cip-dev@lists.cip-project.org
> https://lists.cip-project.org/mailman/listinfo/cip-dev
Nobuhiro Iwamatsu April 10, 2019, 11:31 p.m. UTC | #4
Hi, Fabrizio

> -----Original Message-----
> From: cip-dev-bounces@lists.cip-project.org
> [mailto:cip-dev-bounces@lists.cip-project.org] On Behalf Of Fabrizio
> Castro
> Sent: Wednesday, April 10, 2019 6:17 PM
> To: Pavel Machek <pavel@denx.de>
> Cc: cip-dev@lists.cip-project.org; Biju Das <biju.das@bp.renesas.com>
> Subject: Re: [cip-dev] [PATCH 4.19y 01/10] pinctrl: sh-pfc: r8a77990:
> Add CAN pins, groups and functions
> 
> Hello Pavel,
> 
> Thank you for your feedback.
> 
> > -----Original Message-----
> > From: Pavel Machek <pavel@denx.de>
> > Sent: 09 April 2019 22:04
> > To: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Cc: cip-dev@lists.cip-project.org; Biju Das <biju.das@bp.renesas.com>
> > Subject: Re: [cip-dev] [PATCH 4.19y 01/10] pinctrl: sh-pfc: r8a77990:
> > Add CAN pins, groups and functions
> >
> > On Mon 2019-04-01 14:55:38, Fabrizio Castro wrote:
> > > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > >
> > > commit c1e5bd286fe501992165608551f889ec69f5901a upstream.
> > >
> > > This patch adds CAN{0,1} pins, groups and functions to the R8A77990
> SoC.
> > >
> > > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >
> > This does not apply. My kernel still has:
> >
> > > -     struct sh_pfc_pin_group common[117];
> >
> > while this expects... way higher number. I tried to look at pending
> > patches in patchwork, that maybe if I tried to apply everything it
> > would work, but could not get that to work, either.
> >
> > Current status of the tree is at:
> >
> >
> https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/lo
> g/
> > ?h=linux-4.19.y-cip
> >
> > Could the patches that depend on each other go into one series? If it
> > is hard identifying what depends on what, maybe the best way forward
> > is to create a big series on top of
> > 64729dc0be4847961550cdcca4ddc66adf556aaa
> > with all patches you have pending. Your patches seem to be in good
> > shape, so applying it should not be a big deal.
> 
> I went through the emails on the cip-dev mailing list and I could find
> all the necessary patches this patch depends on, this patch applies
> cleanly once its dependencies have been applied, so perhaps we should
> do what you are suggesting, which is sending you another big series to
> apply on top of the current branch.

Pavel and I are reviewing the patch now.
Although we share patches, we have such a problem because we do not consider the dependencies of each series.
The patch review by two people has just begun, so I think there are many problems. The kernel team will talk about this.

Pavel, do you have comment about this?

If possible, it would be helpful if you could write a patch series dependency on the cover letter of series.

Best regards,
  Nobuhiro

> 
> Thanks,
> Fab
> 
> >
> > Thanks and sorry for confusion,
> > 								Pavel
> >

Best regards,
  Nobuhiro

> > > @@ -3475,7 +3504,7 @@ static const unsigned int vin5_clk_b_mux[] =
> {
> > > };
> > >
> > >  static const struct {
> > > -	struct sh_pfc_pin_group common[238];
> > > +	struct sh_pfc_pin_group common[241];
> > >  	struct sh_pfc_pin_group automotive[0];  } pinmux_groups = {
> > >  	.common = {
> > > @@ -3504,6 +3533,9 @@ static const struct {
> >
> >
> >
> > --
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> 
> _______________________________________________
> cip-dev mailing list
> cip-dev@lists.cip-project.org
> https://lists.cip-project.org/mailman/listinfo/cip-dev
Pavel Machek April 12, 2019, 8:04 a.m. UTC | #5
On Mon 2019-04-01 14:55:38, Fabrizio Castro wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> 
> commit c1e5bd286fe501992165608551f889ec69f5901a upstream.
> 
> This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC.
> 
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

Thanks, I applied the series.
Pavel Machek April 12, 2019, 8:28 p.m. UTC | #6
Hi!

> > > Current status of the tree is at:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip
> > >
> > > Could the patches that depend on each other go into one series? If it is
> > > hard identifying what depends on what, maybe the best way forward is to
> > > create a big series on top of 64729dc0be4847961550cdcca4ddc66adf556aaa
> > > with all patches you have pending. Your patches seem to be in good shape,
> > > so applying it should not be a big deal.
> > 
> > I went through the emails on the cip-dev mailing list and I could find all the
> > necessary patches this patch depends on, this patch applies cleanly once
> > its dependencies have been applied, so perhaps we should do what you are
> > suggesting, which is sending you another big series to apply on top of the
> > current branch.
> 
> Actually, that would create an even bigger confusion at this point, so I am going to wait
> for you guys to work this out for now.

Good news -- I believe we managed to sort it out.

Tree at 

https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip

should now be up-to-date with your patches. If you could run any
tests and verify things look sane, it would be great.

Best regards,
									Pavel
Fabrizio Castro April 15, 2019, 8:10 a.m. UTC | #7
Hello Pavel,

> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 12 April 2019 21:29
> To: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Cc: Pavel Machek <pavel@denx.de>; cip-dev@lists.cip-project.org; Biju Das <biju.das@bp.renesas.com>
> Subject: Renesas patches was Re: [cip-dev] [PATCH 4.19y 01/10] pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions
> 
> Hi!
> 
> > > > Current status of the tree is at:
> > > >
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip
> > > >
> > > > Could the patches that depend on each other go into one series? If it is
> > > > hard identifying what depends on what, maybe the best way forward is to
> > > > create a big series on top of 64729dc0be4847961550cdcca4ddc66adf556aaa
> > > > with all patches you have pending. Your patches seem to be in good shape,
> > > > so applying it should not be a big deal.
> > >
> > > I went through the emails on the cip-dev mailing list and I could find all the
> > > necessary patches this patch depends on, this patch applies cleanly once
> > > its dependencies have been applied, so perhaps we should do what you are
> > > suggesting, which is sending you another big series to apply on top of the
> > > current branch.
> >
> > Actually, that would create an even bigger confusion at this point, so I am going to wait
> > for you guys to work this out for now.
> 
> Good news -- I believe we managed to sort it out.
> 
> Tree at
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/log/?h=linux-4.19.y-cip
> 
> should now be up-to-date with your patches. If you could run any
> tests and verify things look sane, it would be great.

Thank you for your efforts! I can confirm all of the patches have been applied and things look sane.

Thanks,
Fab

> 
> Best regards,
> 									Pavel
> 
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
diff mbox series

Patch

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
index 6868753..2869a02 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
@@ -1538,6 +1538,35 @@  static const unsigned int avb_avtp_capture_a_mux[] = {
 	AVB_AVTP_CAPTURE_A_MARK,
 };
 
+/* - CAN ------------------------------------------------------------------ */
+static const unsigned int can0_data_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13),
+};
+
+static const unsigned int can0_data_mux[] = {
+	CAN0_TX_MARK, CAN0_RX_MARK,
+};
+
+static const unsigned int can1_data_pins[] = {
+	/* TX, RX */
+	RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 7),
+};
+
+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(0, 14),
+};
+
+static const unsigned int can_clk_mux[] = {
+	CAN_CLK_MARK,
+};
+
 /* - DU --------------------------------------------------------------------- */
 static const unsigned int du_rgb666_pins[] = {
 	/* R[7:2], G[7:2], B[7:2] */
@@ -3475,7 +3504,7 @@  static const unsigned int vin5_clk_b_mux[] = {
 };
 
 static const struct {
-	struct sh_pfc_pin_group common[238];
+	struct sh_pfc_pin_group common[241];
 	struct sh_pfc_pin_group automotive[0];
 } pinmux_groups = {
 	.common = {
@@ -3504,6 +3533,9 @@  static const struct {
 		SH_PFC_PIN_GROUP(avb_avtp_pps),
 		SH_PFC_PIN_GROUP(avb_avtp_match_a),
 		SH_PFC_PIN_GROUP(avb_avtp_capture_a),
+		SH_PFC_PIN_GROUP(can0_data),
+		SH_PFC_PIN_GROUP(can1_data),
+		SH_PFC_PIN_GROUP(can_clk),
 		SH_PFC_PIN_GROUP(du_rgb666),
 		SH_PFC_PIN_GROUP(du_rgb888),
 		SH_PFC_PIN_GROUP(du_clk_in_0),
@@ -3751,6 +3783,18 @@  static const char * const avb_groups[] = {
 	"avb_avtp_capture_a",
 };
 
+static const char * const can0_groups[] = {
+	"can0_data",
+};
+
+static const char * const can1_groups[] = {
+	"can1_data",
+};
+
+static const char * const can_clk_groups[] = {
+	"can_clk",
+};
+
 static const char * const du_groups[] = {
 	"du_rgb666",
 	"du_rgb888",
@@ -4082,12 +4126,15 @@  static const char * const vin5_groups[] = {
 };
 
 static const struct {
-	struct sh_pfc_function common[41];
+	struct sh_pfc_function common[44];
 	struct sh_pfc_function automotive[0];
 } pinmux_functions = {
 	.common = {
 		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(du),
 		SH_PFC_FUNCTION(hscif0),
 		SH_PFC_FUNCTION(hscif1),