Skip to content

Commit a9400f1

Browse files
nxpfrankligregkh
authored andcommitted
usb: dwc3: imx8mp: add 2 software managed quirk properties for host mode
Add 2 software manage quirk properties (xhci-missing-cas-quirk and xhci-skip-phy-init-quirk) for xhci host. dwc3 driver have PHY management to cover both device and host mode, so add xhci-skip-phy-init-quirk to skip PHY management from HCD core. Cold Attach Status (CAS) bit can't be set at i.MX8MP after resume from suspend state. So set xhci-missing-cas-quirk. Signed-off-by: Frank Li <[email protected]> Acked-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a6cd2b3 commit a9400f1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/usb/dwc3/dwc3-imx8mp.c

+18
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx)
145145
return IRQ_HANDLED;
146146
}
147147

148+
static int dwc3_imx8mp_set_software_node(struct device *dev)
149+
{
150+
struct property_entry props[3] = { 0 };
151+
int prop_idx = 0;
152+
153+
props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-missing-cas-quirk");
154+
props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk");
155+
156+
return device_create_managed_software_node(dev, props, NULL);
157+
}
158+
148159
static int dwc3_imx8mp_probe(struct platform_device *pdev)
149160
{
150161
struct device *dev = &pdev->dev;
@@ -207,6 +218,13 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
207218
if (err < 0)
208219
goto disable_rpm;
209220

221+
err = dwc3_imx8mp_set_software_node(dev);
222+
if (err) {
223+
err = -ENODEV;
224+
dev_err(dev, "failed to create software node\n");
225+
goto disable_rpm;
226+
}
227+
210228
err = of_platform_populate(node, NULL, NULL, dev);
211229
if (err) {
212230
dev_err(&pdev->dev, "failed to create dwc3 core\n");

0 commit comments

Comments
 (0)