diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/usb/phy/phy-samsung-usb.c | 5 | ||||
| -rw-r--r-- | drivers/usb/phy/phy-samsung-usb.h | 10 | ||||
| -rw-r--r-- | drivers/usb/phy/phy-samsung-usb2.c | 13 |
3 files changed, 26 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-samsung-usb.c b/drivers/usb/phy/phy-samsung-usb.c index 7a1ed90bd58e..ac025ca08425 100644 --- a/drivers/usb/phy/phy-samsung-usb.c +++ b/drivers/usb/phy/phy-samsung-usb.c | |||
| @@ -100,6 +100,11 @@ void samsung_usbphy_set_isolation_4210(struct samsung_usbphy *sphy, bool on) | |||
| 100 | reg_val |= en_mask; | 100 | reg_val |= en_mask; |
| 101 | 101 | ||
| 102 | writel(reg_val, reg); | 102 | writel(reg_val, reg); |
| 103 | |||
| 104 | if (sphy->drv_data->cpu_type == TYPE_EXYNOS4X12) { | ||
| 105 | writel(reg_val, sphy->pmuregs + EXYNOS4X12_PHY_HSIC_CTRL0); | ||
| 106 | writel(reg_val, sphy->pmuregs + EXYNOS4X12_PHY_HSIC_CTRL1); | ||
| 107 | } | ||
| 103 | } | 108 | } |
| 104 | EXPORT_SYMBOL_GPL(samsung_usbphy_set_isolation_4210); | 109 | EXPORT_SYMBOL_GPL(samsung_usbphy_set_isolation_4210); |
| 105 | 110 | ||
diff --git a/drivers/usb/phy/phy-samsung-usb.h b/drivers/usb/phy/phy-samsung-usb.h index 585d12f5c044..68771bfd1825 100644 --- a/drivers/usb/phy/phy-samsung-usb.h +++ b/drivers/usb/phy/phy-samsung-usb.h | |||
| @@ -47,6 +47,16 @@ | |||
| 47 | #define RSTCON_HLINK_SWRST (0x1 << 1) | 47 | #define RSTCON_HLINK_SWRST (0x1 << 1) |
| 48 | #define RSTCON_SWRST (0x1 << 0) | 48 | #define RSTCON_SWRST (0x1 << 0) |
| 49 | 49 | ||
| 50 | /* EXYNOS4X12 */ | ||
| 51 | #define EXYNOS4X12_PHY_HSIC_CTRL0 (0x04) | ||
| 52 | #define EXYNOS4X12_PHY_HSIC_CTRL1 (0x08) | ||
| 53 | |||
| 54 | #define PHYPWR_NORMAL_MASK_HSIC1 (0x7 << 12) | ||
| 55 | #define PHYPWR_NORMAL_MASK_HSIC0 (0x7 << 9) | ||
| 56 | #define PHYPWR_NORMAL_MASK_PHY1 (0x7 << 6) | ||
| 57 | |||
| 58 | #define RSTCON_HOSTPHY_SWRST (0xf << 3) | ||
| 59 | |||
| 50 | /* EXYNOS5 */ | 60 | /* EXYNOS5 */ |
| 51 | #define EXYNOS5_PHY_HOST_CTRL0 (0x00) | 61 | #define EXYNOS5_PHY_HOST_CTRL0 (0x00) |
| 52 | 62 | ||
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c index 03180c06bfca..1011c16ade7e 100644 --- a/drivers/usb/phy/phy-samsung-usb2.c +++ b/drivers/usb/phy/phy-samsung-usb2.c | |||
| @@ -176,8 +176,12 @@ static void samsung_usb2phy_enable(struct samsung_usbphy *sphy) | |||
| 176 | phypwr &= ~PHYPWR_NORMAL_MASK; | 176 | phypwr &= ~PHYPWR_NORMAL_MASK; |
| 177 | rstcon |= RSTCON_SWRST; | 177 | rstcon |= RSTCON_SWRST; |
| 178 | break; | 178 | break; |
| 179 | case TYPE_EXYNOS4210: | ||
| 180 | case TYPE_EXYNOS4X12: | 179 | case TYPE_EXYNOS4X12: |
| 180 | phypwr &= ~(PHYPWR_NORMAL_MASK_HSIC0 | | ||
| 181 | PHYPWR_NORMAL_MASK_HSIC1 | | ||
| 182 | PHYPWR_NORMAL_MASK_PHY1); | ||
| 183 | rstcon |= RSTCON_HOSTPHY_SWRST; | ||
| 184 | case TYPE_EXYNOS4210: | ||
| 181 | phypwr &= ~PHYPWR_NORMAL_MASK_PHY0; | 185 | phypwr &= ~PHYPWR_NORMAL_MASK_PHY0; |
| 182 | rstcon |= RSTCON_SWRST; | 186 | rstcon |= RSTCON_SWRST; |
| 183 | default: | 187 | default: |
| @@ -190,6 +194,8 @@ static void samsung_usb2phy_enable(struct samsung_usbphy *sphy) | |||
| 190 | /* reset all ports of PHY and Link */ | 194 | /* reset all ports of PHY and Link */ |
| 191 | writel(rstcon, regs + SAMSUNG_RSTCON); | 195 | writel(rstcon, regs + SAMSUNG_RSTCON); |
| 192 | udelay(10); | 196 | udelay(10); |
| 197 | if (sphy->drv_data->cpu_type == TYPE_EXYNOS4X12) | ||
| 198 | rstcon &= ~RSTCON_HOSTPHY_SWRST; | ||
| 193 | rstcon &= ~RSTCON_SWRST; | 199 | rstcon &= ~RSTCON_SWRST; |
| 194 | writel(rstcon, regs + SAMSUNG_RSTCON); | 200 | writel(rstcon, regs + SAMSUNG_RSTCON); |
| 195 | } | 201 | } |
| @@ -240,8 +246,11 @@ static void samsung_usb2phy_disable(struct samsung_usbphy *sphy) | |||
| 240 | case TYPE_S3C64XX: | 246 | case TYPE_S3C64XX: |
| 241 | phypwr |= PHYPWR_NORMAL_MASK; | 247 | phypwr |= PHYPWR_NORMAL_MASK; |
| 242 | break; | 248 | break; |
| 243 | case TYPE_EXYNOS4210: | ||
| 244 | case TYPE_EXYNOS4X12: | 249 | case TYPE_EXYNOS4X12: |
| 250 | phypwr |= (PHYPWR_NORMAL_MASK_HSIC0 | | ||
| 251 | PHYPWR_NORMAL_MASK_HSIC1 | | ||
| 252 | PHYPWR_NORMAL_MASK_PHY1); | ||
| 253 | case TYPE_EXYNOS4210: | ||
| 245 | phypwr |= PHYPWR_NORMAL_MASK_PHY0; | 254 | phypwr |= PHYPWR_NORMAL_MASK_PHY0; |
| 246 | default: | 255 | default: |
| 247 | break; | 256 | break; |
