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

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

Merge "usb: dwc3-msm: Keep wakeup IRQs disabled for automotive platforms"

parents 4a6950e5 eb627eb6
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -93,9 +93,6 @@ Optional properties :
	capable DWC3 which does not have extcon handle.
- qcom,default-mode-host: If present, start host mode on probe for an OTG
	capable DWC3 which does not have extcon handle.
- qcom,no-wakeup-from-pm-suspend: If present, there is no need of SS wakeup events via
	pwr_event_irq in system suspend scenario. So in system suspend and hibernation,
	we can suspend the SSPHY.

Sub nodes:
- Sub node for "DWC3- USB3 controller".
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@

&usb3 {
	qcom,ignore-wakeup-src-in-hostmode;
	qcom,no-wakeup-from-pm-suspend;
};

&usb3_extcon {
+4 −10
Original line number Diff line number Diff line
@@ -333,9 +333,6 @@ struct dwc3_msm {

	struct device_node *dwc3_node;
	struct property *num_gsi_eps;

	/* Enable remote wakeup during system suspend */
	bool			enable_wakeup;
};

#define USB_HSPHY_3P3_VOL_MIN		3050000 /* uV */
@@ -2652,7 +2649,7 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc, bool force_power_collapse,
	 * using HS_PHY_IRQ or SS_PHY_IRQ. Hence enable wakeup only in
	 * case of host bus suspend and device bus suspend.
	 */
	if (!(mdwc->lpm_flags & MDWC3_POWER_COLLAPSE)) {
	if (!(mdwc->lpm_flags & MDWC3_POWER_COLLAPSE) && enable_wakeup) {
		if (mdwc->use_pdc_interrupts) {
			enable_usb_pdc_interrupt(mdwc, true);
		} else {
@@ -3936,13 +3933,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)
	/*
	 * On platforms with SS PHY that do not support ss_phy_irq for wakeup
	 * events, use pwr_event_irq for wakeup events in superspeed mode.
	 * But some of these platforms do not need SS wakeup events in system
	 * suspend scenario. Accommodate that case as well.
	 */
	mdwc->use_pwr_event_for_wakeup = dwc->maximum_speed >= USB_SPEED_SUPER
					&& !mdwc->wakeup_irq[SS_PHY_IRQ].irq;
	mdwc->enable_wakeup = !of_property_read_bool(node,
				"qcom,no-wakeup-from-pm-suspend");

	/* IOMMU will be reattached upon each resume/connect */
	if (mdwc->iommu_map)
@@ -4858,7 +4851,8 @@ static int dwc3_msm_pm_suspend(struct device *dev)
		return 0;
	}

	ret = dwc3_msm_suspend(mdwc, false, mdwc->enable_wakeup);
	/* Wakeup not required for automotive/telematics platform host mode */
	ret = dwc3_msm_suspend(mdwc, false, false);
	if (!ret)
		atomic_set(&mdwc->pm_suspended, 1);

@@ -4935,7 +4929,7 @@ static int dwc3_msm_pm_freeze(struct device *dev)
	 * Power collapse the core. Hence call dwc3_msm_suspend with
	 * 'force_power_collapse' set to 'true'.
	 */
	ret = dwc3_msm_suspend(mdwc, true, mdwc->enable_wakeup);
	ret = dwc3_msm_suspend(mdwc, true, false);
	if (!ret)
		atomic_set(&mdwc->pm_suspended, 1);