usb: dwc3: Select 2.0 or 3.0 clk base on maximum_speed
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Tue, 16 Apr 2024 23:11:20 +0000 (23:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Apr 2024 14:47:36 +0000 (16:47 +0200)
commit606c096adc7995fcfc707210e4e051717eb0b3c1
treed5f80dff65a4e18875bad2c6ed54870792f16f25
parent3d1b6c9d47707d6a0f80bb5db6473b1f107b5baf
usb: dwc3: Select 2.0 or 3.0 clk base on maximum_speed

The dwc->maximum_speed is determined through the device capability and
designer's constraint through device tree binding. If none of them
applies, don't let the default coreConsultant setting in GUCTL1 to limit
the device operating speed.

Normally the default setting will not contradict the device capability
or device tree binding. This scenario was found through our internal
tests, not an actual bug in the wild.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/65003b0cc37c08a0d22996009f548247ad18c00c.1713308949.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c