[U-Boot] [RESEND][PATCH v1 0/4] usb: dwc2_udc_otg: Add tx_fifo_sz array support

Patrice Chotard patrice.chotard at st.com
Thu Mar 14 10:51:10 UTC 2019


dwc2 bindings specifies that g-tx-fifo-size is an array of tx fifo size
for endpoint (except ep0) as shown below:
  - g-tx-fifo-size = <256 128 128 64 64 32>;

Current implementation apply the same fifo size to all tx fifo.
In order to apply different fifo size, introduce a tx_fifo_sz array
filled with DT g-tx-fifo-size entry.

All DWC2 variant doesn't implement 16 hardware endpoint as currently
hardcoded. This information can be retrieved from HWCFG4 register. This series
is also addressing this point.

This series adds:
  - Read max hardware endpoint from HWCFG4 register
  - Add tx fifo size array support
  _ Update stm32mp1 board and DT to use tx_fifo_sz array


Patrice Chotard (4):
  usb: dwc2_udc_otg: Read MAX_HW_ENDPOINT from HWCFG4 register
  usb: dwc2_udc_otg: Add tx_fifo_sz array support
  board: stm32mp1: Add tx_fifo_sz_array support
  ARM: dts: stm32: Remove g-tx-fifo-size from stm32mp157c-ev1-u-boot

 arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi |  4 ----
 board/st/stm32mp1/stm32mp1.c             | 11 +++++++++--
 drivers/usb/gadget/dwc2_udc_otg.c        | 18 ++++++++++++++++--
 drivers/usb/gadget/dwc2_udc_otg_priv.h   |  1 -
 drivers/usb/gadget/dwc2_udc_otg_regs.h   | 17 ++++++++++++-----
 include/usb/dwc2_udc.h                   |  6 ++++++
 6 files changed, 43 insertions(+), 14 deletions(-)

-- 
1.9.1



More information about the U-Boot mailing list