diff options
author | Huang Rui <ray.huang@amd.com> | 2014-10-28 07:54:35 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 11:03:38 -0500 |
commit | 2164a476205ccc62c5874f95f3504b657fff5c04 (patch) | |
tree | 6ddb9220c0e77851c50891f4cbbaa046a26e973a /drivers/usb/dwc3/core.c | |
parent | 14f4ac53dfb2321b07a0e690df797fba61102fa6 (diff) |
usb: dwc3: set SUSPHY bit for all cores
It is recommended to set USB3 and USB2 SUSPHY bits to '1' after the core
initialization is completed above the dwc3 revision 1.94a.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r-- | drivers/usb/dwc3/core.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b440b2b29872..aefb59d6db8f 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -374,6 +374,15 @@ static void dwc3_phy_setup(struct dwc3 *dwc) | |||
374 | 374 | ||
375 | reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); | 375 | reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); |
376 | 376 | ||
377 | /* | ||
378 | * Above 1.94a, it is recommended to set DWC3_GUSB3PIPECTL_SUSPHY | ||
379 | * to '0' during coreConsultant configuration. So default value | ||
380 | * will be '0' when the core is reset. Application needs to set it | ||
381 | * to '1' after the core initialization is completed. | ||
382 | */ | ||
383 | if (dwc->revision > DWC3_REVISION_194A) | ||
384 | reg |= DWC3_GUSB3PIPECTL_SUSPHY; | ||
385 | |||
377 | if (dwc->u2ss_inp3_quirk) | 386 | if (dwc->u2ss_inp3_quirk) |
378 | reg |= DWC3_GUSB3PIPECTL_U2SSINP3OK; | 387 | reg |= DWC3_GUSB3PIPECTL_U2SSINP3OK; |
379 | 388 | ||
@@ -395,6 +404,21 @@ static void dwc3_phy_setup(struct dwc3 *dwc) | |||
395 | dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); | 404 | dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); |
396 | 405 | ||
397 | mdelay(100); | 406 | mdelay(100); |
407 | |||
408 | reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); | ||
409 | |||
410 | /* | ||
411 | * Above 1.94a, it is recommended to set DWC3_GUSB2PHYCFG_SUSPHY to | ||
412 | * '0' during coreConsultant configuration. So default value will | ||
413 | * be '0' when the core is reset. Application needs to set it to | ||
414 | * '1' after the core initialization is completed. | ||
415 | */ | ||
416 | if (dwc->revision > DWC3_REVISION_194A) | ||
417 | reg |= DWC3_GUSB2PHYCFG_SUSPHY; | ||
418 | |||
419 | dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); | ||
420 | |||
421 | mdelay(100); | ||
398 | } | 422 | } |
399 | 423 | ||
400 | /** | 424 | /** |