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

Commit b408c40b authored by Ming-yi Lin's avatar Ming-yi Lin Committed by Stephen Boyd
Browse files

USB: EHCI: Add reset delay for QCA6234 HSIC interface



Since it might take 150ms for QCA6234 to initialize from boot code
when receiving HSIC bus reset.

Add delay between the HSIC bus reset and enumeration.

Change-Id: I78520e290e7b7c5e8c686a303cb1cd63bde520ae
Signed-off-by: default avatarMing-yi Lin <mylin@codeaurora.org>
parent a74083cd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -73,6 +73,11 @@ Optional properties :
  programs the CERR  to 3 by default. When this flag is true, CERR is set to
  zero and transaction errors are ignored.

- hsic,reset-delay: If present then add the given delay time (ms) between
  the reset and enumeration. Since some devices might take more than 100ms
  for initialization when receiving the bus reset, add delay to avoid the
  problem that enmueration is before device initialization done.

- Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
  below optional properties:
    - qcom,msm_bus,name
+6 −0
Original line number Diff line number Diff line
@@ -1263,6 +1263,12 @@ static int ehci_hub_control (
			} else {
				ehci_writel(ehci, temp, status_reg);
			}

			if (ehci->reset_delay) {
				spin_unlock_irqrestore(&ehci->lock, flags);
				msleep(ehci->reset_delay);
				spin_lock_irqsave(&ehci->lock, flags);
			}
			break;

		/* For downstream facing ports (these):  one hub port is put
+5 −0
Original line number Diff line number Diff line
@@ -1851,6 +1851,8 @@ struct msm_hsic_host_platform_data *msm_hsic_dt_to_pdata(
					&pdata->strobe_pad_offset);
	of_property_read_u32(node, "hsic,data-pad-offset",
					&pdata->data_pad_offset);
	of_property_read_u32(node, "hsic,reset-delay",
					&pdata->reset_delay);
	of_property_read_u32(node, "hsic,log2-itc",
					&pdata->log2_irq_thresh);
	if (pdata->log2_irq_thresh > 6)
@@ -1955,6 +1957,9 @@ static int ehci_hsic_msm_probe(struct platform_device *pdev)
		mehci->ehci.resume_sof_bug = 1;
	}

	if (pdata->reset_delay)
		mehci->ehci.reset_delay = pdata->reset_delay;

	mehci->ehci.pool_64_bit_align = pdata->pool_64_bit_align;
	mehci->enable_hbm = pdata->enable_hbm;

+1 −0
Original line number Diff line number Diff line
@@ -206,6 +206,7 @@ struct ehci_hcd { /* one per controller */
	unsigned		resume_sof_bug:1;/*Chip Idea HC*/
	unsigned		reset_sof_bug:1; /*Chip Idea HC*/
	bool			disable_cerr;
	u32			reset_delay;

	/* required for usb32 quirk */
	#define OHCI_CTRL_HCFS          (3 << 6)
+1 −0
Original line number Diff line number Diff line
@@ -466,6 +466,7 @@ struct msm_hsic_host_platform_data {
	unsigned data;
	bool ignore_cal_pad_config;
	bool phy_sof_workaround;
	u32 reset_delay;
	int strobe_pad_offset;
	int data_pad_offset;