Lines Matching +full:drv +full:- +full:2

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Samsung SoC USB 1.1/2.0 PHY driver - Exynos 5250 support
13 #include "phy-samsung-usb2.h"
49 #define EXYNOS_5250_HOSTPHYCTRL0_UTMISWRST BIT(2)
69 #define EXYNOS_5250_HSICPHYCTRLX_UTMISWRST BIT(2)
114 #define EXYNOS_5250_USBOTGSYS_OTGDISABLE BIT(2)
168 return -EINVAL; in exynos5250_rate_to_clk()
176 struct samsung_usb2_phy_driver *drv = inst->drv; in exynos5250_isol() local
180 if (drv->cfg == &exynos5250_usb2_phy_config && in exynos5250_isol()
181 inst->cfg->id == EXYNOS5250_DEVICE) in exynos5250_isol()
183 else if (drv->cfg == &exynos5250_usb2_phy_config && in exynos5250_isol()
184 inst->cfg->id == EXYNOS5250_HOST) in exynos5250_isol()
186 else if (drv->cfg == &exynos5420_usb2_phy_config && in exynos5250_isol()
187 inst->cfg->id == EXYNOS5250_HOST) in exynos5250_isol()
192 regmap_update_bits(drv->reg_pmu, offset, mask, on ? 0 : mask); in exynos5250_isol()
197 struct samsung_usb2_phy_driver *drv = inst->drv; in exynos5250_power_on() local
204 switch (inst->cfg->id) { in exynos5250_power_on()
206 regmap_update_bits(drv->reg_sys, in exynos5250_power_on()
212 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on()
215 otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; in exynos5250_power_on()
228 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on()
234 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on()
242 ctrl0 = readl(drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); in exynos5250_power_on()
245 ctrl0 |= drv->ref_reg_val << in exynos5250_power_on()
257 writel(ctrl0, drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); in exynos5250_power_on()
261 writel(ctrl0, drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); in exynos5250_power_on()
264 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on()
267 otg |= drv->ref_reg_val << EXYNOS_5250_USBOTGSYS_FSEL_SHIFT; in exynos5250_power_on()
280 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_on()
290 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL1); in exynos5250_power_on()
291 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL2); in exynos5250_power_on()
294 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL1); in exynos5250_power_on()
295 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL2); in exynos5250_power_on()
301 ehci = readl(drv->reg_phy + EXYNOS_5250_HOSTEHCICTRL); in exynos5250_power_on()
306 writel(ehci, drv->reg_phy + EXYNOS_5250_HOSTEHCICTRL); in exynos5250_power_on()
309 ohci = readl(drv->reg_phy + EXYNOS_5250_HOSTOHCICTRL); in exynos5250_power_on()
312 writel(ohci, drv->reg_phy + EXYNOS_5250_HOSTOHCICTRL); in exynos5250_power_on()
323 struct samsung_usb2_phy_driver *drv = inst->drv; in exynos5250_power_off() local
330 switch (inst->cfg->id) { in exynos5250_power_off()
332 otg = readl(drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_off()
336 writel(otg, drv->reg_phy + EXYNOS_5250_USBOTGSYS); in exynos5250_power_off()
339 ctrl0 = readl(drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); in exynos5250_power_off()
345 writel(ctrl0, drv->reg_phy + EXYNOS_5250_HOSTPHYCTRL0); in exynos5250_power_off()
355 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL1); in exynos5250_power_off()
356 writel(hsic, drv->reg_phy + EXYNOS_5250_HSICPHYCTRL2); in exynos5250_power_off()