linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Add PWM and TPU support to r8a7743
@ 2017-12-14 10:56 Fabrizio Castro
  2017-12-14 10:56 ` [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function Fabrizio Castro
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrizio Castro @ 2017-12-14 10:56 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Mark Rutland, Russell King,
	Laurent Pinchart, Geert Uytterhoeven, Linus Walleij
  Cc: Fabrizio Castro, Simon Horman, Magnus Damm, Chris Paterson,
	Biju Das, linux-pwm, devicetree, linux-renesas-soc,
	linux-arm-kernel, linux-gpio

Dear All,

this series includes all that is required to add PWM and TPU SoC specific
support for the r8a7743.

Thanks,

Fabrizio Castro (6):
  ARM: shmobile: defconfig: Enable PWM
  dt-bindings: pwm: rcar: Document r8a774[35] PWM bindings
  ARM: dts: r8a7743: Add PWM SoC support
  dt-bindings: pwm: renesas-tpu: Document r8a774[35] support
  pinctrl: sh-pfc: r8a7791: Add tpu groups and function
  ARM: dts: r8a7743: Add TPU support

 .../devicetree/bindings/pwm/renesas,pwm-rcar.txt   | 10 ++-
 .../devicetree/bindings/pwm/renesas,tpu-pwm.txt    |  4 +-
 arch/arm/boot/dts/r8a7743.dtsi                     | 87 ++++++++++++++++++++++
 arch/arm/configs/shmobile_defconfig                |  1 +
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c               | 42 ++++++++++-
 5 files changed, 138 insertions(+), 6 deletions(-)

-- 
2.7.4

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

* [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function
  2017-12-14 10:56 [PATCH 0/6] Add PWM and TPU support to r8a7743 Fabrizio Castro
@ 2017-12-14 10:56 ` Fabrizio Castro
  2017-12-18 11:15   ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrizio Castro @ 2017-12-14 10:56 UTC (permalink / raw)
  To: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij
  Cc: Fabrizio Castro, Simon Horman, Chris Paterson, Biju Das,
	linux-renesas-soc, linux-gpio

This patch adds tpu groups and function to r8a7743/r8a7791/r8a7793.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 42 ++++++++++++++++++++++++++++++++++--
 1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
index c01ef02d..88eb8d3 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
@@ -3892,6 +3892,32 @@ static const unsigned int sdhi2_wp_mux[] = {
 	SD2_WP_MARK,
 };
 
