Loading Documentation/devicetree/bindings/usb/dwc3.txt +3 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ Optional properties: this and tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 programming guide section 1.2.3) to enable periodic ESS TX threshold. - snps,xhci-imod-value: Interrupt moderation interval for host mode (in increments of 250nsec). - <DEPRECATED> tx-fifo-resize: determines if the FIFO *has* to be reallocated. Loading @@ -108,4 +110,5 @@ dwc3@4a030000 { reg = <0x4a030000 0xcfff>; interrupts = <0 92 4> usb-phy = <&usb2_phy>, <&usb3,phy>; snps,xhci-imod-value = <4000>; }; drivers/usb/dwc3/core.c +4 −0 Original line number Diff line number Diff line Loading @@ -1126,6 +1126,10 @@ static void dwc3_get_properties(struct dwc3 *dwc) "snps,is-utmi-l1-suspend"); device_property_read_u8(dev, "snps,hird-threshold", &hird_threshold); device_property_read_u32(dev, "snps,xhci-imod-value", &dwc->xhci_imod_value); 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 @@ -986,6 +986,7 @@ struct dwc3_scratchpad_array { * @dis_metastability_quirk: set to disable metastability quirk. * @imod_interval: set the interrupt moderation interval in 250ns * increments or 0 to disable. * @xhci_imod_value: imod value to use with xhci */ struct dwc3 { struct work_struct drd_work; Loading Loading @@ -1155,6 +1156,7 @@ struct dwc3 { unsigned dis_metastability_quirk:1; u16 imod_interval; u32 xhci_imod_value; }; #define work_to_dwc(w) (container_of((w), struct dwc3, drd_work)) Loading drivers/usb/dwc3/host.c +12 −1 Original line number Diff line number Diff line Loading @@ -44,14 +44,16 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) return irq; } #define NUMBER_OF_PROPS 4 int dwc3_host_init(struct dwc3 *dwc) { struct property_entry props[3]; struct property_entry props[NUMBER_OF_PROPS]; struct platform_device *xhci; int ret, irq; struct resource *res; struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); int prop_idx = 0; struct property_entry imod_prop; irq = dwc3_host_get_irq(dwc); if (irq < 0) Loading Loading @@ -93,6 +95,15 @@ int dwc3_host_init(struct dwc3 *dwc) if (dwc->usb3_lpm_capable) props[prop_idx++].name = "usb3-lpm-capable"; if (dwc->xhci_imod_value) { imod_prop.name = "imod-interval-ns"; imod_prop.length = sizeof(u32); imod_prop.is_array = false; imod_prop.type = DEV_PROP_U32; imod_prop.value.u32_data = dwc->xhci_imod_value; props[prop_idx++] = imod_prop; } /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation * where Port Disable command doesn't work. Loading drivers/usb/host/xhci-plat.c +1 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ static int xhci_plat_probe(struct platform_device *pdev) /* imod_interval is the interrupt moderation value in nanoseconds. */ xhci->imod_interval = 40000; device_property_read_u32(sysdev, "imod-interval-ns", device_property_read_u32(&pdev->dev, "imod-interval-ns", &xhci->imod_interval); hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); Loading Loading
Documentation/devicetree/bindings/usb/dwc3.txt +3 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,8 @@ Optional properties: this and tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 programming guide section 1.2.3) to enable periodic ESS TX threshold. - snps,xhci-imod-value: Interrupt moderation interval for host mode (in increments of 250nsec). - <DEPRECATED> tx-fifo-resize: determines if the FIFO *has* to be reallocated. Loading @@ -108,4 +110,5 @@ dwc3@4a030000 { reg = <0x4a030000 0xcfff>; interrupts = <0 92 4> usb-phy = <&usb2_phy>, <&usb3,phy>; snps,xhci-imod-value = <4000>; };
drivers/usb/dwc3/core.c +4 −0 Original line number Diff line number Diff line Loading @@ -1126,6 +1126,10 @@ static void dwc3_get_properties(struct dwc3 *dwc) "snps,is-utmi-l1-suspend"); device_property_read_u8(dev, "snps,hird-threshold", &hird_threshold); device_property_read_u32(dev, "snps,xhci-imod-value", &dwc->xhci_imod_value); 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 @@ -986,6 +986,7 @@ struct dwc3_scratchpad_array { * @dis_metastability_quirk: set to disable metastability quirk. * @imod_interval: set the interrupt moderation interval in 250ns * increments or 0 to disable. * @xhci_imod_value: imod value to use with xhci */ struct dwc3 { struct work_struct drd_work; Loading Loading @@ -1155,6 +1156,7 @@ struct dwc3 { unsigned dis_metastability_quirk:1; u16 imod_interval; u32 xhci_imod_value; }; #define work_to_dwc(w) (container_of((w), struct dwc3, drd_work)) Loading
drivers/usb/dwc3/host.c +12 −1 Original line number Diff line number Diff line Loading @@ -44,14 +44,16 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) return irq; } #define NUMBER_OF_PROPS 4 int dwc3_host_init(struct dwc3 *dwc) { struct property_entry props[3]; struct property_entry props[NUMBER_OF_PROPS]; struct platform_device *xhci; int ret, irq; struct resource *res; struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); int prop_idx = 0; struct property_entry imod_prop; irq = dwc3_host_get_irq(dwc); if (irq < 0) Loading Loading @@ -93,6 +95,15 @@ int dwc3_host_init(struct dwc3 *dwc) if (dwc->usb3_lpm_capable) props[prop_idx++].name = "usb3-lpm-capable"; if (dwc->xhci_imod_value) { imod_prop.name = "imod-interval-ns"; imod_prop.length = sizeof(u32); imod_prop.is_array = false; imod_prop.type = DEV_PROP_U32; imod_prop.value.u32_data = dwc->xhci_imod_value; props[prop_idx++] = imod_prop; } /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation * where Port Disable command doesn't work. Loading
drivers/usb/host/xhci-plat.c +1 −1 Original line number Diff line number Diff line Loading @@ -283,7 +283,7 @@ static int xhci_plat_probe(struct platform_device *pdev) /* imod_interval is the interrupt moderation value in nanoseconds. */ xhci->imod_interval = 40000; device_property_read_u32(sysdev, "imod-interval-ns", device_property_read_u32(&pdev->dev, "imod-interval-ns", &xhci->imod_interval); hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); Loading