2013-06-21 01:13:19 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2019-03-03 07:01:05 +01:00
|
|
|
#include <device/mmio.h>
|
2013-06-21 01:13:19 +02:00
|
|
|
#include <console/console.h>
|
2014-10-20 22:18:56 +02:00
|
|
|
#include <delay.h>
|
2013-06-21 01:13:19 +02:00
|
|
|
#include <device/device.h>
|
2014-10-20 22:18:56 +02:00
|
|
|
#include <soc/gpio.h>
|
|
|
|
#include <soc/power.h>
|
|
|
|
#include <soc/sysreg.h>
|
|
|
|
#include <soc/usb.h>
|
2013-06-21 01:13:19 +02:00
|
|
|
|
2013-09-04 00:07:31 +02:00
|
|
|
static void reset_dwc3(struct exynos5_usb_drd_dwc3 *dwc3)
|
|
|
|
{
|
2019-12-03 07:03:27 +01:00
|
|
|
setbits32(&dwc3->ctl, 0x1 << 11); /* core soft reset */
|
|
|
|
setbits32(&dwc3->usb3pipectl, 0x1 << 31); /* PHY soft reset */
|
|
|
|
setbits32(&dwc3->usb2phycfg, 0x1 << 31); /* PHY soft reset */
|
2013-09-04 00:07:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void reset_usb_drd0_dwc3()
|
|
|
|
{
|
|
|
|
printk(BIOS_DEBUG, "Starting DWC3 reset for USB DRD0\n");
|
|
|
|
reset_dwc3(exynos_usb_drd0_dwc3);
|
|
|
|
}
|
|
|
|
|
|
|
|
void reset_usb_drd1_dwc3()
|
|
|
|
{
|
|
|
|
printk(BIOS_DEBUG, "Starting DWC3 reset for USB DRD1\n");
|
|
|
|
reset_dwc3(exynos_usb_drd1_dwc3);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void setup_dwc3(struct exynos5_usb_drd_dwc3 *dwc3)
|
|
|
|
{
|
|
|
|
if (!(dwc3->ctl & 0x1 << 11) ||
|
|
|
|
!(dwc3->usb3pipectl & 0x1 << 31) ||
|
|
|
|
!(dwc3->usb2phycfg & 0x1 << 31)) {
|
|
|
|
printk(BIOS_ERR, "DWC3 at %p not in reset (you need to call "
|
|
|
|
"reset_usb_drdX_dwc3() first)!\n", dwc3);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set relevant registers to default values (clearing all reset bits) */
|
|
|
|
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
write32(&dwc3->usb3pipectl,
|
2015-02-20 05:19:23 +01:00
|
|
|
0x1 << 24 | /* activate PHY low power states */
|
|
|
|
0x4 << 19 | /* low power delay value */
|
|
|
|
0x1 << 18 | /* activate PHY low power delay */
|
|
|
|
0x1 << 17 | /* enable SuperSpeed PHY suspend */
|
|
|
|
0x1 << 1); /* default Tx deemphasis value */
|
2013-09-04 00:07:31 +02:00
|
|
|
|
|
|
|
/* Configure PHY clock turnaround for 8-bit UTMI+, disable suspend */
|
2015-02-20 05:19:23 +01:00
|
|
|
write32(&dwc3->usb2phycfg,
|
|
|
|
0x9 << 10 | /* PHY clock turnaround for 8-bit UTMI+ */
|
|
|
|
0x1 << 8 | /* enable PHY sleep in L1 */
|
|
|
|
0x1 << 6); /* enable PHY suspend */
|
|
|
|
|
|
|
|
write32(&dwc3->ctl,
|
|
|
|
0x5dc << 19 | /* suspend clock scale for 24MHz */
|
|
|
|
0x1 << 16 | /* retry SS three times (bugfix from U-Boot) */
|
|
|
|
0x1 << 12); /* port capability HOST */
|
2013-09-04 00:07:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void setup_usb_drd0_dwc3()
|
|
|
|
{
|
|
|
|
setup_dwc3(exynos_usb_drd0_dwc3);
|
|
|
|
printk(BIOS_DEBUG, "DWC3 setup for USB DRD0 finished\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void setup_usb_drd1_dwc3()
|
|
|
|
{
|
|
|
|
setup_dwc3(exynos_usb_drd1_dwc3);
|
|
|
|
printk(BIOS_DEBUG, "DWC3 setup for USB DRD1 finished\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void setup_drd_phy(struct exynos5_usb_drd_phy *phy)
|
|
|
|
{
|
|
|
|
/* Set all PHY registers to default values */
|
|
|
|
|
|
|
|
/* XHCI Version 1.0, Frame Length adjustment 30 MHz */
|
2019-12-03 07:03:27 +01:00
|
|
|
setbits32(&phy->linksystem, 0x1 << 27 | 0x20 << 1);
|
2013-09-04 00:07:31 +02:00
|
|
|
|
|
|
|
/* Disable OTG, ID0 and DRVVBUS, do not force sleep/suspend */
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
write32(&phy->utmi, 1 << 6);
|
|
|
|
|
|
|
|
write32(&phy->clkrst,
|
2015-02-20 05:19:23 +01:00
|
|
|
0x88 << 23 | /* spread spectrum refclk selector */
|
|
|
|
0x1 << 20 | /* enable spread spectrum */
|
|
|
|
0x1 << 19 | /* enable prescaler refclk */
|
|
|
|
0x68 << 11 | /* multiplier for 24MHz refclk */
|
|
|
|
0x5 << 5 | /* select 24MHz refclk (weird, from U-Boot) */
|
|
|
|
0x1 << 4 | /* power supply in normal operating mode */
|
|
|
|
0x3 << 2 | /* use external refclk (undocumented on 5420?)*/
|
|
|
|
0x1 << 1 | /* force port reset */
|
|
|
|
0x1 << 0); /* normal operating mode */
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
|
|
|
|
write32(&phy->param0,
|
2015-02-20 05:19:23 +01:00
|
|
|
0x9 << 26 | /* LOS level */
|
|
|
|
0x3 << 22 | /* TX VREF tune */
|
|
|
|
0x1 << 20 | /* TX rise tune */
|
|
|
|
0x1 << 18 | /* TX res tune */
|
|
|
|
0x3 << 13 | /* TX HS X Vtune */
|
|
|
|
0x3 << 9 | /* TX FS/LS tune */
|
|
|
|
0x3 << 6 | /* SQRX tune */
|
|
|
|
0x4 << 3 | /* OTG tune */
|
|
|
|
0x4 << 0); /* comp disc tune */
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
|
|
|
|
write32(&phy->param1,
|
2015-02-20 05:19:23 +01:00
|
|
|
0x7f << 19 | /* reserved */
|
|
|
|
0x7f << 12 | /* Tx launch amplitude */
|
|
|
|
0x20 << 6 | /* Tx deemphasis 6dB */
|
|
|
|
0x1c << 0); /* Tx deemphasis 3.5dB (value from U-Boot) */
|
2013-09-04 00:07:31 +02:00
|
|
|
|
|
|
|
/* disable all test features */
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
write32(&phy->test, 0);
|
2013-09-04 00:07:31 +02:00
|
|
|
|
|
|
|
/* UTMI clock select? ("must be 0x1") */
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
write32(&phy->utmiclksel, 0x1 << 2);
|
2013-09-04 00:07:31 +02:00
|
|
|
|
|
|
|
/* Samsung magic, undocumented (from U-Boot) */
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
write32(&phy->resume, 0x0);
|
2013-09-04 00:07:31 +02:00
|
|
|
|
|
|
|
udelay(10);
|
2019-12-03 07:03:27 +01:00
|
|
|
clrbits32(&phy->clkrst, 0x1 << 1); /* deassert port reset */
|
2013-09-04 00:07:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void setup_usb_drd0_phy()
|
|
|
|
{
|
|
|
|
printk(BIOS_DEBUG, "Powering up USB DRD0 PHY\n");
|
2019-12-03 07:03:27 +01:00
|
|
|
setbits32(&exynos_power->usb_drd0_phy_ctrl, POWER_USB_PHY_CTRL_EN);
|
2013-09-04 00:07:31 +02:00
|
|
|
setup_drd_phy(exynos_usb_drd0_phy);
|
|
|
|
}
|
|
|
|
|
|
|
|
void setup_usb_drd1_phy()
|
|
|
|
{
|
|
|
|
printk(BIOS_DEBUG, "Powering up USB DRD1 PHY\n");
|
2019-12-03 07:03:27 +01:00
|
|
|
setbits32(&exynos_power->usb_drd1_phy_ctrl, POWER_USB_PHY_CTRL_EN);
|
2013-09-04 00:07:31 +02:00
|
|
|
setup_drd_phy(exynos_usb_drd1_phy);
|
|
|
|
}
|
|
|
|
|
2013-08-16 02:34:45 +02:00
|
|
|
void setup_usb_host_phy(int hsic_gpio)
|
2013-06-21 01:13:19 +02:00
|
|
|
{
|
|
|
|
unsigned int hostphy_ctrl0;
|
|
|
|
|
2019-12-03 07:03:27 +01:00
|
|
|
setbits32(&exynos_sysreg->usb20_phy_cfg, USB20_PHY_CFG_EN);
|
|
|
|
setbits32(&exynos_power->usb_host_phy_ctrl, POWER_USB_PHY_CTRL_EN);
|
2013-06-21 01:13:19 +02:00
|
|
|
|
2013-08-16 02:34:45 +02:00
|
|
|
printk(BIOS_DEBUG, "Powering up USB HOST PHY (%s HSIC)\n",
|
|
|
|
hsic_gpio ? "with" : "without");
|
|
|
|
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
hostphy_ctrl0 = read32(&exynos_usb_host_phy->usbphyctrl0);
|
2013-08-16 02:34:45 +02:00
|
|
|
hostphy_ctrl0 &= ~(HOST_CTRL0_FSEL_MASK |
|
|
|
|
HOST_CTRL0_COMMONON_N |
|
2013-06-21 01:13:19 +02:00
|
|
|
/* HOST Phy setting */
|
|
|
|
HOST_CTRL0_PHYSWRST |
|
|
|
|
HOST_CTRL0_PHYSWRSTALL |
|
|
|
|
HOST_CTRL0_SIDDQ |
|
|
|
|
HOST_CTRL0_FORCESUSPEND |
|
|
|
|
HOST_CTRL0_FORCESLEEP);
|
2013-08-16 02:34:45 +02:00
|
|
|
hostphy_ctrl0 |= (/* Setting up the ref freq */
|
|
|
|
CLK_24MHZ << 16 |
|
|
|
|
/* HOST Phy setting */
|
|
|
|
HOST_CTRL0_LINKSWRST |
|
|
|
|
HOST_CTRL0_UTMISWRST);
|
arm(64): Globally replace writel(v, a) with write32(a, v)
This patch is a raw application of the following spatch to src/:
@@
expression A, V;
@@
- writel(V, A)
+ write32(A, V)
@@
expression A, V;
@@
- writew(V, A)
+ write16(A, V)
@@
expression A, V;
@@
- writeb(V, A)
+ write8(A, V)
@@
expression A;
@@
- readl(A)
+ read32(A)
@@
expression A;
@@
- readb(A)
+ read8(A)
BRANCH=none
BUG=chromium:444723
TEST=None (depends on next patch)
Change-Id: I5dd96490c85ee2bcbc669f08bc6fff0ecc0f9e27
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 64f643da95d85954c4d4ea91c34a5c69b9b08eb6
Original-Change-Id: I366a2eb5b3a0df2279ebcce572fe814894791c42
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/254864
Reviewed-on: http://review.coreboot.org/9836
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-02-19 23:51:15 +01:00
|
|
|
write32(&exynos_usb_host_phy->usbphyctrl0, hostphy_ctrl0);
|
2013-06-21 01:13:19 +02:00
|
|
|
udelay(10);
|
2019-12-03 07:03:27 +01:00
|
|
|
clrbits32(&exynos_usb_host_phy->usbphyctrl0,
|
|
|
|
HOST_CTRL0_LINKSWRST |
|
|
|
|
HOST_CTRL0_UTMISWRST);
|
2013-06-21 01:13:19 +02:00
|
|
|
udelay(20);
|
|
|
|
|
|
|
|
/* EHCI Ctrl setting */
|
2019-12-03 07:03:27 +01:00
|
|
|
setbits32(&exynos_usb_host_phy->ehcictrl,
|
|
|
|
EHCICTRL_ENAINCRXALIGN |
|
|
|
|
EHCICTRL_ENAINCR4 |
|
|
|
|
EHCICTRL_ENAINCR8 |
|
|
|
|
EHCICTRL_ENAINCR16);
|
2013-06-21 01:13:19 +02:00
|
|
|
|
|
|
|
/* HSIC USB Hub initialization. */
|
2013-08-16 02:34:45 +02:00
|
|
|
if (hsic_gpio) {
|
|
|
|
gpio_direction_output(hsic_gpio, 0);
|
|
|
|
udelay(100);
|
|
|
|
gpio_direction_output(hsic_gpio, 1);
|
|
|
|
udelay(5000);
|
2013-06-21 01:13:19 +02:00
|
|
|
|
2019-12-03 07:03:27 +01:00
|
|
|
clrbits32(&exynos_usb_host_phy->hsicphyctrl1,
|
|
|
|
HOST_CTRL0_SIDDQ |
|
|
|
|
HOST_CTRL0_FORCESLEEP |
|
|
|
|
HOST_CTRL0_FORCESUSPEND);
|
|
|
|
setbits32(&exynos_usb_host_phy->hsicphyctrl1,
|
|
|
|
HOST_CTRL0_PHYSWRST);
|
2013-08-16 02:34:45 +02:00
|
|
|
udelay(10);
|
2019-12-03 07:03:27 +01:00
|
|
|
clrbits32(&exynos_usb_host_phy->hsicphyctrl1,
|
|
|
|
HOST_CTRL0_PHYSWRST);
|
2013-08-16 02:34:45 +02:00
|
|
|
}
|
2013-06-21 01:13:19 +02:00
|
|
|
|
2013-08-15 02:14:39 +02:00
|
|
|
/* At this point we need to wait for 50ms before talking to
|
|
|
|
* the USB controller (PHY clock and power setup time)
|
|
|
|
* By the time we are actually in the payload, these 50ms
|
|
|
|
* will have passed.
|
|
|
|
*/
|
2013-06-21 01:13:19 +02:00
|
|
|
}
|