[PATCH v5 00/16] Qualcomm platform USB support

Caleb Connolly caleb.connolly at linaro.org
Thu Mar 28 18:59:06 CET 2024


This series enables USB on Qualcomm SDM845 platforms and lays the
foundation for future SoCs as well.

It introduces two new high-speed PHY drivers, one for SDM845 and one for
an upcoming platform. The SDM845 clock driver gains support for
configuring the USB clocks, and the GPIO driver is updated to use .set_flags
which fixes a strange bug where GPIOs would also be configured as input.

Support for super-speed USB modes is not currently available, however
configuring the device to be high-speed only requires modifications to
DT.

To improve compatibility with upstream DT, we switch Qualcomm platforms
over to OF_LIVE and apply fixups to the tree to remove references to the
super-speed phy, as well as configure the Qualcomm glue for high-speed
only mode.

The db845c requires a vbus-supply to be hooked up for its usb type-A
port. A U-Boot dtsi file is added to configure this.

With these patches, it is now also possible to run U-Boot on some SDM845
phones like the OnePlus 6 using a dtb from Linux, and access the U-Boot
shell via the CDC ACM USB serial gadget.

This series depends on the ("Qualcomm DWC3 USB support") series [1], as
well as Volodymyrs patches enabling power domain support [2].
A feature branch based on qcom-next with the necessary dependencies
for testing the Dragonboard845c can be found at [3].

[1]: https://lore.kernel.org/u-boot/20240320-b4-qcom-usb-v4-0-41be480172e1@linaro.org
[2]: https://lore.kernel.org/u-boot/20240311213334.3567389-1-volodymyr_babchuk@epam.com
[3]: https://git.codelinaro.org/linaro/qcomlt/u-boot/-/tree/b4/qcom-livetree

---
Changes in v5:
- Call regulators_enable_boot_on() during board_init() and don't use
  the vbus-supply property anymore. This is slightly more aligned with
  upstream.
- Minor checkpatch fixes
- Link to v4: https://lore.kernel.org/r/20240320-b4-qcom-livetree-v4-0-d867ab1f06c2@linaro.org

Changes in v4:
- Fix defconfig.
- Mark db845c vbus regulator always-on to fix a bug in Linux.
- Add a timer in qcom_of_fixup_nodes() so the boot time impact can
  be easily measured.
- Drop unused macros from femto v2 phy, general cleanup, remove custom
  set/clrbits impl.
- Rename "7nm" phy driver to "femto-v2" to match Linux, also fix
  copyright.
- Use set/clrbits() in qusb2 phy driver.
- Link to v3: https://lore.kernel.org/r/20240319-b4-qcom-livetree-v3-0-e1b38d9b4fa4@linaro.org

Changes in v3:
- Add back missing gadget options to qcom_defconfig (thanks Neil)
- Link to v2: https://lore.kernel.org/r/20240315-b4-qcom-livetree-v2-0-ab635774b2dc@linaro.org

Changes in v2:
- Fix incorrect order of NULL/0 parameters to of_write_prob() in
  fixup_qcom_dwc3()
- Move fixup_usb_nodes() to a separate file in preparation for future
  additions.
- Add missing break to switch case in sdm845_clk_enable()
- Remove rogue return statement in msm_gpio_set_flags()
- Rebase on Volodymyrs power domain patches.
- Link to v1: https://lore.kernel.org/r/20240131-b4-qcom-livetree-v1-0-4071c0787db0@linaro.org

---
Bhupesh Sharma (2):
      phy: qcom: add Qualcomm QUSB2 USB PHY driver
      phy: qcom: Add SNPS femto v2 USB HS phy

Caleb Connolly (14):
      mailmap: update Bhupesh's email address
      mach-snapdragon: disable power-domains for pre-reloc drivers
      clk/qcom: use offsets for RCG registers
      clk/qcom: sdm845: add gdscs
      clk/qcom: sdm845: add USB clocks
      gpio: msm_gpio: add .set_flags op
      serial: msm-geni: support livetree
      mach-snapdragon: fixup USB nodes
      mach-snapdragon: fixup power-domains
      mach-snapdragon: call regulators_enable_boot_on()
      dts: sdm845-db845c: add u-boot fixups
      qcom_defconfig: enable livetree
      qcom_defconfig: enable USB
      usb: gadget: UMS: fix 64-bit division on ARM32

 .mailmap                                  |   1 +
 arch/arm/dts/sdm845-db845c-u-boot.dtsi    |   9 +
 arch/arm/mach-snapdragon/Makefile         |   1 +
 arch/arm/mach-snapdragon/board.c          |   5 +
 arch/arm/mach-snapdragon/of_fixup.c       | 155 +++++++++++
 arch/arm/mach-snapdragon/qcom-priv.h      |  20 ++
 configs/qcom_defconfig                    |  53 ++--
 drivers/clk/qcom/clock-apq8016.c          |  39 +--
 drivers/clk/qcom/clock-apq8096.c          |  28 +-
 drivers/clk/qcom/clock-qcom.c             |  24 +-
 drivers/clk/qcom/clock-qcom.h             |  16 +-
 drivers/clk/qcom/clock-qcs404.c           | 122 ++-------
 drivers/clk/qcom/clock-sdm845.c           |  61 +++--
 drivers/gpio/msm_gpio.c                   |  27 +-
 drivers/phy/qcom/Kconfig                  |  15 ++
 drivers/phy/qcom/Makefile                 |   2 +
 drivers/phy/qcom/phy-qcom-qusb2.c         | 429 ++++++++++++++++++++++++++++++
 drivers/phy/qcom/phy-qcom-snps-femto-v2.c | 207 ++++++++++++++
 drivers/serial/serial_msm_geni.c          |  15 +-
 drivers/usb/gadget/f_mass_storage.c       |  13 +-
 20 files changed, 1001 insertions(+), 241 deletions(-)
---
base-commit: 0d08018d01afaddcee8dd1f1929a48577684110c

// Caleb (they/them)



More information about the U-Boot mailing list