Skip to content

phy: qcom: usb-hs: program MSM8x60 vendor ULPI registers on power-on

Herman van Hazendonk linux-arm-msm linux-phy lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 0 repliesNew

Changes in v2 from the cover letter

- Drop the new "qcom,vendor-init-seq" DT property entirely, per Dmitry's review. The values being passed in were platform-specific (identical across every MSM8x60 SoC) plus one board-specific value, not per-device. Move all of it into the driver.
- Drop the corresponding dt-bindings patch (the binding gains nothing in v2).
- Hardcode the values in the driver behind a runtime flag that only matches "qcom,usb-hs-phy-msm8660":
* reg 0x32 [5:4] = 11b - pre-emphasis 20% (platform-wide across every MSM8x60 reference board / HP TouchPad / HTC)
* reg 0x36 bits 1,2 set - CDR auto-reset + SE1 gating disabled (also platform-wide)
* reg 0x32 [3:0] = 5 - HS driver slope. This is the only
board-specific value; HP TouchPad webOS kernel uses 5, HTC MSM8660 ports historically used 1. Since the TouchPad is the only in-tree MSM8x60 consumer, the value is hardcoded with a comment noting that a per-compatible override will be needed when a second board lands.

- Comment in the driver also calls out that HTC vendor kernels additionally write 0x0C to reg 0x31. The HP TouchPad webOS kernel never touched that register and USB is stable without it, so those bits are omitted until documentation surfaces.

- The companion DTS patch flipping the TouchPad PHY compatible from "qcom,usb-hs-phy-apq8064" (a different SoC) to "qcom,usb-hs-phy-msm8660" will be sent separately to the ARM DTS tree as that's where it belongs.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1phy: qcom: usb-hs: program MSM8x60 vendor ULPI registers on power-ondrivers/phy/qualcomm/phy-qcom-usb-hs.c+79 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/1] phy: qcom: usb-hs: program MSM8x60 vendor ULPI registers on power-on

v2:
- Drop the new "qcom,vendor-init-seq" DT property entirely, per Dmitry's review. The values being passed in were platform-specific (identical across every MSM8x60 SoC) plus one board-specific value, not per-device. Move all of it into the driver.
- Drop the corresponding dt-bindings patch (the binding gains nothing in v2).
- Hardcode the values in the driver behind a runtime flag that only matches "qcom,usb-hs-phy-msm8660":
* reg 0x32 [5:4] = 11b - pre-emphasis 20% (platform-wide across every MSM8x60 reference board / HP TouchPad / HTC)
* reg 0x36 bits 1,2 set - CDR auto-reset + SE1 gating disabled (also platform-wide)
* reg 0x32 [3:0] = 5 - HS driver slope. This is the only
board-specific value; HP TouchPad webOS kernel uses 5, HTC MSM8660 ports historically used 1. Since the TouchPad is the only in-tree MSM8x60 consumer, the value is hardcoded with a comment noting that a per-compatible override will be needed when a second board lands.

- Comment in the driver also calls out that HTC vendor kernels additionally write 0x0C to reg 0x31. The HP TouchPad webOS kernel never touched that register and USB is stable without it, so those bits are omitted until documentation surfaces.

- The companion DTS patch flipping the TouchPad PHY compatible from "qcom,usb-hs-phy-apq8064" (a different SoC) to "qcom,usb-hs-phy-msm8660" will be sent separately to the ARM DTS tree as that's where it belongs.

On-device validation (HP TouchPad / APQ8060):
- Booted with v2 + the DTS compatible fix. PHY driver bound, msm_hsusb HS link came up at high-speed, BC 1.2 charger detection passed, UDC configured cleanly.
- 200 MB scp device->host + 200 MB scp host->device, with a concurrent ping flood running in parallel:
- both transfers 19.1-19.3 s (~10.5 MB/s, the CPU+stack
ceiling for USB-net on a 1.5 GHz Scorpion)
- md5 round-trip identical both ways (zero corruption in ~400 MB of HS traffic)
- ping flood: 60/60 received, 0% loss
- usb0 counters: 0 errors, 0 dropped, 0 carrier losses, 0 collisions across 151k packets / 220 MB
- dmesg line count unchanged (no link resets, no PHY/USB warnings emitted during stress)

The on-device test doesn't measure the analog effect of the pre-emphasis / driver slope settings (that needs an oscilloscope on D+/D-), but it does confirm the writes don't regress an already-stable HS link.

Herman van Hazendonk (1):
phy: qcom: usb-hs: program MSM8x60 vendor ULPI registers on power-on

 drivers/phy/qualcomm/phy-qcom-usb-hs.c | 79 ++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

base-commit: 944125b4c454b58d2fe6e35f1087a932b2050dff

Signature · 1 line
2.43.0