[1/3] ARM: dts: r8a7742-iwg21d-q7: Enable HSUSB, USB2.0 and XHCI
diff mbox series

Message ID 1590611013-26029-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series
  • iW-RainboW-G21D-Qseven enable HSUSB, USB2.0, XHCI and Sound
Related show

Commit Message

Lad Prabhakar May 27, 2020, 8:23 p.m. UTC
Enable support for HSUB, USB2.0 and xhci on iWave RZ/G1H carrier board.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 51 +++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

Comments

Sergei Shtylyov May 28, 2020, 9:36 a.m. UTC | #1
Hello!

On 27.05.2020 23:23, Lad Prabhakar wrote:

> Enable support for HSUB, USB2.0 and xhci on iWave RZ/G1H carrier board.

    HSUSB, xHCI.

> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
[...]

MBR, Sergei
Geert Uytterhoeven May 29, 2020, 2:03 p.m. UTC | #2
Hi Prabhakar,

On Wed, May 27, 2020 at 10:24 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> Enable support for HSUB, USB2.0 and xhci on iWave RZ/G1H carrier board.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>

Thanks for your patch!

> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts

> @@ -88,6 +114,21 @@
>                 function = "sdhi2";
>                 power-source = <1800>;
>         };
> +
> +       usb0_pins: usb0 {
> +               groups = "usb0";
> +               function = "usb0";
> +       };
> +
> +       usb1_pins: usb1 {
> +               groups = "usb1";
> +               function = "usb1";
> +       };
> +
> +       usb2_pins: usb2 {
> +               groups = "usb2";
> +               function = "usb2";
> +       };
>  };

Looking at the schematics[*], I'm having a hard time making some sense
out of this.

GP5_21 (USB1_OVC) seems to be GPIO_AVB_SEL, and
GP5_22 (USB2_PWEN) is GPIO_SD1_LED?

I must be missing something?

[*] *RZ_G1H_SOM.pdf, *RZ_G1M_G1N_G1H_Q7 carrierBoard.pdf

Gr{oetje,eeting}s,

                        Geert

Patch
diff mbox series

diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
index f23c2ba..f62485a 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
@@ -61,6 +61,32 @@ 
 	};
 };
 
+&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 */
+	/* status = "okay"; */
+};
+
+&pci1 {
+	pinctrl-0 = <&usb1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&pci2 {
+	pinctrl-0 = <&usb2_pins>;
+	pinctrl-names = "default";
+	/* Disable xhci to enable USB2.0 host mode support */
+	/* status = "okay"; */
+};
+
 &pfc {
 	avb_pins: avb {
 		groups = "avb_mdio", "avb_gmii";
@@ -88,6 +114,21 @@ 
 		function = "sdhi2";
 		power-source = <1800>;
 	};
+
+	usb0_pins: usb0 {
+		groups = "usb0";
+		function = "usb0";
+	};
+
+	usb1_pins: usb1 {
+		groups = "usb1";
+		function = "usb1";
+	};
+
+	usb2_pins: usb2 {
+		groups = "usb2";
+		function = "usb2";
+	};
 };
 
 &rwdt {
@@ -122,3 +163,13 @@ 
 	sd-uhs-sdr50;
 	status = "okay";
 };
+
+&usbphy {
+	status = "okay";
+};
+
+&xhci {
+	pinctrl-0 = <&usb2_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};