Skip to content

[QCOM-NEXT] Qcm6490 usb enablement#8

Open
aswinm94 wants to merge 10 commits intoqualcomm-linux:qcom-nextfrom
aswinm94:qcm6490-usb
Open

[QCOM-NEXT] Qcm6490 usb enablement#8
aswinm94 wants to merge 10 commits intoqualcomm-linux:qcom-nextfrom
aswinm94:qcm6490-usb

Conversation

@aswinm94
Copy link
Copy Markdown

This PR introduces comprehensive USB functionality improvements on Qualcomm platform QCM6490.

Switches the USB controller dr_mode from host to peripheral to enable fastboot support.
upstream link: https://lore.kernel.org/all/20251114064042.3835312-1-balaji.selvanathan@oss.qualcomm.com/

Adds USB3 Super‑Speed support by introducing the QMP USB3‑DP Combo PHY driver (ported from upstream Linux), required clocks, and automated USB speed fix‑ups.
upstream link: https://lore.kernel.org/all/20251203110735.1959862-1-balaji.selvanathan@oss.qualcomm.com/

commits for this PR:

  1. dts: qcs6490-rb3gen2: Switch USB controller to peripheral mode
  2. drivers: clk: qcom: sc7280: Add USB3 PHY pipe clock
  3. drivers: usb: dwc3: Add delay after core soft reset
  4. drivers: phy: qcom: Add QMP USB3-DP Combo PHY driver
  5. arch: arm: mach-snapdragon: Auto-detect USB SSPHY driver support
  6. configs: qcm6490: Enable super-speed USB support

b49020 and others added 10 commits January 27, 2026 15:54
OP-TEE message UID check API can be useful to know whether OP-TEE
is enabled on not assuming the corresponding SMC call is properly
handled if OP-TEE is not supported.

This API can be used by platform code to know OP-TEE presence and
on that basis OP-TEE DT node can be added as part of DT fixups for
the OP-TEE driver probe to happen for both U-Boot and Linux.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add support for OP-TEE live tree DT fixup support which enables U-Boot
OP-TEE driver to be probed. As well as the EFI DT fixup protocol allows
the live tree fixup to be carried over to the OS for the OP-TEE driver
in the OS to probe as well.

Note that this fixup only gets applied if OP-TEE support is detected via
checking for OP-TEE message UID.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Recently upstream TF-A/OP-TEE has started gaining support for Qcom
platforms. RB3Gen2 being the first one and more to come. U-Boot in
corresponding boot flow is packaged as a position independent executable.

So, lets add a generic U-Boot config fragment for Qcom platforms to
support TF-A/OP-TEE based TrustZone stack. Build command:

$ ./scripts/kconfig/merge_config.sh \
       configs/qcom_defconfig \
       board/qualcomm/tfa-optee.config
$ make -j`nproc` DEVICE_TREE=qcom/qcs6490-rb3gen2

For more information refer here:
https://trustedfirmware-a.readthedocs.io/en/latest/plat/qti/rb3gen2.html

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Do FAT read and write based on the device sector size
instead of the size recorded in the FAT meta data.

FAT code issues i/o in terms of the sector size. Convert that to
device sector size before doing the actual i/o. Additionally,
handle leading/trailing blocks when the meta data based block
no and i/o size is not an exact multiple of the device sector
size or vice versa.

Tested on UFS device with sector size 4096 and meta data recorded
sector size 512.

Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Change USB controller dr_mode from "host" to "peripheral" to enable
fastboot support on the QCS6490 RB3Gen2 board.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Add support for GCC_USB3_PRIM_PHY_PIPE_CLK which is required by
the USB3 PHY on SC7280/QCM6490 platforms.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Add a 100 ms delay after clearing the core soft reset bit to ensure
the DWC3 controller has sufficient time to complete its reset
sequence before subsequent register accesses.

Without this delay, USB initialization can fail on some Qualcomm
platforms, particularly when using super-speed capable PHYs like
the QMP USB3-DP Combo PHY on SC7280/QCM6490.

Taken from Linux commit f88359e ("usb: dwc3: core: Do core softreset when switch mode")

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Add support for the Qualcomm QMP USB3-DP Combo PHY found on
SC7280 and QCM6490 platforms. This driver currently implements
USB3 super-speed functionality of the combo PHY.

The QMP Combo PHY is a dual-mode PHY
that can operate in either USB3 mode or DisplayPort mode. This
initial implementation focuses on USB3 mode to enable Super-Speed
USB support.

Taken from Linux commit 3d25d46a255a ("pmdomain: qcom: rpmhpd: Add rpmhpd support for SM8750")

This patch is dependent on this patch: https://lore.kernel.org/u-boot/20251112164204.1557934-1-aswin.murugan@oss.qualcomm.com/

Enabled and tested the driver on Qualcomm RB3 Gen2 (QCS6490) board.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Automatically detect super-speed USB PHY driver availability and
skip the USB speed fixup if driver is available, eliminating the need
for manual configuration.

Previously, U-Boot unconditionally limited USB to high-speed mode
on all Qualcomm platforms because most lacked super-speed PHY
drivers.

This change implements runtime detection that checks if a PHY
driver exists for the super-speed PHY node referenced by the DWC3
controller. The fixup is automatically skipped when a compatible
driver is found, allowing the hardware to operate at full
capability. Platforms without super-speed PHY drivers continue to
receive the fixup automatically.
Enable the QMP Combo PHY driver to allow super-speed USB
operation on QCM6490 platforms.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
@b49020
Copy link
Copy Markdown
Member

b49020 commented Feb 23, 2026

dts: qcs6490-rb3gen2: Switch USB controller to peripheral mode

Can we try to drop usb DT override at all? Since the default OTG mode fallback to peripheral mode only.

arch: arm: mach-snapdragon: Auto-detect USB SSPHY driver support

As I commented upstream as well, this auto DT parsing for every target consumes too much boot time. Let's rather rely on simple DT node check.

@b49020 b49020 force-pushed the qcom-next branch 2 times, most recently from 699249a to 57da17b Compare April 10, 2026 11:22
@b49020 b49020 changed the title Qcm6490 usb enablement [QCOM-NEXT] Qcm6490 usb enablement Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants