Lines Matching refs:usbphyc_phy
333 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_init() local
334 struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; in stm32_usbphyc_phy_init()
335 u32 reg_mon = STM32_USBPHYC_MONITOR(usbphyc_phy->index); in stm32_usbphyc_phy_init()
356 usbphyc_phy->active = true; in stm32_usbphyc_phy_init()
366 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_exit() local
367 struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; in stm32_usbphyc_phy_exit()
369 usbphyc_phy->active = false; in stm32_usbphyc_phy_exit()
376 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_power_on() local
378 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_on()
379 return regulator_enable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_on()
386 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_power_off() local
388 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_off()
389 return regulator_disable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_off()
460 struct stm32_usbphyc_phy *usbphyc_phy = usbphyc->phys[index]; in stm32_usbphyc_phy_tuning() local
472 usbphyc_phy->tune |= INCURREN | FIELD_PREP(INCURRINT, val); in stm32_usbphyc_phy_tuning()
479 usbphyc_phy->tune |= LFSCAPEN; in stm32_usbphyc_phy_tuning()
482 usbphyc_phy->tune |= HSDRVSLEW; in stm32_usbphyc_phy_tuning()
488 usbphyc_phy->tune |= HSDRVDCCUR; in stm32_usbphyc_phy_tuning()
491 usbphyc_phy->tune |= HSDRVCURINCR | FIELD_PREP(HSDRVDCLEV, val); in stm32_usbphyc_phy_tuning()
499 usbphyc_phy->tune |= FSDRVRFADJ; in stm32_usbphyc_phy_tuning()
502 usbphyc_phy->tune |= HSDRVRFRED; in stm32_usbphyc_phy_tuning()
507 usbphyc_phy->tune |= FIELD_PREP(HSDRVCHKITRM, val); in stm32_usbphyc_phy_tuning()
515 usbphyc_phy->tune |= FIELD_PREP(HSDRVCHKZTRM, val); in stm32_usbphyc_phy_tuning()
523 usbphyc_phy->tune |= FIELD_PREP(SQLCHCTL, val); in stm32_usbphyc_phy_tuning()
529 usbphyc_phy->tune |= HDRXGNEQEN; in stm32_usbphyc_phy_tuning()
534 usbphyc_phy->tune |= FIELD_PREP(HSRXOFF, val); in stm32_usbphyc_phy_tuning()
540 usbphyc_phy->tune |= HSFALLPREEM; in stm32_usbphyc_phy_tuning()
543 usbphyc_phy->tune |= SHTCCTCTLPROT; in stm32_usbphyc_phy_tuning()
546 usbphyc_phy->tune |= STAGSEL; in stm32_usbphyc_phy_tuning()
549 usbphyc_phy->tune |= FIELD_PREP(OTPCOMP, otpcomp); in stm32_usbphyc_phy_tuning()
555 writel_relaxed(usbphyc_phy->tune, usbphyc->base + reg); in stm32_usbphyc_phy_tuning()
574 struct stm32_usbphyc_phy *usbphyc_phy = NULL; in stm32_usbphyc_of_xlate() local
580 usbphyc_phy = usbphyc->phys[port]; in stm32_usbphyc_of_xlate()
584 if (!usbphyc_phy) { in stm32_usbphyc_of_xlate()
589 if (((usbphyc_phy->index == 0) && (args->args_count != 0)) || in stm32_usbphyc_of_xlate()
590 ((usbphyc_phy->index == 1) && (args->args_count != 1))) { in stm32_usbphyc_of_xlate()
592 usbphyc_phy->index); in stm32_usbphyc_of_xlate()
597 if (usbphyc_phy->index == 1) { in stm32_usbphyc_of_xlate()
608 return usbphyc_phy->phy; in stm32_usbphyc_of_xlate()
690 struct stm32_usbphyc_phy *usbphyc_phy; in stm32_usbphyc_probe() local
703 usbphyc_phy = devm_kzalloc(dev, sizeof(*usbphyc_phy), in stm32_usbphyc_probe()
705 if (!usbphyc_phy) { in stm32_usbphyc_probe()
716 usbphyc->phys[port] = usbphyc_phy; in stm32_usbphyc_probe()
718 phy_set_drvdata(phy, usbphyc_phy); in stm32_usbphyc_probe()
787 struct stm32_usbphyc_phy *usbphyc_phy; in stm32_usbphyc_resume() local
794 usbphyc_phy = usbphyc->phys[port]; in stm32_usbphyc_resume()
795 writel_relaxed(usbphyc_phy->tune, usbphyc->base + STM32_USBPHYC_TUNE(port)); in stm32_usbphyc_resume()