usb: renesas_usbhs: rcar3: Use OTG mode for R-Car D3
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fri, 21 Sep 2018 12:26:30 +0000 (21:26 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 2 Oct 2018 07:47:07 +0000 (10:47 +0300)
Since R-Car D3 can use OTG mode, this patch changes the UGCTRL2
value to UGCTRL2_USB0SEL_OTG and UGCTRL2_VBUSSEL like other R-Car
Gen3 SoCs.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/renesas_usbhs/rcar3.c

index 50e5fb55c8a08d0e0ca5f41e05158579c4dfd5a8..aa38204482865f045de02cb26dd931faa87065ac 100644 (file)
@@ -77,7 +77,8 @@ static int usbhs_rcar3_power_and_pll_ctrl(struct platform_device *pdev,
 
        if (enable) {
                usbhs_write32(priv, UGCTRL, 0); /* release PLLRESET */
-               usbhs_rcar3_set_ugctrl2(priv, UGCTRL2_USB0SEL_HSUSB);
+               usbhs_rcar3_set_ugctrl2(priv,
+                                       UGCTRL2_USB0SEL_OTG | UGCTRL2_VBUSSEL);
 
                usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM);
                do {