Add Renesas R8A7792 PFC support
Subsystems (4)
cover Add Renesas R8A7792 PFC support
Hello.
Here's the set of 2 patches against the 'devel' branch of Linus Walleij's
'linux-pinctrl.git' repo. Here we add the PFC support for the Renesas R8A7792 SoC (with a prior header cleanup).
[1/2] pinctrl: sh-pfc: fix overly long lines
[2/2] pinctrl: sh-pfc: add R8A7792 PFC support
WBR, Sergei
PATCH 1/2 pinctrl: sh-pfc: fix overly long lines
The PORT_GP_CFG_<n>() macros take up more than 80 columns -- and not for a good reason. Make the header file checkpatch.pl-proof at least in this respect...
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 95 +++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 40 deletions(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +55 -40
@@ -354,72 +354,87 @@ extern const struct sh_pfc_soc_info shx3* GP port style (32 ports banks) */ -#define PORT_GP_CFG_1 (bank, pin, fn, sfx, cfg) fn(bank, pin, GP_##bank##_##pin, sfx, cfg) +#define PORT_GP_CFG_1 (bank, pin, fn, sfx, cfg) \ + fn(bank, pin, GP_##bank##_##pin, sfx, cfg)#define PORT_GP_1 (bank, pin, fn, sfx) PORT_GP_CFG_1(bank, pin, fn, sfx, 0) -#define PORT_GP_CFG_4 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_1(bank, 0, fn, sfx, cfg), PORT_GP_CFG_1(bank, 1, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 2, fn, sfx, cfg), PORT_GP_CFG_1(bank, 3, fn, sfx, cfg) +#define PORT_GP_CFG_4 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_1(bank, 0, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 1, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 2, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 3, fn, sfx, cfg)#define PORT_GP_4 (bank, fn, sfx) PORT_GP_CFG_4(bank, fn, sfx, 0) -#define PORT_GP_CFG_8 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_4(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 4, fn, sfx, cfg), PORT_GP_CFG_1(bank, 5, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 6, fn, sfx, cfg), PORT_GP_CFG_1(bank, 7, fn, sfx, cfg) +#define PORT_GP_CFG_8 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_4(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 4, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 5, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 6, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 7, fn, sfx, cfg)#define PORT_GP_8 (bank, fn, sfx) PORT_GP_CFG_8(bank, fn, sfx, 0) -#define PORT_GP_CFG_9 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_8(bank, fn, sfx, cfg), \ +#define PORT_GP_CFG_9 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_8(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 8, fn, sfx, cfg)#define PORT_GP_9 (bank, fn, sfx) PORT_GP_CFG_9(bank, fn, sfx, 0) -#define PORT_GP_CFG_12 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_8(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 8, fn, sfx, cfg), PORT_GP_CFG_1(bank, 9, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 10, fn, sfx, cfg), PORT_GP_CFG_1(bank, 11, fn, sfx, cfg) +#define PORT_GP_CFG_12 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_9(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 9, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 10, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 11, fn, sfx, cfg)#define PORT_GP_12 (bank, fn, sfx) PORT_GP_CFG_12(bank, fn, sfx, 0) -#define PORT_GP_CFG_14 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_12(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 12, fn, sfx, cfg), PORT_GP_CFG_1(bank, 13, fn, sfx, cfg) +#define PORT_GP_CFG_14 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_12(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 12, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 13, fn, sfx, cfg)#define PORT_GP_14 (bank, fn, sfx) PORT_GP_CFG_14(bank, fn, sfx, 0) -#define PORT_GP_CFG_15 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_14(bank, fn, sfx, cfg), \ +#define PORT_GP_CFG_15 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_14(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 14, fn, sfx, cfg)#define PORT_GP_15 (bank, fn, sfx) PORT_GP_CFG_15(bank, fn, sfx, 0) -#define PORT_GP_CFG_16 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_14(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 14, fn, sfx, cfg), PORT_GP_CFG_1(bank, 15, fn, sfx, cfg) +#define PORT_GP_CFG_16 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_15(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 15, fn, sfx, cfg)#define PORT_GP_16 (bank, fn, sfx) PORT_GP_CFG_16(bank, fn, sfx, 0) -#define PORT_GP_CFG_18 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_16(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 16, fn, sfx, cfg), PORT_GP_CFG_1(bank, 17, fn, sfx, cfg) +#define PORT_GP_CFG_18 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_16(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 16, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 17, fn, sfx, cfg)#define PORT_GP_18 (bank, fn, sfx) PORT_GP_CFG_18(bank, fn, sfx, 0) -#define PORT_GP_CFG_26 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_18(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 18, fn, sfx, cfg), PORT_GP_CFG_1(bank, 19, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 20, fn, sfx, cfg), PORT_GP_CFG_1(bank, 21, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 22, fn, sfx, cfg), PORT_GP_CFG_1(bank, 23, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 24, fn, sfx, cfg), PORT_GP_CFG_1(bank, 25, fn, sfx, cfg) +#define PORT_GP_CFG_26 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_18(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 18, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 19, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 20, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 21, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 22, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 23, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 24, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 25, fn, sfx, cfg)#define PORT_GP_26 (bank, fn, sfx) PORT_GP_CFG_26(bank, fn, sfx, 0) -#define PORT_GP_CFG_28 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_26(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 26, fn, sfx, cfg), PORT_GP_CFG_1(bank, 27, fn, sfx, cfg) +#define PORT_GP_CFG_28 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_26(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 26, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 27, fn, sfx, cfg)#define PORT_GP_28 (bank, fn, sfx) PORT_GP_CFG_28(bank, fn, sfx, 0) -#define PORT_GP_CFG_30 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_28(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 28, fn, sfx, cfg), PORT_GP_CFG_1(bank, 29, fn, sfx, cfg) +#define PORT_GP_CFG_30 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_28(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 28, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 29, fn, sfx, cfg)#define PORT_GP_30 (bank, fn, sfx) PORT_GP_CFG_30(bank, fn, sfx, 0) -#define PORT_GP_CFG_32 (bank, fn, sfx, cfg) \ - PORT_GP_CFG_30(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 30, fn, sfx, cfg), PORT_GP_CFG_1(bank, 31, fn, sfx, cfg) +#define PORT_GP_CFG_32 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_30(bank, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 30, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 31, fn, sfx, cfg)#define PORT_GP_32 (bank, fn, sfx) PORT_GP_CFG_32(bank, fn, sfx, 0)#define PORT_GP_32_REV (bank, fn, sfx) \
Re: [PATCH 1/2] pinctrl: sh-pfc: fix overly long lines
Hi Sergei,
Quoted 5 lines · Sergei Shtylyov
The PORT_GP_CFG_<n>() macros take up more than 80 columns -- and not for a good reason. Make the header file checkpatch.pl-proof at least in this respect...
Signed-off-by Sergei Shtylyov <[email protected]>
But it doesn't apply, due to "pinctrl: sh-pfc: Initial R8A7796 PFC support" which was submitted one day earlier.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Re: [PATCH 1/2] pinctrl: sh-pfc: fix overly long lines
Quoted 9 lines · Geert Uytterhoeven
Quoted 5 lines
The PORT_GP_CFG_<n>() macros take up more than 80 columns -- and not for a good reason. Make the header file checkpatch.pl-proof at least in this respect...
Signed-off-by Sergei Shtylyov <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>But it doesn't apply, due to "pinctrl: sh-pfc: Initial R8A7796 PFC support"
... and *still* not merged? Or am I looking at a wrong tree? :-/
Quoted 1 line
which was submitted one day earlier.
I don't think that matters... What matters are the order of merges.
Quoted 3 lines
Gr{oetje,eeting}s,
Geert
MBR, Sergei
Re: [PATCH 1/2] pinctrl: sh-pfc: fix overly long lines
Hi Sergei,
Quoted 5 lines · Sergei Shtylyov
Quoted 4 lines · Geert Uytterhoeven
Quoted 4 lines
The PORT_GP_CFG_<n>() macros take up more than 80 columns -- and not for a good reason. Make the header file checkpatch.pl-proof at least in this respect...
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Sergei Shtylyov <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>But it doesn't apply, due to "pinctrl: sh-pfc: Initial R8A7796 PFC support"
... and *still* not merged? Or am I looking at a wrong tree? :-/
No, it's not yet merged. IIRC, there were review comments ;-)
Quoted 3 lines
Quoted 1 line
which was submitted one day earlier.
I don't think that matters... What matters are the order of merges.
Right... It's getting a bit late for v4.8, though...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Re: [PATCH 1/2] pinctrl: sh-pfc: fix overly long lines
In reply to Sergei ShtylyovQuoted 8 lines · Sergei Shtylyov
Quoted 8 lines
Quoted 5 lines
The PORT_GP_CFG_<n>() macros take up more than 80 columns -- and not for a good reason. Make the header file checkpatch.pl-proof at least in this respect...
Signed-off-by Sergei Shtylyov <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Quoted 7 lines
Quoted 1 line
But it doesn't apply, due to "pinctrl: sh-pfc: Initial R8A7796 PFC support"
... and *still* not merged? Or am I looking at a wrong tree? :-/
Quoted 1 line
which was submitted one day earlier.
I don't think that matters... What matters are the order of merges.
Moreover, I couldn't find this patch in my mail and in the mail archive
(marc.info) too -- I'm only seeing your comments to that patch. Where can I find the patch itself?
MBR, Sergei
PATCH 2/2 pinctrl: sh-pfc: add R8A7792 PFC support
In reply to Sergei ShtylyovAdd the PFC support for the R8A7792 SoC including pin groups for some on-chip devices such as SCIF, INTC, and LBSC...
--- Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 drivers/pinctrl/sh-pfc/Kconfig | 5 drivers/pinctrl/sh-pfc/Makefile | 1 drivers/pinctrl/sh-pfc/core.c | 6 drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 1713 ++++++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 25 6 files changed, 1745 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt +1 -0
@@ -17,6 +17,7 @@ Required Properties: - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller. - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller. + - "renesas,pfc-r8a7792": for R8A7792 (R-Car V2H) compatible pin-controller. - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller. - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller. - "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller.
drivers/pinctrl/sh-pfc/Kconfig +5 -0
@@ -54,6 +54,11 @@ config PINCTRL_PFC_R8A7791 depends on ARCH_R8A7791 select PINCTRL_SH_PFC +config PINCTRL_PFC_R8A7792 + def_bool y + depends on ARCH_R8A7792 + select PINCTRL_SH_PFC + config PINCTRL_PFC_R8A7793 def_bool y depends on ARCH_R8A7793
drivers/pinctrl/sh-pfc/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o obj-$(CONFIG_PINCTRL_PFC_R8A7791) += pfc-r8a7791.o +obj-$(CONFIG_PINCTRL_PFC_R8A7792) += pfc-r8a7792.o obj-$(CONFIG_PINCTRL_PFC_R8A7793) += pfc-r8a7791.o obj-$(CONFIG_PINCTRL_PFC_R8A7794) += pfc-r8a7794.o obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795.o
drivers/pinctrl/sh-pfc/core.c +6 -0
@@ -494,6 +494,12 @@ static const struct of_device_id sh_pfc_ .data = &r8a7791_pinmux_info, },#endif +#ifdef CONFIG_PINCTRL_PFC_R8A7792 + { + .compatible = "renesas,pfc-r8a7792", + .data = &r8a7792_pinmux_info, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A7793 { .compatible = "renesas,pfc-r8a7793",
drivers/pinctrl/sh-pfc/pfc-r8a7792.c new file +1713 -0
1,713 lines not on this page · raw message
drivers/pinctrl/sh-pfc/sh_pfc.h +19 -6
@@ -257,6 +257,7 @@ extern const struct sh_pfc_soc_info r8a7extern const struct sh_pfc_soc_info r8a7779_pinmux_info;extern const struct sh_pfc_soc_info r8a7790_pinmux_info;extern const struct sh_pfc_soc_info r8a7791_pinmux_info; +extern const struct sh_pfc_soc_info r8a7792_pinmux_info;extern const struct sh_pfc_soc_info r8a7793_pinmux_info;extern const struct sh_pfc_soc_info r8a7794_pinmux_info;extern const struct sh_pfc_soc_info r8a7795_pinmux_info;
@@ -401,19 +402,27 @@ extern const struct sh_pfc_soc_info shx3 PORT_GP_CFG_1(bank, 15, fn, sfx, cfg)#define PORT_GP_16 (bank, fn, sfx) PORT_GP_CFG_16(bank, fn, sfx, 0) -#define PORT_GP_CFG_18 (bank, fn, sfx, cfg) \ +#define PORT_GP_CFG_17 (bank, fn, sfx, cfg) \ PORT_GP_CFG_16(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 16, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 16, fn, sfx, cfg) +#define PORT_GP_17 (bank, fn, sfx) PORT_GP_CFG_17(bank, fn, sfx, 0) + +#define PORT_GP_CFG_18 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_17(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 17, fn, sfx, cfg)#define PORT_GP_18 (bank, fn, sfx) PORT_GP_CFG_18(bank, fn, sfx, 0) -#define PORT_GP_CFG_26 (bank, fn, sfx, cfg) \ +#define PORT_GP_CFG_23 (bank, fn, sfx, cfg) \ PORT_GP_CFG_18(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 18, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 19, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 20, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 21, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 22, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 22, fn, sfx, cfg) +#define PORT_GP_23 (bank, fn, sfx) PORT_GP_CFG_23(bank, fn, sfx, 0) + +#define PORT_GP_CFG_26 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_23(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 23, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 24, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 25, fn, sfx, cfg)
@@ -425,9 +434,13 @@ extern const struct sh_pfc_soc_info shx3 PORT_GP_CFG_1(bank, 27, fn, sfx, cfg)#define PORT_GP_28 (bank, fn, sfx) PORT_GP_CFG_28(bank, fn, sfx, 0) -#define PORT_GP_CFG_30 (bank, fn, sfx, cfg) \ +#define PORT_GP_CFG_29 (bank, fn, sfx, cfg) \ PORT_GP_CFG_28(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 28, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 28, fn, sfx, cfg) +#define PORT_GP_29 (bank, fn, sfx) PORT_GP_CFG_29(bank, fn, sfx, 0) + +#define PORT_GP_CFG_30 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_29(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 29, fn, sfx, cfg)#define PORT_GP_30 (bank, fn, sfx) PORT_GP_CFG_30(bank, fn, sfx, 0)
Re: [PATCH 2/2] pinctrl: sh-pfc: add R8A7792 PFC support
Hi Sergei,
Quoted 2 lines · Sergei Shtylyov
Add the PFC support for the R8A7792 SoC including pin groups for some on-chip devices such as SCIF, INTC, and LBSC...
Thanks for your patch!
drivers/pinctrl/sh-pfc/pfc-r8a7792.c
Quoted 7 lines
Signed-off-by Sergei Shtylyov <[email protected]>drivers/pinctrl/sh-pfc/pfc-r8a7792.c new file +1
-0+/* - LSBC ------------------------------------------------------------------- */
LBSC
drivers/pinctrl/sh-pfc/pfc-r8a7792.c line 764
Quoted 4 lines
drivers/pinctrl/sh-pfc/pfc-r8a7792.c new file +4
-0+static const unsigned int lbsc_cs0_pins[] = { +/* CS0# */ +RCAR_GP_PIN (3 ,27 ), +};
I've only reviewed the numbers of GPIOs per bank, and the pins.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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