Loading Documentation/devicetree/bindings/usb/msm-ssusb.txt +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ Optional properties : runtimePM state of host. - qcom,psy-not-used: If present then driver won't be registering usb power_supply. Without usb_psy, user should be able to change modes using sysfs. - qcom,usb-core-id: Differentiates between primary and secondary controller. Sub nodes: - Sub node for "DWC3- USB3 controller". Loading drivers/usb/dwc3/core.c +6 −0 Original line number Diff line number Diff line Loading @@ -783,6 +783,7 @@ static int dwc3_probe(struct platform_device *pdev) u8 lpm_nyet_threshold; u8 hird_threshold; u32 num_evt_buffs; u32 core_id; int irq; int ret; Loading Loading @@ -896,6 +897,11 @@ static int dwc3_probe(struct platform_device *pdev) if (!ret) dwc->num_gsi_event_buffers = num_evt_buffs; ret = of_property_read_u32(node, "qcom,usb-core-id", &core_id); if (!ret) dwc->core_id = core_id; if (dwc->enable_bus_suspend) { pm_runtime_set_autosuspend_delay(dev, 500); pm_runtime_use_autosuspend(dev); Loading drivers/usb/dwc3/core.h +1 −0 Original line number Diff line number Diff line Loading @@ -881,6 +881,7 @@ struct dwc3 { u32 num_event_buffers; u32 num_normal_event_buffers; u32 num_gsi_event_buffers; u32 core_id; u32 u1; u32 u1u2; Loading drivers/usb/dwc3/dwc3-msm.c +10 −0 Original line number Diff line number Diff line Loading @@ -3249,6 +3249,16 @@ static int dwc3_msm_probe(struct platform_device *pdev) dwc3_ext_event_notify(mdwc); } /* If the controller is in DRD mode and USB power supply * is not used make the default mode of contoller as HOST * mode. User can change it later using sysfs */ if (dwc->is_drd && mdwc->psy_not_used) { dev_dbg(&pdev->dev, "DWC3 in host mode\n"); mdwc->id_state = DWC3_ID_GROUND; dwc3_ext_event_notify(mdwc); } return 0; put_dwc3: Loading drivers/usb/dwc3/gadget.c +3 −0 Original line number Diff line number Diff line Loading @@ -3690,6 +3690,9 @@ int dwc3_gadget_init(struct dwc3 *dwc) * sure we're starting from a well known location. */ dwc->gadget.usb_core_id = dwc->core_id; dev_dbg(dwc->dev, "%s core_id : %d\n", __func__, dwc->core_id); ret = dwc3_gadget_init_endpoints(dwc); if (ret) goto err4; Loading Loading
Documentation/devicetree/bindings/usb/msm-ssusb.txt +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ Optional properties : runtimePM state of host. - qcom,psy-not-used: If present then driver won't be registering usb power_supply. Without usb_psy, user should be able to change modes using sysfs. - qcom,usb-core-id: Differentiates between primary and secondary controller. Sub nodes: - Sub node for "DWC3- USB3 controller". Loading
drivers/usb/dwc3/core.c +6 −0 Original line number Diff line number Diff line Loading @@ -783,6 +783,7 @@ static int dwc3_probe(struct platform_device *pdev) u8 lpm_nyet_threshold; u8 hird_threshold; u32 num_evt_buffs; u32 core_id; int irq; int ret; Loading Loading @@ -896,6 +897,11 @@ static int dwc3_probe(struct platform_device *pdev) if (!ret) dwc->num_gsi_event_buffers = num_evt_buffs; ret = of_property_read_u32(node, "qcom,usb-core-id", &core_id); if (!ret) dwc->core_id = core_id; if (dwc->enable_bus_suspend) { pm_runtime_set_autosuspend_delay(dev, 500); pm_runtime_use_autosuspend(dev); Loading
drivers/usb/dwc3/core.h +1 −0 Original line number Diff line number Diff line Loading @@ -881,6 +881,7 @@ struct dwc3 { u32 num_event_buffers; u32 num_normal_event_buffers; u32 num_gsi_event_buffers; u32 core_id; u32 u1; u32 u1u2; Loading
drivers/usb/dwc3/dwc3-msm.c +10 −0 Original line number Diff line number Diff line Loading @@ -3249,6 +3249,16 @@ static int dwc3_msm_probe(struct platform_device *pdev) dwc3_ext_event_notify(mdwc); } /* If the controller is in DRD mode and USB power supply * is not used make the default mode of contoller as HOST * mode. User can change it later using sysfs */ if (dwc->is_drd && mdwc->psy_not_used) { dev_dbg(&pdev->dev, "DWC3 in host mode\n"); mdwc->id_state = DWC3_ID_GROUND; dwc3_ext_event_notify(mdwc); } return 0; put_dwc3: Loading
drivers/usb/dwc3/gadget.c +3 −0 Original line number Diff line number Diff line Loading @@ -3690,6 +3690,9 @@ int dwc3_gadget_init(struct dwc3 *dwc) * sure we're starting from a well known location. */ dwc->gadget.usb_core_id = dwc->core_id; dev_dbg(dwc->dev, "%s core_id : %d\n", __func__, dwc->core_id); ret = dwc3_gadget_init_endpoints(dwc); if (ret) goto err4; Loading