|
46 | 46 |
|
47 | 47 | #define U3P_USBPHYACR0 0x000
|
48 | 48 | #define PA0_RG_U2PLL_FORCE_ON BIT(15)
|
| 49 | +#define PA0_RG_USB20_INTR_EN BIT(5) |
49 | 50 |
|
50 | 51 | #define U3P_USBPHYACR2 0x008
|
51 | 52 | #define PA2_RG_SIF_U2PLL_FORCE_EN BIT(18)
|
@@ -339,6 +340,15 @@ static void phy_instance_init(struct mt65xx_u3phy *u3phy,
|
339 | 340 | tmp &= ~P2C_RG_UART_EN;
|
340 | 341 | writel(tmp, com + U3P_U2PHYDTM1);
|
341 | 342 |
|
| 343 | + tmp = readl(com + U3P_USBPHYACR0); |
| 344 | + tmp |= PA0_RG_USB20_INTR_EN; |
| 345 | + writel(tmp, com + U3P_USBPHYACR0); |
| 346 | + |
| 347 | + /* disable switch 100uA current to SSUSB */ |
| 348 | + tmp = readl(com + U3P_USBPHYACR5); |
| 349 | + tmp &= ~PA5_RG_U2_HS_100U_U3_EN; |
| 350 | + writel(tmp, com + U3P_USBPHYACR5); |
| 351 | + |
342 | 352 | if (!index) {
|
343 | 353 | tmp = readl(com + U3P_U2PHYACR4);
|
344 | 354 | tmp &= ~P2C_U2_GPIO_CTR_MSK;
|
@@ -393,13 +403,6 @@ static void phy_instance_power_on(struct mt65xx_u3phy *u3phy,
|
393 | 403 | tmp |= PA6_RG_U2_OTG_VBUSCMP_EN;
|
394 | 404 | writel(tmp, com + U3P_USBPHYACR6);
|
395 | 405 |
|
396 |
| - if (!index) { |
397 |
| - /* switch 100uA current to SSUSB */ |
398 |
| - tmp = readl(com + U3P_USBPHYACR5); |
399 |
| - tmp |= PA5_RG_U2_HS_100U_U3_EN; |
400 |
| - writel(tmp, com + U3P_USBPHYACR5); |
401 |
| - } |
402 |
| - |
403 | 406 | tmp = readl(com + U3P_U2PHYDTM1);
|
404 | 407 | tmp |= P2C_RG_VBUSVALID | P2C_RG_AVALID;
|
405 | 408 | tmp &= ~P2C_RG_SESSEND;
|
@@ -435,13 +438,6 @@ static void phy_instance_power_off(struct mt65xx_u3phy *u3phy,
|
435 | 438 | tmp &= ~PA6_RG_U2_OTG_VBUSCMP_EN;
|
436 | 439 | writel(tmp, com + U3P_USBPHYACR6);
|
437 | 440 |
|
438 |
| - if (!index) { |
439 |
| - /* switch 100uA current back to USB2.0 */ |
440 |
| - tmp = readl(com + U3P_USBPHYACR5); |
441 |
| - tmp &= ~PA5_RG_U2_HS_100U_U3_EN; |
442 |
| - writel(tmp, com + U3P_USBPHYACR5); |
443 |
| - } |
444 |
| - |
445 | 441 | /* let suspendm=0, set utmi into analog power down */
|
446 | 442 | tmp = readl(com + U3P_U2PHYDTM0);
|
447 | 443 | tmp &= ~P2C_RG_SUSPENDM;
|
|
0 commit comments