Loading Documentation/devicetree/bindings/usb/dwc3.txt +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ Optional properties: is used. By default, the half-full setting is used. - core_reset_after_phy_init: If present, PHY reset and initialization is performed before core reset. - snps,hsphy-auto-suspend-disable: If present, auto suspend feature is not enabled with hsusb phy. This is usually a subnode to DWC3 glue to which it is connected. Loading drivers/usb/dwc3/core.c +7 −3 Original line number Diff line number Diff line Loading @@ -104,10 +104,12 @@ void dwc3_set_mode(struct dwc3 *dwc, u32 mode) reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); reg |= DWC3_GUSB3PIPECTL_SUSPHY; dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); if (!dwc->hsphy_auto_suspend_disable) { reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); reg |= DWC3_GUSB2PHYCFG_SUSPHY; dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); } } /** * dwc3_core_soft_reset_after_phy_init - Issues core soft reset Loading Loading @@ -594,6 +596,8 @@ static int dwc3_probe(struct platform_device *pdev) dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); host_only_mode = of_property_read_bool(node, "host-only-mode"); dwc->hsphy_auto_suspend_disable = of_property_read_bool(node, "snps,hsphy-auto-suspend-disable"); dwc->maximum_speed = of_usb_get_maximum_speed(node); if (node) { Loading drivers/usb/dwc3/core.h +1 −0 Original line number Diff line number Diff line Loading @@ -833,6 +833,7 @@ struct dwc3 { bool nominal_elastic_buffer; bool core_reset_after_phy_init; bool err_evt_seen; bool hsphy_auto_suspend_disable; }; /* -------------------------------------------------------------------------- */ Loading drivers/usb/dwc3/dwc3_otg.c +3 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,9 @@ static void dwc3_otg_set_hsphy_auto_suspend(struct dwc3_otg *dotg, bool susp) struct dwc3 *dwc = dotg->dwc; u32 reg; if (dotg->dwc->hsphy_auto_suspend_disable) return; reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); if (susp) reg |= DWC3_GUSB2PHYCFG_SUSPHY; Loading drivers/usb/dwc3/gadget.c +3 −0 Original line number Diff line number Diff line Loading @@ -2503,6 +2503,9 @@ static void dwc3_gadget_usb2_phy_suspend(struct dwc3 *dwc, int suspend) { u32 reg; if (dwc->hsphy_auto_suspend_disable) return; reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); if (suspend) Loading Loading
Documentation/devicetree/bindings/usb/dwc3.txt +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ Optional properties: is used. By default, the half-full setting is used. - core_reset_after_phy_init: If present, PHY reset and initialization is performed before core reset. - snps,hsphy-auto-suspend-disable: If present, auto suspend feature is not enabled with hsusb phy. This is usually a subnode to DWC3 glue to which it is connected. Loading
drivers/usb/dwc3/core.c +7 −3 Original line number Diff line number Diff line Loading @@ -104,10 +104,12 @@ void dwc3_set_mode(struct dwc3 *dwc, u32 mode) reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); reg |= DWC3_GUSB3PIPECTL_SUSPHY; dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); if (!dwc->hsphy_auto_suspend_disable) { reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); reg |= DWC3_GUSB2PHYCFG_SUSPHY; dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); } } /** * dwc3_core_soft_reset_after_phy_init - Issues core soft reset Loading Loading @@ -594,6 +596,8 @@ static int dwc3_probe(struct platform_device *pdev) dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize"); host_only_mode = of_property_read_bool(node, "host-only-mode"); dwc->hsphy_auto_suspend_disable = of_property_read_bool(node, "snps,hsphy-auto-suspend-disable"); dwc->maximum_speed = of_usb_get_maximum_speed(node); if (node) { Loading
drivers/usb/dwc3/core.h +1 −0 Original line number Diff line number Diff line Loading @@ -833,6 +833,7 @@ struct dwc3 { bool nominal_elastic_buffer; bool core_reset_after_phy_init; bool err_evt_seen; bool hsphy_auto_suspend_disable; }; /* -------------------------------------------------------------------------- */ Loading
drivers/usb/dwc3/dwc3_otg.c +3 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,9 @@ static void dwc3_otg_set_hsphy_auto_suspend(struct dwc3_otg *dotg, bool susp) struct dwc3 *dwc = dotg->dwc; u32 reg; if (dotg->dwc->hsphy_auto_suspend_disable) return; reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); if (susp) reg |= DWC3_GUSB2PHYCFG_SUSPHY; Loading
drivers/usb/dwc3/gadget.c +3 −0 Original line number Diff line number Diff line Loading @@ -2503,6 +2503,9 @@ static void dwc3_gadget_usb2_phy_suspend(struct dwc3 *dwc, int suspend) { u32 reg; if (dwc->hsphy_auto_suspend_disable) return; reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); if (suspend) Loading