diff options
| -rw-r--r-- | drivers/usb/phy/phy-mxs-usb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 1b1bb0ad40c3..6fa16ab31e2e 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c | |||
| @@ -63,6 +63,7 @@ | |||
| 63 | 63 | ||
| 64 | #define ANADIG_USB1_CHRG_DETECT_SET 0x1b4 | 64 | #define ANADIG_USB1_CHRG_DETECT_SET 0x1b4 |
| 65 | #define ANADIG_USB1_CHRG_DETECT_CLR 0x1b8 | 65 | #define ANADIG_USB1_CHRG_DETECT_CLR 0x1b8 |
| 66 | #define ANADIG_USB2_CHRG_DETECT_SET 0x214 | ||
| 66 | #define ANADIG_USB1_CHRG_DETECT_EN_B BIT(20) | 67 | #define ANADIG_USB1_CHRG_DETECT_EN_B BIT(20) |
| 67 | #define ANADIG_USB1_CHRG_DETECT_CHK_CHRG_B BIT(19) | 68 | #define ANADIG_USB1_CHRG_DETECT_CHK_CHRG_B BIT(19) |
| 68 | #define ANADIG_USB1_CHRG_DETECT_CHK_CONTACT BIT(18) | 69 | #define ANADIG_USB1_CHRG_DETECT_CHK_CONTACT BIT(18) |
| @@ -250,6 +251,19 @@ static int mxs_phy_hw_init(struct mxs_phy *mxs_phy) | |||
| 250 | if (mxs_phy->data->flags & MXS_PHY_NEED_IP_FIX) | 251 | if (mxs_phy->data->flags & MXS_PHY_NEED_IP_FIX) |
| 251 | writel(BM_USBPHY_IP_FIX, base + HW_USBPHY_IP_SET); | 252 | writel(BM_USBPHY_IP_FIX, base + HW_USBPHY_IP_SET); |
| 252 | 253 | ||
| 254 | if (mxs_phy->regmap_anatop) { | ||
| 255 | unsigned int reg = mxs_phy->port_id ? | ||
| 256 | ANADIG_USB1_CHRG_DETECT_SET : | ||
| 257 | ANADIG_USB2_CHRG_DETECT_SET; | ||
| 258 | /* | ||
| 259 | * The external charger detector needs to be disabled, | ||
| 260 | * or the signal at DP will be poor | ||
| 261 | */ | ||
| 262 | regmap_write(mxs_phy->regmap_anatop, reg, | ||
| 263 | ANADIG_USB1_CHRG_DETECT_EN_B | | ||
| 264 | ANADIG_USB1_CHRG_DETECT_CHK_CHRG_B); | ||
| 265 | } | ||
| 266 | |||
| 253 | mxs_phy_tx_init(mxs_phy); | 267 | mxs_phy_tx_init(mxs_phy); |
| 254 | 268 | ||
| 255 | return 0; | 269 | return 0; |
