usb: dwc2: Add AHB burst configuration
Subsystems (3)
cover usb: dwc2: Add AHB burst configuration
This series adds a binding for AHB burst, reads it in, and configures the controller for the specified burst type.
Tested on HAPS platform with DWC_hsotg IP version 3.30a.
John Youn (4):
usb: dwc2: Fix AHB burst type for bcm2835
usb: dwc2: Add binding for AHB burst
usb: dwc2: Use the ahb_burst param
usb: dwc2: pci: Add AHB burst property for HAPS
Documentation/devicetree/bindings/usb/dwc2.txt | 2 + drivers/usb/dwc2/core.h | 9 ++++ drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c | 8 ++- drivers/usb/dwc2/params.c | 68 +++++++++++++++++++++----- drivers/usb/dwc2/pci.c | 1 + 6 files changed, 73 insertions(+), 17 deletions(-)
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): cover.1479256193.git.johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]
PATCH 2/4 usb: dwc2: Add binding for AHB burst
Add the "snps,ahb-burst" binding and read it in.
This property controls which burst type to perform on the AHB bus as a master in internal DMA mode. This overrides the legacy param value, which we need to keep around for now since several platforms use it.
Some platforms may see better or worse performance based on this value. The HAPS platform is one example where all INCRx have worse performance than INCR.
Other platforms (such as the Canyonlands board) report that the default value causes system hangs.
--- Documentation/devicetree/bindings/usb/dwc2.txt | 2 + drivers/usb/dwc2/core.h | 9 +++++ drivers/usb/dwc2/params.c | 56 ++++++++++++++++++++++++++ 3 files changed, 67 insertions(+)
Documentation/devicetree/bindings/usb/dwc2.txt +2 -0
@@ -26,6 +26,8 @@ Optional properties: Refer to phy/phy-bindings.txt for generic phy consumer properties - dr_mode: shall be one of "host", "peripheral" and "otg" Refer to usb/generic.txt +- snps,ahb-burst: specifies the ahb burst length. Valid arguments are: + "SINGLE", "INCR", "INCR4", "INCR8", "INCR16". Defaults to "INCR4". - g-rx-fifo-size: size of rx fifo size in gadget mode. - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode. - g-tx-fifo-size: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
drivers/usb/dwc2/core.h +9 -0
@@ -430,6 +430,12 @@ enum dwc2_ep0_state {* needed. * 0 - No (default) * 1 - Yes +* @ahb_burst: Specifies the AHB burst. +* 0 - Single +* 1 - INCR +* 3 - INCR4 (default) +* 5 - INCR8 +* 7 - INCR16 * @g_dma: Enables gadget dma usage (default: autodetect). * @g_dma_desc: Enables gadget descriptor DMA (default: autodetect). * @g_rx_fifo_size: The periodic rx fifo size for the device, in
@@ -507,6 +513,9 @@ struct dwc2_core_params {* properties and cannot be set directly in this structure. */ +/* Global parameters */ +u8 ahb_burst; +/* Host parameters */ bool host_dma;
drivers/usb/dwc2/params.c +56 -0
68 lines not on this page · raw message
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html