mbox series

[v4,0/5] Qualcomm DWC3 USB support

Message ID 20240320-b4-qcom-usb-v4-0-41be480172e1@linaro.org
Headers show
Series Qualcomm DWC3 USB support | expand

Message

Caleb Connolly March 20, 2024, 2:30 p.m. UTC
This series enables support for Qualcomm platforms in the DWC3 driver,
adds support for arbitrary sector sizes to the USB mass storage gadget,
and fixes an issue with the CDC ACM driver where it wouldn't initialise
the USB device.

Additionally, it fixes a syntax bug in the Qualcomm SMMU driver, and
makes USB_DWC3_GADGET select DM_USB_GADGET to fix compilation with
gadget mode.

This is part of a larger series enabling DWC3 USB support on Qualcomm
platforms, a feature branch with all patches can be found at [1].

[1]: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/tree/b4/qcom-livetree

---
Changes in v4:
- Use map_physmem() instead of casting fdt_addr_t directly to void*
- Link to v3: https://lore.kernel.org/r/20240319-b4-qcom-usb-v3-0-09ba1f86d259@linaro.org

Changes in v3:
- Fix ordering of QSCRATCH registers in qcom dwc3 glue.
- Link to v2: https://lore.kernel.org/r/20240315-b4-qcom-usb-v2-0-5467ec27cb26@linaro.org

Changes in v2:
- Drop custom set/clrbits implementation in qcom dwc3 glue.
- Additional minor cleanup based on Marek's comments.
- Link to v1: https://lore.kernel.org/r/20240131-b4-qcom-usb-v1-0-6438b2a2285e@linaro.org

---
Caleb Connolly (5):
      usb: dwc3-generic: implement Qualcomm wrapper
      usb: dwc3: select DM_USB_GADGET
      usb: gadget: CDC ACM: call usb_gadget_initialize
      usb: gadget: UMS: support multiple sector sizes
      iommu: qcom-smmu: fix debugging

 cmd/usb_mass_storage.c              |   4 --
 drivers/iommu/qcom-hyp-smmu.c       |   2 +-
 drivers/usb/dwc3/Kconfig            |   1 +
 drivers/usb/dwc3/dwc3-generic.c     |  81 ++++++++++++++++++++++++++++-
 drivers/usb/gadget/f_acm.c          |   9 ++++
 drivers/usb/gadget/f_mass_storage.c | 101 ++++++++++++++++++++----------------
 drivers/usb/gadget/storage_common.c |  12 +++--
 include/usb_mass_storage.h          |   1 -
 8 files changed, 156 insertions(+), 55 deletions(-)
---
base-commit: a288571aff7b27eb9f593dbfd8269e1fbdbbfe18

// Caleb (they/them)

Comments

Marek Vasut March 20, 2024, 8:01 p.m. UTC | #1
On 3/20/24 3:30 PM, Caleb Connolly wrote:
> This series enables support for Qualcomm platforms in the DWC3 driver,
> adds support for arbitrary sector sizes to the USB mass storage gadget,
> and fixes an issue with the CDC ACM driver where it wouldn't initialise
> the USB device.
> 
> Additionally, it fixes a syntax bug in the Qualcomm SMMU driver, and
> makes USB_DWC3_GADGET select DM_USB_GADGET to fix compilation with
> gadget mode.
> 
> This is part of a larger series enabling DWC3 USB support on Qualcomm
> platforms, a feature branch with all patches can be found at [1].
> 
> [1]: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/tree/b4/qcom-livetree

Since this is mostly gadget and RB'd now, I think this should go through 
Mattijs / dfu tree.

Thanks
Caleb Connolly March 20, 2024, 8:21 p.m. UTC | #2
On 20/03/2024 20:01, Marek Vasut wrote:
> On 3/20/24 3:30 PM, Caleb Connolly wrote:
>> This series enables support for Qualcomm platforms in the DWC3 driver,
>> adds support for arbitrary sector sizes to the USB mass storage gadget,
>> and fixes an issue with the CDC ACM driver where it wouldn't initialise
>> the USB device.
>>
>> Additionally, it fixes a syntax bug in the Qualcomm SMMU driver, and
>> makes USB_DWC3_GADGET select DM_USB_GADGET to fix compilation with
>> gadget mode.
>>
>> This is part of a larger series enabling DWC3 USB support on Qualcomm
>> platforms, a feature branch with all patches can be found at [1].
>>
>> [1]:
>> https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/tree/b4/qcom-livetree
> 
> Since this is mostly gadget and RB'd now, I think this should go through
> Mattijs / dfu tree.

