]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
dt-bindings: phy-qcom-qmp: Add UFS PHY reset
authorEvan Green <evgreen@chromium.org>
Thu, 21 Mar 2019 17:17:54 +0000 (10:17 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
BugLink: https://bugs.launchpad.net/bugs/1837517
[ Upstream commit 95cee0b4e30a09a411a17e9a3bc6b72ed92063da ]

Add a required reset to the SDM845 UFS phy to express the PHY reset
bit inside the UFS controller register space. Before this change, this
reset was not expressed in the DT, and the driver utilized two different
callbacks (phy_init and phy_poweron) to implement a two-phase
initialization procedure that involved deasserting this reset between
init and poweron. This abused the two callbacks and diluted their
purpose.

That scheme does not work as regulators cannot be turned off in
phy_poweroff because they were turned on in init, rather than poweron.
The net result is that regulators are left on in suspend that shouldn't
be.

This new scheme gives the UFS reset to the PHY, so that it can fully
initialize itself in a single callback. We can then turn regulators on
during poweron and off during poweroff.

Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt

index 41a1074228ba7df7a626425814104698aedf647c..6b6ca4456dc7c5328e154b9c90901e7d2a05f5a6 100644 (file)
@@ -53,7 +53,8 @@ Required properties:
           one for each entry in reset-names.
  - reset-names: "phy" for reset of phy block,
                "common" for phy common block reset,
-               "cfg" for phy's ahb cfg block reset.
+               "cfg" for phy's ahb cfg block reset,
+               "ufsphy" for the PHY reset in the UFS controller.
 
                For "qcom,ipq8074-qmp-pcie-phy" must contain:
                        "phy", "common".
@@ -65,7 +66,8 @@ Required properties:
                        "phy", "common".
                For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
                        "phy", "common".
-               For "qcom,sdm845-qmp-ufs-phy": no resets are listed.
+               For "qcom,sdm845-qmp-ufs-phy": must contain:
+                       "ufsphy".
 
  - vdda-phy-supply: Phandle to a regulator supply to PHY core block.
  - vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block.