Disable periodic tracking on Tegra234
Subsystems (4)
cover Disable periodic tracking on Tegra234
Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode and disable periodic tracking on Tegra234
Haotien Hsu (1):
phy: tegra: xusb: Disable periodic tracking on Tegra234
Wayne Chang (1):
phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from
trk_hw_mode
drivers/phy/tegra/xusb-tegra186.c | 16 +++++++++------- drivers/phy/tegra/xusb.h | 1 + 2 files changed, 10 insertions(+), 7 deletions(-)
base-commit: 92a09c47464d040866cf2b4cd052bc60555185fb
Signature · 1 line
2.25.1
PATCH 1/2 phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode
The logic that drives the pad calibration values resides in the controller reset domain and so the calibration values are only being captured when the controller is out of reset. However, by clearing the CYA_TRK_CODE_UPDATE_ON_IDLE bit, the calibration values can be set while the controller is in reset.
The CYA_TRK_CODE_UPDATE_ON_IDLE bit was previously cleared based on the trk_hw_mode flag, but this dependency is not necessary. Instead, introduce a new flag, trk_update_on_idle, to independently control this bit.
--- drivers/phy/tegra/xusb-tegra186.c | 14 ++++++++------ drivers/phy/tegra/xusb.h | 1 + 2 files changed, 9 insertions(+), 6 deletions(-)
drivers/phy/tegra/xusb-tegra186.c +8 -6
@@ -650,14 +650,15 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)udelay (100 ); } -if (padctl->soc->trk_hw_mode) { - value =padctl_readl (padctl,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); - value |=USB2_TRK_HW_MODE ; + value =padctl_readl (padctl,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); +if (padctl->soc->trk_update_on_idle) value &= ~CYA_TRK_CODE_UPDATE_ON_IDLE ; -padctl_writel (padctl, value,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); - }else { +if (padctl->soc->trk_hw_mode) + value |=USB2_TRK_HW_MODE ; +padctl_writel (padctl, value,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); + +if (!padctl->soc->trk_hw_mode)clk_disable_unprepare (priv->usb2_trk_clk); - }mutex_unlock (&padctl->lock); }
@@ -1703,6 +1704,7 @@ const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = { .supports_gen2 = true, .poll_trk_completed = true, .trk_hw_mode = true, + .trk_update_on_idle = true, .supports_lp_cfg_en = true, };EXPORT_SYMBOL_GPL (tegra234_xusb_padctl_soc);
drivers/phy/tegra/xusb.h +1 -0
@@ -434,6 +434,7 @@ struct tegra_xusb_padctl_soc {bool need_fake_usb3_port;bool poll_trk_completed;bool trk_hw_mode; +bool trk_update_on_idle;bool supports_lp_cfg_en; };
Signature · 1 line
2.25.1
Jon Hunter
maintainerRe: [PATCH 1/2] phy: tegra: xusb: Decouple CYA_TRK_CODE_UPDATE_ON_IDLE from trk_hw_mode
Hi Wayne,
Quoted 34 lines · Wayne Chang
The logic that drives the pad calibration values resides in the controller reset domain and so the calibration values are only being captured when the controller is out of reset. However, by clearing the
CYA_TRK_CODE_UPDATE_ON_IDLEbit, the calibration values can be set while the controller is in reset.The
CYA_TRK_CODE_UPDATE_ON_IDLEbit was previously cleared based on thetrk_hw_modeflag, but this dependency is not necessary. Instead, introduce a new flag,trk_update_on_idle, to independently control this bit.Fixes d8163a32ca95 ("phy: tegra: xusb: Add Tegra234 support")Signed-off-by Wayne Chang <[email protected]>--- drivers/phy/tegra/xusb-tegra186.c | 14 ++++++++------ drivers/phy/tegra/xusb.h | 1 + 2 files changed, 9 insertions(+), 6 deletions(-)drivers/phy/tegra/xusb-tegra186.c +2
-4@@ -650,14 +650,15 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)udelay (100 ); } -if (padctl->soc->trk_hw_mode) { - value =padctl_readl (padctl,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); - value |=USB2_TRK_HW_MODE ; + value =padctl_readl (padctl,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); +if (padctl->soc->trk_update_on_idle) value &= ~CYA_TRK_CODE_UPDATE_ON_IDLE ; -padctl_writel (padctl, value,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 );
drivers/phy/tegra/xusb-tegra186.c static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl) · line 663
Quoted 10 lines
drivers/phy/tegra/xusb-tegra186.c +5
-2- }else { +if (padctl->soc->trk_hw_mode) + value |=USB2_TRK_HW_MODE ; +padctl_writel (padctl, value,XUSB_PADCTL_USB2_BIAS_PAD_CTL2 ); + +if (!padctl->soc->trk_hw_mode)clk_disable_unprepare (priv->usb2_trk_clk); - }mutex_unlock (&padctl->lock);
Can we rebase this on top of the fix 'phy: tegra: xusb: remove a stray unlock'? This does not apply on top of that patch.
Thanks
Jon
Signature · 1 line
nvpublic
PATCH 2/2 phy: tegra: xusb: Disable periodic tracking on Tegra234
In reply to Wayne ChangFrom: Haotien Hsu <[email protected]>
Periodic calibration updates (~10µs) may overlap with transfers when PCIe NVMe SSD, LPDDR, and USB2 devices operate simultaneously, causing crosstalk on Tegra234 devices. Hence disable periodic calibration updates and make this a one-time calibration.
--- drivers/phy/tegra/xusb-tegra186.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/tegra/xusb-tegra186.c +1 -1
@@ -1703,7 +1703,7 @@ const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc = { .num_supplies = ARRAY_SIZE(tegra194_xusb_padctl_supply_names), .supports_gen2 = true, .poll_trk_completed = true, - .trk_hw_mode = true, + .trk_hw_mode = false, .trk_update_on_idle = true, .supports_lp_cfg_en = true, };
Signature · 1 line
2.25.1