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

Commit 533ab109 authored by Amit Blay's avatar Amit Blay
Browse files

USB: ehci-msm-hsic: Allow enabling only RESET SOF workaround



HSIC PHY has hardware issues related to a race condition between
a SOF packet and RESET, SUSPEND or RESUME events.

There is already a platform_data or DT parameter:
'phy_sof_workaround' which enables all these SOF related workarounds.
But, some hardwares have only RESET SOF issues present. For these
add pdata and DT parameter to enable only RESET SOF workaround.

Change-Id: I87d0626fd6da19e9e77b62833627caba97106086
CRs-fixed: 548153
Signed-off-by: default avatarAmit Blay <ablay@codeaurora.org>
parent 9b5425ed
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -44,7 +44,9 @@ Optional properties :
  suspend, reset and resume.
- qcom,phy-susp-sof-workaround : If present then HSIC PHY has h/w BUG related to
  SOFs while entering SUSPEND. Relevant software workaround is required for the same
  during SUSPEND only.
  during SUSPEND.
- qcom,phy-reset-sof-workaround : If present then HSIC PHY has h/w BUG related to
  SOFs during RESET.
- qcom,pool-64-bit-align: If present then the pool's memory will be aligned
  to 64 bits
- qcom,enable_hbm: if present host bus manager is enabled.
+9 −3
Original line number Diff line number Diff line
@@ -1903,6 +1903,8 @@ struct msm_hsic_host_platform_data *msm_hsic_dt_to_pdata(
					"qcom,disable-internal-clk-gating");
	pdata->phy_susp_sof_workaround = of_property_read_bool(node,
					"qcom,phy-susp-sof-workaround");
	pdata->phy_reset_sof_workaround = of_property_read_bool(node,
					"qcom,phy-reset-sof-workaround");
	pdata->ignore_cal_pad_config = of_property_read_bool(node,
					"hsic,ignore-cal-pad-config");
	of_property_read_u32(node, "hsic,strobe-pad-offset",
@@ -2015,9 +2017,13 @@ static int ehci_hsic_msm_probe(struct platform_device *pdev)
		mehci->ehci.susp_sof_bug = 1;
		mehci->ehci.reset_sof_bug = 1;
		mehci->ehci.resume_sof_bug = 1;
	} else if (pdata->phy_susp_sof_workaround) {
		/* Only SUSP SOF hardware bug exists, rest all not present */
	} else {
		if (pdata->phy_susp_sof_workaround)
			/* SUSP SOF hardware bug exists */
			mehci->ehci.susp_sof_bug = 1;
		if (pdata->phy_reset_sof_workaround)
			/* RESET SOF hardware bug exists */
			mehci->ehci.reset_sof_bug = 1;
	}

	if (pdata->reset_delay)
+5 −1
Original line number Diff line number Diff line
@@ -485,7 +485,10 @@ struct ci13xxx_platform_data {
 *              for msm_hsic_host driver.
 * @phy_sof_workaround: Enable ALL PHY SOF bug related workarounds for
		SUSPEND, RESET and RESUME.
 * @phy_susp_sof_workaround: Enable PHY SOF workaround only for SUSPEND.
 * @phy_susp_sof_workaround: Enable PHY SOF workaround for
 *      SUSPEND.
 * @phy_reset_sof_workaround: Enable PHY SOF workaround for
 *      RESET.
 * @dis_internal_clk_gating: If set, internal clock gating in controller
 *		is disabled.
 *
@@ -497,6 +500,7 @@ struct msm_hsic_host_platform_data {
	bool phy_sof_workaround;
	bool dis_internal_clk_gating;
	bool phy_susp_sof_workaround;
	bool phy_reset_sof_workaround;
	u32 reset_delay;
	int strobe_pad_offset;
	int data_pad_offset;