phy: tegra: xusb: Fix UTMI AO sleepwalk trigger programming sequence
Subsystems (4)
PATCH 1/1 phy: tegra: xusb: Fix UTMI AO sleepwalk trigger programming sequence
From: Haotien Hsu <[email protected]>
The UTMIP sleepwalk programming sequence requires asserting both LINEVAL_WALK_EN and WAKE_WALK_EN when enabling the sleepwalk logic. However, the current code mistakenly cleared WAKE_WALK_EN, which prevents the sleepwalk trigger from operating correctly.
Fix this by asserting WAKE_WALK_EN together with LINEVAL_WALK_EN.
--- drivers/phy/tegra/xusb-tegra186.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/phy/tegra/xusb-tegra186.c +1 -2
@@ -401,8 +401,7 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,/* enable the trigger of the sleepwalk logic */ value =ao_readl (priv,XUSB_AO_UTMIP_SLEEPWALK_CFG (index)); - value |=LINEVAL_WALK_EN ; - value &= ~WAKE_WALK_EN ; + value |=LINEVAL_WALK_EN |WAKE_WALK_EN ;ao_writel (priv, value,XUSB_AO_UTMIP_SLEEPWALK_CFG (index));/* reset the walk pointer and clear the alarm of the sleepwalk logic,
Signature · 1 line
2.25.1
JC Kuo
maintainerHi Wayne
Quoted 22 lines · Wayne Chang
From: Haotien Hsu <[email protected]>
The UTMIP sleepwalk programming sequence requires asserting both
LINEVAL_WALK_ENandWAKE_WALK_ENwhen enabling the sleepwalk logic. However, the current code mistakenly clearedWAKE_WALK_EN, which prevents the sleepwalk trigger from operating correctly.Fix this by asserting
WAKE_WALK_ENtogether withLINEVAL_WALK_EN.Fixes 1f9cab6cc20c ("phy: tegra: xusb: Add wake/sleepwalk for Tegra186")Signed-off-by Haotien Hsu <[email protected]>Signed-off-by Wayne Chang <[email protected]>--- drivers/phy/tegra/xusb-tegra186.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/phy/tegra/xusb-tegra186.c +0
-0
drivers/phy/tegra/xusb-tegra186.c static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, · line 407
Quoted 9 lines
drivers/phy/tegra/xusb-tegra186.c +1
-2@@ -401,8 +401,7 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,/* enable the trigger of the sleepwalk logic */ value =ao_readl (priv,XUSB_AO_UTMIP_SLEEPWALK_CFG (index)); - value |=LINEVAL_WALK_EN ; - value &= ~WAKE_WALK_EN ; + value |=LINEVAL_WALK_EN |WAKE_WALK_EN ;ao_writel (priv, value,XUSB_AO_UTMIP_SLEEPWALK_CFG (index));/* reset the walk pointer and clear the alarm of the sleepwalk logic,
WAKE_WALK_EN has to be set with '0' according to the ASIC designers. Tegra234 and Tegra239 TRMs have been updated. We will get Tegra264 document updated as well.
Thanks,
JC
Hi JC,
Quoted 33 lines · Jui Chang Kuo
Hi Wayne
Quoted 30 lines · Wayne Chang
From: Haotien Hsu <[email protected]>
The UTMIP sleepwalk programming sequence requires asserting both
LINEVAL_WALK_ENandWAKE_WALK_ENwhen enabling the sleepwalk logic. However, the current code mistakenly clearedWAKE_WALK_EN, which prevents the sleepwalk trigger from operating correctly.Fix this by asserting
WAKE_WALK_ENtogether withLINEVAL_WALK_EN.Fixes 1f9cab6cc20c ("phy: tegra: xusb: Add wake/sleepwalk for Tegra186")Signed-off-by Haotien Hsu <[email protected]>Signed-off-by Wayne Chang <[email protected]>--- drivers/phy/tegra/xusb-tegra186.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/phy/tegra/xusb-tegra186.c +1
-2@@ -401,8 +401,7 @@ static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane,/* enable the trigger of the sleepwalk logic */ value =ao_readl (priv,XUSB_AO_UTMIP_SLEEPWALK_CFG (index)); - value |=LINEVAL_WALK_EN ; - value &= ~WAKE_WALK_EN ; + value |=LINEVAL_WALK_EN |WAKE_WALK_EN ;ao_writel (priv, value,XUSB_AO_UTMIP_SLEEPWALK_CFG (index));
Quoted 3 lines
drivers/phy/tegra/xusb-tegra186.c static int tegra186_utmi_enable_phy_sleepwalk(struct tegra_xusb_lane *lane, · line 407
Quoted 1 line
drivers/phy/tegra/xusb-tegra186.c +0
-0/* reset the walk pointer and clear the alarm of the sleepwalk logic,
WAKE_WALK_ENhas to be set with '0' according to the ASIC designers. Tegra234 and Tegra239 TRMs have been updated. We will get Tegra264 document updated as well.
Thanks for the review. Dropping the change.
Quoted 4 lines
Thanks,
JC