2020-07-17 17:01:23

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH v2 0/2] Enable USB support on iW-RainboW-G21D-Q7 board

Hi All,

This series enables support for following peripherals in iW-RainboW-G21D-Q7
development platform:
* HSUSB
* USB2.0
* xHCI

Changes for v2:
* Added USB1 pwen pin and group
* Fixed pinmux pins for usb1

[v1] https://lkml.org/lkml/2020/5/27/1478
* Rest of the patches from v1 have been accepted

Cheers,
Prabhakar

Lad Prabhakar (2):
pinctrl: sh-pfc: r8a7790: Add USB1 PWEN pin and group
ARM: dts: r8a7742-iwg21d-q7: Enable HSUSB, USB2.0 and xHCI

arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 42 +++++++++++++++++++++++++
drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 11 ++++++-
2 files changed, 52 insertions(+), 1 deletion(-)

--
2.17.1


2020-07-17 17:02:42

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: dts: r8a7742-iwg21d-q7: Enable HSUSB, USB2.0 and xHCI

Enable support for HSUSB, USB2.0 and xHCI on iWave RZ/G1H carrier board.

Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Marian-Cristian Rotariu <[email protected]>
Reviewed-by: Biju Das <[email protected]>
---
arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 42 +++++++++++++++++++++++++
1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
index e90aaf1c94f0..f4910e709b87 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
@@ -131,6 +131,30 @@
};
};

+&hsusb {
+ pinctrl-0 = <&usb0_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&pci0 {
+ pinctrl-0 = <&usb0_pins>;
+ pinctrl-names = "default";
+ /* Disable hsusb to enable USB2.0 host mode support on J2 */
+ /* status = "okay"; */
+};
+
+&pci1 {
+ pinctrl-0 = <&usb1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&pci2 {
+ /* Disable xhci to enable USB2.0 host mode support on J23 bottom port */
+ /* status = "okay"; */
+};
+
&pfc {
avb_pins: avb {
groups = "avb_mdio", "avb_gmii";
@@ -168,6 +192,16 @@
groups = "ssi34_ctrl", "ssi3_data", "ssi4_data";
function = "ssi";
};
+
+ usb0_pins: usb0 {
+ groups = "usb0";
+ function = "usb0";
+ };
+
+ usb1_pins: usb1 {
+ groups = "usb1_pwen";
+ function = "usb1";
+ };
};

&rcar_sound {
@@ -222,3 +256,11 @@
&ssi4 {
shared-pin;
};
+
+&usbphy {
+ status = "okay";
+};
+
+&xhci {
+ status = "okay";
+};
--
2.17.1

2020-07-17 17:03:54

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH v2 1/2] pinctrl: sh-pfc: r8a7790: Add USB1 PWEN pin and group

Add USB1 PWEN pin and group for USB1 interface.

Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Biju Das <[email protected]>
---
drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
index f524401fec5f..39ba1e7cc1c3 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
@@ -3611,6 +3611,13 @@ static const unsigned int usb1_pins[] = {
static const unsigned int usb1_mux[] = {
USB1_PWEN_MARK, USB1_OVC_MARK,
};
+static const unsigned int usb1_pwen_pins[] = {
+ /* PWEN */
+ RCAR_GP_PIN(5, 20),
+};
+static const unsigned int usb1_pwen_mux[] = {
+ USB1_PWEN_MARK,
+};
/* - USB2 ------------------------------------------------------------------- */
static const unsigned int usb2_pins[] = {
/* PWEN, OVC */
@@ -3939,7 +3946,7 @@ static const unsigned int vin3_clk_mux[] = {
};

static const struct {
- struct sh_pfc_pin_group common[289];
+ struct sh_pfc_pin_group common[290];
struct sh_pfc_pin_group automotive[1];
} pinmux_groups = {
.common = {
@@ -4193,6 +4200,7 @@ static const struct {
SH_PFC_PIN_GROUP(usb0),
SH_PFC_PIN_GROUP(usb0_ovc_vbus),
SH_PFC_PIN_GROUP(usb1),
+ SH_PFC_PIN_GROUP(usb1_pwen),
SH_PFC_PIN_GROUP(usb2),
VIN_DATA_PIN_GROUP(vin0_data, 24),
VIN_DATA_PIN_GROUP(vin0_data, 20),
@@ -4640,6 +4648,7 @@ static const char * const usb0_groups[] = {

static const char * const usb1_groups[] = {
"usb1",
+ "usb1_pwen",
};

static const char * const usb2_groups[] = {
--
2.17.1

2020-08-05 12:55:51

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] pinctrl: sh-pfc: r8a7790: Add USB1 PWEN pin and group

On Fri, Jul 17, 2020 at 7:00 PM Lad Prabhakar
<[email protected]> wrote:
>
> Add USB1 PWEN pin and group for USB1 interface.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Biju Das <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in sh-pfc-for-v5.10.

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

2020-08-05 13:01:50

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] ARM: dts: r8a7742-iwg21d-q7: Enable HSUSB, USB2.0 and xHCI

On Fri, Jul 17, 2020 at 7:00 PM Lad Prabhakar
<[email protected]> wrote:
> Enable support for HSUSB, USB2.0 and xHCI on iWave RZ/G1H carrier board.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Marian-Cristian Rotariu <[email protected]>
> Reviewed-by: Biju Das <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-devel for v5.10.

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