Yes please!

> 
> Thanks

Thanks all for the reviews.
Mattijs Korpershoek March 21, 2024, 9:23 a.m. UTC | #3
Hi,

On Wed, 20 Mar 2024 14:30:46 +0000, Caleb Connolly wrote:
> This series enables support for Qualcomm platforms in the DWC3 driver,
> adds support for arbitrary sector sizes to the USB mass storage gadget,
> and fixes an issue with the CDC ACM driver where it wouldn't initialise
> the USB device.
> 
> Additionally, it fixes a syntax bug in the Qualcomm SMMU driver, and
> makes USB_DWC3_GADGET select DM_USB_GADGET to fix compilation with
> gadget mode.
> 
> [...]

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu-next)

[1/5] usb: dwc3-generic: implement Qualcomm wrapper
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/850b307789dca8dfff6d7cad57ba2ffbfbb5f6ed
[2/5] usb: dwc3: select DM_USB_GADGET
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/97d629372c8c58da96f46aa6d2bec09f120cc62d
[3/5] usb: gadget: CDC ACM: call usb_gadget_initialize
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/86327b4e3201a55aefee2f1bfbbea9a7896461f0
[4/5] usb: gadget: UMS: support multiple sector sizes
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/7e71eeb39f4c5280b1ce677f4a14063feaedff95
[5/5] iommu: qcom-smmu: fix debugging
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/c9959ce7b54145a83d3797bcfb3c3713cb4a97ea

--
Mattijs
Mattijs Korpershoek March 21, 2024, 2:47 p.m. UTC | #4
Hi Caleb,

It seems CI got broken with this series.

Baseline CI (passed):
https://source.denx.de/u-boot/u-boot/-/pipelines/20006

With series applied (failed):
https://source.denx.de/u-boot/custodians/u-boot-dfu/-/jobs/802278

It seems the change on UMS introduced some linking errors on arm32:

f_mass_storage.c:946:(.text.do_write.lto_priv.0+0x1de): undefined reference to `__aeabi_ldivmod'

Could you have a look, please?

Thank you.
Mattijs

On jeu., mars 21, 2024 at 10:23, Mattijs Korpershoek <mkorpershoek@baylibre.com> wrote:

> Hi,
>
> On Wed, 20 Mar 2024 14:30:46 +0000, Caleb Connolly wrote:
>> This series enables support for Qualcomm platforms in the DWC3 driver,
>> adds support for arbitrary sector sizes to the USB mass storage gadget,
>> and fixes an issue with the CDC ACM driver where it wouldn't initialise
>> the USB device.
>> 
>> Additionally, it fixes a syntax bug in the Qualcomm SMMU driver, and
>> makes USB_DWC3_GADGET select DM_USB_GADGET to fix compilation with
>> gadget mode.
>> 
>> [...]
>
> Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu-next)
>
> [1/5] usb: dwc3-generic: implement Qualcomm wrapper
>       https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/850b307789dca8dfff6d7cad57ba2ffbfbb5f6ed
> [2/5] usb: dwc3: select DM_USB_GADGET
>       https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/97d629372c8c58da96f46aa6d2bec09f120cc62d
> [3/5] usb: gadget: CDC ACM: call usb_gadget_initialize
>       https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/86327b4e3201a55aefee2f1bfbbea9a7896461f0
> [4/5] usb: gadget: UMS: support multiple sector sizes
>       https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/7e71eeb39f4c5280b1ce677f4a14063feaedff95
> [5/5] iommu: qcom-smmu: fix debugging
>       https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/c9959ce7b54145a83d3797bcfb3c3713cb4a97ea
>
> --
> Mattijs