+/* - TPU -------------------------------------------------------------------- */
+static const unsigned int tpu_to0_pins[] = {
+	RCAR_GP_PIN(6, 14),
+};
+static const unsigned int tpu_to0_mux[] = {
+	TPU_TO0_MARK,
+};
+static const unsigned int tpu_to1_pins[] = {
+	RCAR_GP_PIN(1, 17),
+};
+static const unsigned int tpu_to1_mux[] = {
+	TPU_TO1_MARK,
+};
+static const unsigned int tpu_to2_pins[] = {
+	RCAR_GP_PIN(1, 18),
+};
+static const unsigned int tpu_to2_mux[] = {
+	TPU_TO2_MARK,
+};
+static const unsigned int tpu_to3_pins[] = {
+	RCAR_GP_PIN(1, 24),
+};
+static const unsigned int tpu_to3_mux[] = {
+	TPU_TO3_MARK,
+};
+
 /* - SSI -------------------------------------------------------------------- */
 static const unsigned int ssi0_data_pins[] = {
 	/* SDATA */
@@ -4431,7 +4457,7 @@ static const unsigned int vin2_clk_mux[] = {
 };
 
 static const struct {
-	struct sh_pfc_pin_group common[342];
+	struct sh_pfc_pin_group common[346];
 	struct sh_pfc_pin_group r8a779x[9];
 } pinmux_groups = {
 	.common = {
@@ -4715,6 +4741,10 @@ static const struct {
 		SH_PFC_PIN_GROUP(sdhi2_ctrl),
 		SH_PFC_PIN_GROUP(sdhi2_cd),
 		SH_PFC_PIN_GROUP(sdhi2_wp),
+		SH_PFC_PIN_GROUP(tpu_to0),
+		SH_PFC_PIN_GROUP(tpu_to1),
+		SH_PFC_PIN_GROUP(tpu_to2),
+		SH_PFC_PIN_GROUP(tpu_to3),
 		SH_PFC_PIN_GROUP(ssi0_data),
 		SH_PFC_PIN_GROUP(ssi0_data_b),
 		SH_PFC_PIN_GROUP(ssi0129_ctrl),
@@ -5247,6 +5277,13 @@ static const char * const sdhi2_groups[] = {
 	"sdhi2_wp",
 };
 
+static const char * const tpu_groups[] = {
+	"tpu_to0",
+	"tpu_to1",
+	"tpu_to2",
+	"tpu_to3",
+};
+
 static const char * const ssi_groups[] = {
 	"ssi0_data",
 	"ssi0_data_b",
@@ -5327,7 +5364,7 @@ static const char * const vin2_groups[] = {
 };
 
 static const struct {
-	struct sh_pfc_function common[57];
+	struct sh_pfc_function common[58];
 	struct sh_pfc_function r8a779x[2];
 } pinmux_functions = {
 	.common = {
@@ -5382,6 +5419,7 @@ static const struct {
 		SH_PFC_FUNCTION(sdhi0),
 		SH_PFC_FUNCTION(sdhi1),
 		SH_PFC_FUNCTION(sdhi2),
+		SH_PFC_FUNCTION(tpu),
 		SH_PFC_FUNCTION(ssi),
 		SH_PFC_FUNCTION(usb0),
 		SH_PFC_FUNCTION(usb1),
-- 
2.7.4


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

* Re: [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function
  2017-12-14 10:56 ` [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function Fabrizio Castro
@ 2017-12-18 11:15   ` Geert Uytterhoeven
  2017-12-18 17:13     ` Fabrizio Castro
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-12-18 11:15 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij, Simon Horman,
	Chris Paterson, Biju Das, Linux-Renesas, linux-gpio

Hi Fabrizio,

On Thu, Dec 14, 2017 at 11:56 AM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adds tpu groups and function to r8a7743/r8a7791/r8a7793.
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>

With the sort order fixed:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
> @@ -3892,6 +3892,32 @@ static const unsigned int sdhi2_wp_mux[] = {
>         SD2_WP_MARK,
>  };
>
> +/* - TPU -------------------------------------------------------------------- */
> +static const unsigned int tpu_to0_pins[] = {
> +       RCAR_GP_PIN(6, 14),
> +};
> +static const unsigned int tpu_to0_mux[] = {
> +       TPU_TO0_MARK,
> +};
> +static const unsigned int tpu_to1_pins[] = {
> +       RCAR_GP_PIN(1, 17),
> +};
> +static const unsigned int tpu_to1_mux[] = {
> +       TPU_TO1_MARK,
> +};
> +static const unsigned int tpu_to2_pins[] = {
> +       RCAR_GP_PIN(1, 18),
> +};
> +static const unsigned int tpu_to2_mux[] = {
> +       TPU_TO2_MARK,
> +};
> +static const unsigned int tpu_to3_pins[] = {
> +       RCAR_GP_PIN(1, 24),
> +};
> +static const unsigned int tpu_to3_mux[] = {
> +       TPU_TO3_MARK,
> +};
> +
>  /* - SSI -------------------------------------------------------------------- */
>  static const unsigned int ssi0_data_pins[] = {
>         /* SDATA */

Please use alphabetical sort order (also below).

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

* RE: [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function
  2017-12-18 11:15   ` Geert Uytterhoeven
@ 2017-12-18 17:13     ` Fabrizio Castro
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrizio Castro @ 2017-12-18 17:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Laurent Pinchart, Geert Uytterhoeven, Linus Walleij, Simon Horman,
	Chris Paterson, Biju Das, Linux-Renesas,
	linux-gpio@vger.kernel.org

Hello Geert,

Thank you for your feedback.

> Subject: Re: [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function
>
> Hi Fabrizio,
>
> On Thu, Dec 14, 2017 at 11:56 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> > This patch adds tpu groups and function to r8a7743/r8a7791/r8a7793.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Reviewed-by: Biju Das <biju.das@bp.renesas.com>
>
> With the sort order fixed:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

I'll send a v2 to fix the order.

Thanks,
Fab

>
> > --- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
> > +++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
> > @@ -3892,6 +3892,32 @@ static const unsigned int sdhi2_wp_mux[] = {
> >         SD2_WP_MARK,
> >  };
> >
> > +/* - TPU -------------------------------------------------------------------- */
> > +static const unsigned int tpu_to0_pins[] = {
> > +       RCAR_GP_PIN(6, 14),
> > +};
> > +static const unsigned int tpu_to0_mux[] = {
> > +       TPU_TO0_MARK,
> > +};
> > +static const unsigned int tpu_to1_pins[] = {
> > +       RCAR_GP_PIN(1, 17),
> > +};
> > +static const unsigned int tpu_to1_mux[] = {
> > +       TPU_TO1_MARK,
> > +};
> > +static const unsigned int tpu_to2_pins[] = {
> > +       RCAR_GP_PIN(1, 18),
> > +};
> > +static const unsigned int tpu_to2_mux[] = {
> > +       TPU_TO2_MARK,
> > +};
> > +static const unsigned int tpu_to3_pins[] = {
> > +       RCAR_GP_PIN(1, 24),
> > +};
> > +static const unsigned int tpu_to3_mux[] = {
> > +       TPU_TO3_MARK,
> > +};
> > +
> >  /* - SSI -------------------------------------------------------------------- */
> >  static const unsigned int ssi0_data_pins[] = {
> >         /* SDATA */
>
> Please use alphabetical sort order (also below).
>
> 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


[https://www2.renesas.eu/media/email/unicef_2017.jpg]

This Christmas, instead of sending out cards, Renesas Electronics Europe have decided to support Unicef with a donation. For further details click here<https://www.unicef.org/> to find out about the valuable work they do, helping children all over the world.
We would like to take this opportunity to wish you a Merry Christmas and a prosperous New Year.



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

end of thread, other threads:[~2017-12-18 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 10:56 [PATCH 0/6] Add PWM and TPU support to r8a7743 Fabrizio Castro
2017-12-14 10:56 ` [PATCH 5/6] pinctrl: sh-pfc: r8a7791: Add tpu groups and function Fabrizio Castro
2017-12-18 11:15   ` Geert Uytterhoeven
2017-12-18 17:13     ` Fabrizio Castro

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).