RE: [PATCH 3/4] arm64: dts: imx8mp: Add snps, gfladj-refclk-lpm-sel quirk to USB nodes

From: Jun Li
Date: Thu Sep 08 2022 - 09:51:45 EST




> -----Original Message-----
> From: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
> Sent: Thursday, September 8, 2022 5:39 PM
> To: Jun Li <jun.li@xxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Rob Herring
> <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@xxxxxxxxxx>; Shawn Guo <shawnguo@xxxxxxxxxx>;
> Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>; Pengutronix Kernel Team
> <kernel@xxxxxxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>; dl-linux-imx
> <linux-imx@xxxxxxx>; linux-usb@xxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH 3/4] arm64: dts: imx8mp: Add snps, gfladj-refclk-lpm-sel
> quirk to USB nodes
>
> Am Donnerstag, 8. September 2022, 11:12:23 CEST schrieb Jun Li:
> > > -----Original Message-----
> > > From: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
> > > Sent: Wednesday, September 7, 2022 10:46 PM
> > > To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Rob Herring
> > > <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
> > > <krzysztof.kozlowski+dt@xxxxxxxxxx>; Shawn Guo
> > > <shawnguo@xxxxxxxxxx>; Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>;
> > > Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>; Fabio Estevam
> > > <festevam@xxxxxxxxx>; dl-linux-imx <linux-imx@xxxxxxx>; Jun Li
> > > <jun.li@xxxxxxx>
> > > Cc: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>;
> > > linux-usb@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> > > linux-kernel@xxxxxxxxxxxxxxx
> > > Subject: [PATCH 3/4] arm64: dts: imx8mp: Add
> > > snps,gfladj-refclk-lpm-sel quirk to USB nodes
> > >
> > > With this set the SOF/ITP counter is based on ref_clk when 2.0 ports
> > > are suspended.
> > >
> > > Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
> > > ---
> > >
> > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > index 53493dc7d976..0e7f5842a3e4 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > @@ -1300,6 +1300,7 @@ usb_dwc3_0: usb@38100000 {
> > >
> > > phys = <&usb3_phy0>, <&usb3_phy0>;
> > > phy-names = "usb2-phy", "usb3-
> phy";
> > > snps,dis-u2-freeclk-exists-quirk;
> >
> > So this property can be removed?
>
> I'm not so sure about this one, as the description is talking about USB2
> PHY providing a free-running PHY clock. I don't know the details if this
> is true or not.
> But removing snps,dis-u2-freeclk-exists-quirk from both USB device nodes,
> USB devices attachments are still detected when the USB hub is suspended,
> both super-speed and high-speed ports.

With below change in driver:

- if (dwc->dis_u2_freeclk_exists_quirk)
+ if (dwc->dis_u2_freeclk_exists_quirk || dwc->gfladj_refclk_lpm_sel)
reg &= ~DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS;

DWC3_GUSB2PHYCFG_U2_FREECLK_EXISTS bit can be cleared by new property
snps,gfladj-refclk-lpm-sel-quirk

Li Jun

>
> Best regards,
> Alexander
>
> > > + snps,gfladj-refclk-lpm-sel-quirk;
> > >
> > > };
> > >
> > > };
> > >
> > > @@ -1342,6 +1343,7 @@ usb_dwc3_1: usb@38200000 {
> > >
> > > phys = <&usb3_phy1>, <&usb3_phy1>;
> > > phy-names = "usb2-phy", "usb3-
> phy";
> > > snps,dis-u2-freeclk-exists-quirk;
> >
> > Ditto.
> >
> > Li Jun
> >
> > > + snps,gfladj-refclk-lpm-sel-quirk;
> > >
> > > };
> > >
> > > };
> > >
> > > --
> > > 2.25.1
>
>
>