linux/drivers/phy/qualcomm
Evan Green 3f6d1767b1 phy: ufs-qcom: Refactor all init steps into phy_poweron
The phy code was using implicit sequencing between the PHY driver
and the UFS driver to implement certain hardware requirements.
Specifically, the PHY reset register in the UFS controller needs
to be deasserted before serdes start occurs in the PHY.

Before this change, the code was doing this by utilizing the two
phy callbacks, phy_init() and phy_poweron(), as "init step 1" and
"init step 2", where the UFS driver would deassert reset between
these two steps.

This makes it challenging to power off the regulators in suspend,
as regulators are initialized in init, not in poweron(), but only
poweroff() is called during suspend, not exit().

For UFS, move the actual firing up of the PHY to phy_poweron() and
phy_poweroff() callbacks, rather than init()/exit(). UFS calls
phy_poweroff() during suspend, so now all clocks and regulators for
the phy can be powered down during suspend.

QMP is a little tricky because the PHY is also shared with PCIe and
USB3, which have their own definitions for init() and poweron(). Rename
the meaty functions to _enable() and _disable() to disentangle from the
PHY core names, and then create two different ops structures: one for
UFS and one for the other PHY types.

In phy-qcom-ufs, remove the 'is_powered_on' and 'is_started' guards,
as the generic PHY code does the reference counting. The
14/20nm-specific init functions get collapsed into the generic power_on()
function, with the addition of a calibrate() callback specific to 14/20nm.

Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2019-04-17 14:12:57 +05:30
..
Kconfig phy: qcom-ufs: Declare 20nm qcom ufs qmp phy as Broken 2018-09-26 13:09:38 +05:30
Makefile phy: qcom-ufs: Declare 20nm qcom ufs qmp phy as Broken 2018-09-26 13:09:38 +05:30
phy-ath79-usb.c phy: ath79-usb: Fix the main reset name to match the DT binding 2019-01-16 18:00:57 +05:30
phy-qcom-apq8064-sata.c
phy-qcom-ipq806x-sata.c
phy-qcom-qmp.c phy: ufs-qcom: Refactor all init steps into phy_poweron 2019-04-17 14:12:57 +05:30
phy-qcom-qmp.h phy: qcom-qmp: Add QMP V3 USB3 PHY support for msm8998 2019-02-07 11:10:43 +05:30
phy-qcom-qusb2.c phy: qcom-qusb2: Add QUSB2 PHY support for msm8998 2019-02-07 11:10:44 +05:30
phy-qcom-ufs-i.h phy: ufs-qcom: Refactor all init steps into phy_poweron 2019-04-17 14:12:57 +05:30
phy-qcom-ufs-qmp-14nm.c phy: ufs-qcom: Refactor all init steps into phy_poweron 2019-04-17 14:12:57 +05:30
phy-qcom-ufs-qmp-14nm.h
phy-qcom-ufs-qmp-20nm.c phy: ufs-qcom: Refactor all init steps into phy_poweron 2019-04-17 14:12:57 +05:30
phy-qcom-ufs-qmp-20nm.h
phy-qcom-ufs.c phy: ufs-qcom: Refactor all init steps into phy_poweron 2019-04-17 14:12:57 +05:30
phy-qcom-usb-hs.c phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
phy-qcom-usb-hsic.c