Loading Documentation/devicetree/bindings/usb/dwc3.txt +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ Optional properties: enable periodic ESS TX threshold. - snps,xhci-imod-value: Interrupt moderation interval for host mode (in increments of 250nsec). - usb-core-id: Differentiates between different controllers present on a device. - <DEPRECATED> tx-fifo-resize: determines if the FIFO *has* to be reallocated. Loading drivers/usb/dwc3/core.c +3 −0 Original line number Diff line number Diff line Loading @@ -1130,6 +1130,9 @@ static void dwc3_get_properties(struct dwc3 *dwc) device_property_read_u32(dev, "snps,xhci-imod-value", &dwc->xhci_imod_value); dwc->core_id = -1; device_property_read_u32(dev, "usb-core-id", &dwc->core_id); dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); device_property_read_u8(dev, "snps,rx-thr-num-pkt-prd", Loading drivers/usb/dwc3/core.h +2 −0 Original line number Diff line number Diff line Loading @@ -987,6 +987,7 @@ struct dwc3_scratchpad_array { * @imod_interval: set the interrupt moderation interval in 250ns * increments or 0 to disable. * @xhci_imod_value: imod value to use with xhci * @core_id: usb core id to differentiate different controller */ struct dwc3 { struct work_struct drd_work; Loading Loading @@ -1157,6 +1158,7 @@ struct dwc3 { u16 imod_interval; u32 xhci_imod_value; int core_id; }; #define work_to_dwc(w) (container_of((w), struct dwc3, drd_work)) Loading drivers/usb/dwc3/host.c +11 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) return irq; } #define NUMBER_OF_PROPS 4 #define NUMBER_OF_PROPS 5 int dwc3_host_init(struct dwc3 *dwc) { struct property_entry props[NUMBER_OF_PROPS]; Loading @@ -54,6 +54,7 @@ int dwc3_host_init(struct dwc3 *dwc) struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); int prop_idx = 0; struct property_entry imod_prop; struct property_entry core_id_prop; irq = dwc3_host_get_irq(dwc); if (irq < 0) Loading Loading @@ -104,6 +105,15 @@ int dwc3_host_init(struct dwc3 *dwc) props[prop_idx++] = imod_prop; } if (dwc->core_id >= 0) { core_id_prop.name = "usb-core-id"; core_id_prop.length = sizeof(u32); core_id_prop.is_array = false; core_id_prop.type = DEV_PROP_U32; core_id_prop.value.u32_data = dwc->core_id; props[prop_idx++] = core_id_prop; } /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation * where Port Disable command doesn't work. Loading drivers/usb/host/xhci-plat.c +3 −0 Original line number Diff line number Diff line Loading @@ -313,6 +313,9 @@ static int xhci_plat_probe(struct platform_device *pdev) device_property_read_u32(&pdev->dev, "imod-interval-ns", &xhci->imod_interval); if (device_property_read_u32(&pdev->dev, "usb-core-id", &xhci->core_id)) xhci->core_id = -EINVAL; hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); if (IS_ERR(hcd->usb_phy)) { ret = PTR_ERR(hcd->usb_phy); Loading Loading
Documentation/devicetree/bindings/usb/dwc3.txt +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ Optional properties: enable periodic ESS TX threshold. - snps,xhci-imod-value: Interrupt moderation interval for host mode (in increments of 250nsec). - usb-core-id: Differentiates between different controllers present on a device. - <DEPRECATED> tx-fifo-resize: determines if the FIFO *has* to be reallocated. Loading
drivers/usb/dwc3/core.c +3 −0 Original line number Diff line number Diff line Loading @@ -1130,6 +1130,9 @@ static void dwc3_get_properties(struct dwc3 *dwc) device_property_read_u32(dev, "snps,xhci-imod-value", &dwc->xhci_imod_value); dwc->core_id = -1; device_property_read_u32(dev, "usb-core-id", &dwc->core_id); dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); device_property_read_u8(dev, "snps,rx-thr-num-pkt-prd", Loading
drivers/usb/dwc3/core.h +2 −0 Original line number Diff line number Diff line Loading @@ -987,6 +987,7 @@ struct dwc3_scratchpad_array { * @imod_interval: set the interrupt moderation interval in 250ns * increments or 0 to disable. * @xhci_imod_value: imod value to use with xhci * @core_id: usb core id to differentiate different controller */ struct dwc3 { struct work_struct drd_work; Loading Loading @@ -1157,6 +1158,7 @@ struct dwc3 { u16 imod_interval; u32 xhci_imod_value; int core_id; }; #define work_to_dwc(w) (container_of((w), struct dwc3, drd_work)) Loading
drivers/usb/dwc3/host.c +11 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) return irq; } #define NUMBER_OF_PROPS 4 #define NUMBER_OF_PROPS 5 int dwc3_host_init(struct dwc3 *dwc) { struct property_entry props[NUMBER_OF_PROPS]; Loading @@ -54,6 +54,7 @@ int dwc3_host_init(struct dwc3 *dwc) struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); int prop_idx = 0; struct property_entry imod_prop; struct property_entry core_id_prop; irq = dwc3_host_get_irq(dwc); if (irq < 0) Loading Loading @@ -104,6 +105,15 @@ int dwc3_host_init(struct dwc3 *dwc) props[prop_idx++] = imod_prop; } if (dwc->core_id >= 0) { core_id_prop.name = "usb-core-id"; core_id_prop.length = sizeof(u32); core_id_prop.is_array = false; core_id_prop.type = DEV_PROP_U32; core_id_prop.value.u32_data = dwc->core_id; props[prop_idx++] = core_id_prop; } /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation * where Port Disable command doesn't work. Loading
drivers/usb/host/xhci-plat.c +3 −0 Original line number Diff line number Diff line Loading @@ -313,6 +313,9 @@ static int xhci_plat_probe(struct platform_device *pdev) device_property_read_u32(&pdev->dev, "imod-interval-ns", &xhci->imod_interval); if (device_property_read_u32(&pdev->dev, "usb-core-id", &xhci->core_id)) xhci->core_id = -EINVAL; hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); if (IS_ERR(hcd->usb_phy)) { ret = PTR_ERR(hcd->usb_phy); Loading