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

Commit 49e96122 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: add support to skip power collapse"

parents 4ebd6d4e dcc2087a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ Optional properties :
- qcom,usb-dbm : phandle for the DBM device
- qcom,usbin-vadc: Corresponding vadc device's phandle to read usbin voltage using VADC.
	This will be used to get value of usb power supply's VOLTAGE_NOW property,
- qcom,no-power-collapse: If present, the USB core will not perform power collapse

Sub nodes:
- Sub node for "DWC3- USB3 controller".
+6 −2
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@ struct dwc3_msm {
	struct completion ext_chg_wait;
	unsigned int scm_dev_id;
	bool suspend_resume_no_support;
	bool disable_power_collapse;
};

#define USB_HSPHY_3P3_VOL_MIN		3050000 /* uV */
@@ -1457,7 +1458,7 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
	wmb();

	/* remove vote for controller power collapse */
	if (!host_bus_suspend)
	if (!host_bus_suspend && !mdwc->disable_power_collapse)
		dwc3_msm_config_gdsc(mdwc, 0);

	clk_disable_unprepare(mdwc->iface_clk);
@@ -1540,7 +1541,7 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
	}

	/* add vote for controller power collapse */
	if (!host_bus_suspend)
	if (!host_bus_suspend && !mdwc->disable_power_collapse)
		dwc3_msm_config_gdsc(mdwc, 1);

	clk_prepare_enable(mdwc->utmi_clk);
@@ -2436,6 +2437,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)

	mdwc->suspend_resume_no_support = of_property_read_bool(node,
				"qcom,no-suspend-resume");

	mdwc->disable_power_collapse = of_property_read_bool(node,
				"qcom,no-power-collapse");
	/*
	 * DWC3 has separate IRQ line for OTG events (ID/BSV) and for
	 * DP and DM linestate transitions during low power mode.