Lines Matching refs:usbphyc_phy
337 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_init() local
338 struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; in stm32_usbphyc_phy_init()
339 u32 reg_mon = STM32_USBPHYC_MONITOR(usbphyc_phy->index); in stm32_usbphyc_phy_init()
360 usbphyc_phy->active = true; in stm32_usbphyc_phy_init()
372 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_exit() local
373 struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; in stm32_usbphyc_phy_exit()
375 usbphyc_phy->active = false; in stm32_usbphyc_phy_exit()
382 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_power_on() local
384 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_on()
385 return regulator_enable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_on()
392 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_power_off() local
394 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_off()
395 return regulator_disable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_off()
466 struct stm32_usbphyc_phy *usbphyc_phy = usbphyc->phys[index]; in stm32_usbphyc_phy_tuning() local
478 usbphyc_phy->tune |= INCURREN | FIELD_PREP(INCURRINT, val); in stm32_usbphyc_phy_tuning()
485 usbphyc_phy->tune |= LFSCAPEN; in stm32_usbphyc_phy_tuning()
488 usbphyc_phy->tune |= HSDRVSLEW; in stm32_usbphyc_phy_tuning()
494 usbphyc_phy->tune |= HSDRVDCCUR; in stm32_usbphyc_phy_tuning()
497 usbphyc_phy->tune |= HSDRVCURINCR | FIELD_PREP(HSDRVDCLEV, val); in stm32_usbphyc_phy_tuning()
505 usbphyc_phy->tune |= FSDRVRFADJ; in stm32_usbphyc_phy_tuning()
508 usbphyc_phy->tune |= HSDRVRFRED; in stm32_usbphyc_phy_tuning()
513 usbphyc_phy->tune |= FIELD_PREP(HSDRVCHKITRM, val); in stm32_usbphyc_phy_tuning()
521 usbphyc_phy->tune |= FIELD_PREP(HSDRVCHKZTRM, val); in stm32_usbphyc_phy_tuning()
529 usbphyc_phy->tune |= FIELD_PREP(SQLCHCTL, val); in stm32_usbphyc_phy_tuning()
535 usbphyc_phy->tune |= HDRXGNEQEN; in stm32_usbphyc_phy_tuning()
540 usbphyc_phy->tune |= FIELD_PREP(HSRXOFF, val); in stm32_usbphyc_phy_tuning()
546 usbphyc_phy->tune |= HSFALLPREEM; in stm32_usbphyc_phy_tuning()
549 usbphyc_phy->tune |= SHTCCTCTLPROT; in stm32_usbphyc_phy_tuning()
552 usbphyc_phy->tune |= STAGSEL; in stm32_usbphyc_phy_tuning()
555 usbphyc_phy->tune |= FIELD_PREP(OTPCOMP, otpcomp); in stm32_usbphyc_phy_tuning()
561 writel_relaxed(usbphyc_phy->tune, usbphyc->base + reg); in stm32_usbphyc_phy_tuning()
580 struct stm32_usbphyc_phy *usbphyc_phy = NULL; in stm32_usbphyc_of_xlate() local
586 usbphyc_phy = usbphyc->phys[port]; in stm32_usbphyc_of_xlate()
590 if (!usbphyc_phy) { in stm32_usbphyc_of_xlate()
595 if (((usbphyc_phy->index == 0) && (args->args_count != 0)) || in stm32_usbphyc_of_xlate()
596 ((usbphyc_phy->index == 1) && (args->args_count != 1))) { in stm32_usbphyc_of_xlate()
598 usbphyc_phy->index); in stm32_usbphyc_of_xlate()
603 if (usbphyc_phy->index == 1) { in stm32_usbphyc_of_xlate()
614 return usbphyc_phy->phy; in stm32_usbphyc_of_xlate()
694 struct stm32_usbphyc_phy *usbphyc_phy; in stm32_usbphyc_probe() local
707 usbphyc_phy = devm_kzalloc(dev, sizeof(*usbphyc_phy), in stm32_usbphyc_probe()
709 if (!usbphyc_phy) { in stm32_usbphyc_probe()
722 usbphyc->phys[port] = usbphyc_phy; in stm32_usbphyc_probe()
724 phy_set_drvdata(phy, usbphyc_phy); in stm32_usbphyc_probe()
791 struct stm32_usbphyc_phy *usbphyc_phy; in stm32_usbphyc_resume() local
798 usbphyc_phy = usbphyc->phys[port]; in stm32_usbphyc_resume()
799 writel_relaxed(usbphyc_phy->tune, usbphyc->base + STM32_USBPHYC_TUNE(port)); in stm32_usbphyc_resume()