Skip to content

Commit a48f744

Browse files
nealfragergregkh
authored andcommitted
usb: dwc3: xilinx: make sure pipe clock is deselected in usb2 only mode
When the USB3 PHY is not defined in the Linux device tree, there could still be a case where there is a USB3 PHY active on the board and enabled by the first stage bootloader. If serdes clock is being used then the USB will fail to enumerate devices in 2.0 only mode. To solve this, make sure that the PIPE clock is deselected whenever the USB3 PHY is not defined and guarantees that the USB2 only mode will work in all cases. Fixes: 9678f33 ("usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode") Cc: [email protected] Signed-off-by: Neal Frager <[email protected]> Signed-off-by: Radhey Shyam Pandey <[email protected]> Acked-by: Peter Korsgaard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d2ec94f commit a48f744

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/usb/dwc3/dwc3-xilinx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data)
121121
* in use but the usb3-phy entry is missing from the device tree.
122122
* Therefore, skip these operations in this case.
123123
*/
124-
if (!priv_data->usb3_phy)
124+
if (!priv_data->usb3_phy) {
125+
/* Deselect the PIPE Clock Select bit in FPD PIPE Clock register */
126+
writel(PIPE_CLK_DESELECT, priv_data->regs + XLNX_USB_FPD_PIPE_CLK);
125127
goto skip_usb3_phy;
128+
}
126129

127130
crst = devm_reset_control_get_exclusive(dev, "usb_crst");
128131
if (IS_ERR(crst)) {

0 commit comments

Comments
 (0)