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()
368 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_exit() local
369 struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; in stm32_usbphyc_phy_exit()
371 usbphyc_phy->active = false; in stm32_usbphyc_phy_exit()
378 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_power_on() local
380 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_on()
381 return regulator_enable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_on()
388 struct stm32_usbphyc_phy *usbphyc_phy = phy_get_drvdata(phy); in stm32_usbphyc_phy_power_off() local
390 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_off()
391 return regulator_disable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_off()
462 struct stm32_usbphyc_phy *usbphyc_phy = usbphyc->phys[index]; in stm32_usbphyc_phy_tuning() local
474 usbphyc_phy->tune |= INCURREN | FIELD_PREP(INCURRINT, val); in stm32_usbphyc_phy_tuning()
481 usbphyc_phy->tune |= LFSCAPEN; in stm32_usbphyc_phy_tuning()
484 usbphyc_phy->tune |= HSDRVSLEW; in stm32_usbphyc_phy_tuning()
490 usbphyc_phy->tune |= HSDRVDCCUR; in stm32_usbphyc_phy_tuning()
493 usbphyc_phy->tune |= HSDRVCURINCR | FIELD_PREP(HSDRVDCLEV, val); in stm32_usbphyc_phy_tuning()
501 usbphyc_phy->tune |= FSDRVRFADJ; in stm32_usbphyc_phy_tuning()
504 usbphyc_phy->tune |= HSDRVRFRED; in stm32_usbphyc_phy_tuning()
509 usbphyc_phy->tune |= FIELD_PREP(HSDRVCHKITRM, val); in stm32_usbphyc_phy_tuning()
517 usbphyc_phy->tune |= FIELD_PREP(HSDRVCHKZTRM, val); in stm32_usbphyc_phy_tuning()
525 usbphyc_phy->tune |= FIELD_PREP(SQLCHCTL, val); in stm32_usbphyc_phy_tuning()
531 usbphyc_phy->tune |= HDRXGNEQEN; in stm32_usbphyc_phy_tuning()
536 usbphyc_phy->tune |= FIELD_PREP(HSRXOFF, val); in stm32_usbphyc_phy_tuning()
542 usbphyc_phy->tune |= HSFALLPREEM; in stm32_usbphyc_phy_tuning()
545 usbphyc_phy->tune |= SHTCCTCTLPROT; in stm32_usbphyc_phy_tuning()
548 usbphyc_phy->tune |= STAGSEL; in stm32_usbphyc_phy_tuning()
551 usbphyc_phy->tune |= FIELD_PREP(OTPCOMP, otpcomp); in stm32_usbphyc_phy_tuning()
557 writel_relaxed(usbphyc_phy->tune, usbphyc->base + reg); in stm32_usbphyc_phy_tuning()
576 struct stm32_usbphyc_phy *usbphyc_phy = NULL; in stm32_usbphyc_of_xlate() local
582 usbphyc_phy = usbphyc->phys[port]; in stm32_usbphyc_of_xlate()
586 if (!usbphyc_phy) { in stm32_usbphyc_of_xlate()
591 if (((usbphyc_phy->index == 0) && (args->args_count != 0)) || in stm32_usbphyc_of_xlate()
592 ((usbphyc_phy->index == 1) && (args->args_count != 1))) { in stm32_usbphyc_of_xlate()
594 usbphyc_phy->index); in stm32_usbphyc_of_xlate()
599 if (usbphyc_phy->index == 1) { in stm32_usbphyc_of_xlate()
610 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()
718 usbphyc->phys[port] = usbphyc_phy; in stm32_usbphyc_probe()
720 phy_set_drvdata(phy, usbphyc_phy); in stm32_usbphyc_probe()
789 struct stm32_usbphyc_phy *usbphyc_phy; in stm32_usbphyc_resume() local
796 usbphyc_phy = usbphyc->phys[port]; in stm32_usbphyc_resume()
797 writel_relaxed(usbphyc_phy->tune, usbphyc->base + STM32_USBPHYC_TUNE(port)); in stm32_usbphyc_resume()