lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <iik2dnzkw7fxqm3qlzt3vegyoabgefveopdmwzxwejof2ytrho@dbnq2xj5suaw>
Date: Mon, 22 Dec 2025 10:48:32 +0800
From: Xu Yang <xu.yang_2@....com>
To: Frank Li <Frank.li@....com>
Cc: vkoul@...nel.org, neil.armstrong@...aro.org, shawnguo@...nel.org, 
	kernel@...gutronix.de, festevam@...il.com, jun.li@....com, 
	linux-phy@...ts.infradead.org, imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] phy: fsl-imx8mq-usb: enable RxTermination_override_sel

On Fri, Dec 19, 2025 at 10:52:30AM -0500, Frank Li wrote:
> On Fri, Dec 19, 2025 at 04:30:04PM +0800, Xu Yang wrote:
> > This is to resolve the problem of wakeup system by USB3 device
> > insertion if HSIOMIX on, in that case, the USB3 device detects
> 
> Do you means USB3 device wrong regconized as USB2?

No. This patch is to support wakeup by connecting an usb3 device.

If the HSIOMIX power is OFF during the system suspend, the USB3 device
will downgrade to High-speed because the link training does not
happen at all. Then DPDM wakeup can be triggered. 
Otherwise, the USB3 device will still work at SuperSpeed, but the connect
wakeup (different one from DPDM) can't be triggered because the 24MHz OSC
clock is required to be on. Therefore the system can't be waken up.

> 
> > RX term on so doesn't downgrade to USB2, so DP/DM wakeup can't
> > happen, with this override bit we can force the RX term off when
> > enters system suspend, and disable the override after system resume.
> 
> Enable RxTermination_override_sel to resolve the problem, which wrong
> regongized as USB 2.0 device if USB3 device plug-in when HSIOMIX ON.
> 
> No clear why force RX term Off can resolve problem. Please rephrase it.

Force RX term off will force the USB3 device works at high-speed from the
beginning. Then it will switch to super-speed when the host reset it after
system resume. OK, I will rephrase it.

Thanks,
Xu Yang

> 
> Frank
> 
> >
> > Signed-off-by: Li Jun <jun.li@....com>
> > Signed-off-by: Xu Yang <xu.yang_2@....com>
> > ---
> >  drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > index 02d9af409b08..0831ed465775 100644
> > --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > @@ -52,6 +52,7 @@
> >  #define PHY_CTRL5_PCS_TX_SWING_FULL_MASK	GENMASK(6, 0)
> >
> >  #define PHY_CTRL6			0x18
> > +#define PHY_CTRL6_RXTERM_OVERRIDE_SEL	BIT(29)
> >  #define PHY_CTRL6_ALT_CLK_EN		BIT(1)
> >  #define PHY_CTRL6_ALT_CLK_SEL		BIT(0)
> >
> > @@ -847,6 +848,7 @@ static int imx8mp_usb_phy_init(struct phy *phy)
> >  static int imx8mq_phy_power_on(struct phy *phy)
> >  {
> >  	struct imx8mq_usb_phy *imx_phy = phy_get_drvdata(phy);
> > +	u32 value;
> >  	int ret;
> >
> >  	ret = regulator_enable(imx_phy->vbus);
> > @@ -863,12 +865,23 @@ static int imx8mq_phy_power_on(struct phy *phy)
> >  		return ret;
> >  	}
> >
> > -	return ret;
> > +	/* Disable rx term override */
> > +	value = readl(imx_phy->base + PHY_CTRL6);
> > +	value &= ~PHY_CTRL6_RXTERM_OVERRIDE_SEL;
> > +	writel(value, imx_phy->base + PHY_CTRL6);
> > +
> > +	return 0;
> >  }
> >
> >  static int imx8mq_phy_power_off(struct phy *phy)
> >  {
> >  	struct imx8mq_usb_phy *imx_phy = phy_get_drvdata(phy);
> > +	u32 value;
> > +
> > +	/* Override rx term to be 0 */
> > +	value = readl(imx_phy->base + PHY_CTRL6);
> > +	value |= PHY_CTRL6_RXTERM_OVERRIDE_SEL;
> > +	writel(value, imx_phy->base + PHY_CTRL6);
> >
> >  	clk_disable_unprepare(imx_phy->alt_clk);
> >  	clk_disable_unprepare(imx_phy->clk);
> > --
> > 2.34.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