Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05404c55 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "phy: msm: ssusb: Power down SSPHY to avoid leakage in probe()"

parents b1d11130 bdda9ac5
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ Optional properties:
- qcom,vbus-valid-override: If present, indicates VBUS pin is not connected to
- qcom,vbus-valid-override: If present, indicates VBUS pin is not connected to
the USB PHY and the controller must rely on external VBUS notification in
the USB PHY and the controller must rely on external VBUS notification in
order to manually relay the notification to the SSPHY.
order to manually relay the notification to the SSPHY.
-qcom,keep-powerdown: If present, power down the SSPHY to avoid leakage current.


Example:
Example:
ssphy@f9200000 {
ssphy@f9200000 {
+11 −0
Original line number Original line Diff line number Diff line
@@ -402,6 +402,17 @@ static int msm_ssphy_probe(struct platform_device *pdev)
	if (of_property_read_bool(dev->of_node, "qcom,vbus-valid-override"))
	if (of_property_read_bool(dev->of_node, "qcom,vbus-valid-override"))
		phy->phy.flags |= PHY_VBUS_VALID_OVERRIDE;
		phy->phy.flags |= PHY_VBUS_VALID_OVERRIDE;


	/* Power down PHY to avoid leakage at 1.8V LDO */
	if (of_property_read_bool(dev->of_node, "qcom,keep-powerdown")) {
		msm_ssusb_ldo_enable(phy, 1);
		msm_ssusb_enable_clocks(phy);
		msm_usb_write_readback(phy->base, SS_PHY_CTRL4,
					TEST_POWERDOWN, TEST_POWERDOWN);
		msm_ssusb_disable_clocks(phy);
		msm_ssusb_ldo_enable(phy, 0);
		msm_ssusb_config_vdd(phy, 0);
	}

	phy->phy.init			= msm_ssphy_init;
	phy->phy.init			= msm_ssphy_init;
	phy->phy.set_suspend		= msm_ssphy_set_suspend;
	phy->phy.set_suspend		= msm_ssphy_set_suspend;
	phy->phy.notify_connect		= msm_ssphy_notify_connect;
	phy->phy.notify_connect		= msm_ssphy_notify_connect;