Re: [PATCH 1/2] pinctrl: sh-pfc: r8a77965: Add USB2.0 host pins, groups and functions

2018-03-05 Thread Geert Uytterhoeven
On Tue, Feb 27, 2018 at 9:08 AM, Yoshihiro Shimoda
 wrote:
> From: Takeshi Kihara 
>
> This patch adds USB{0,1} (USB2.0 host) pins, groups and functions to
> the R8A77965 SoC.
>
> Signed-off-by: Takeshi Kihara 
> Signed-off-by: Yoshihiro Shimoda 

Reviewed-by: Geert Uytterhoeven 
and queued in sh-pfc-for-v4.17.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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


[PATCH 1/2] pinctrl: sh-pfc: r8a77965: Add USB2.0 host pins, groups and functions

2018-02-27 Thread Yoshihiro Shimoda
From: Takeshi Kihara 

This patch adds USB{0,1} (USB2.0 host) pins, groups and functions to
the R8A77965 SoC.

Signed-off-by: Takeshi Kihara 
Signed-off-by: Yoshihiro Shimoda 
---
 drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 32 
 1 file changed, 32 insertions(+)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c 
b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c
index acd57d5..270dfc2 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c
@@ -1872,6 +1872,26 @@ enum {
SCIF_CLK_B_MARK,
 };
 
+/* - USB0 --- 
*/
+static const unsigned int usb0_pins[] = {
+   /* PWEN, OVC */
+   RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
+};
+
+static const unsigned int usb0_mux[] = {
+   USB0_PWEN_MARK, USB0_OVC_MARK,
+};
+
+/* - USB1 --- 
*/
+static const unsigned int usb1_pins[] = {
+   /* PWEN, OVC */
+   RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
+};
+
+static const unsigned int usb1_mux[] = {
+   USB1_PWEN_MARK, USB1_OVC_MARK,
+};
+
 static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(avb_link),
SH_PFC_PIN_GROUP(avb_magic),
@@ -1912,6 +1932,8 @@ enum {
SH_PFC_PIN_GROUP(scif5_clk_b),
SH_PFC_PIN_GROUP(scif_clk_a),
SH_PFC_PIN_GROUP(scif_clk_b),
+   SH_PFC_PIN_GROUP(usb0),
+   SH_PFC_PIN_GROUP(usb1),
 };
 
 static const char * const avb_groups[] = {
@@ -1976,6 +1998,14 @@ enum {
"scif_clk_b",
 };
 
+static const char * const usb0_groups[] = {
+   "usb0",
+};
+
+static const char * const usb1_groups[] = {
+   "usb1",
+};
+
 static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(avb),
SH_PFC_FUNCTION(scif0),
@@ -1985,6 +2015,8 @@ enum {
SH_PFC_FUNCTION(scif4),
SH_PFC_FUNCTION(scif5),
SH_PFC_FUNCTION(scif_clk),
+   SH_PFC_FUNCTION(usb0),
+   SH_PFC_FUNCTION(usb1),
 };
 
 static const struct pinmux_cfg_reg pinmux_config_regs[] = {
-- 
1.9.1