Skip to content

phy: qcom: usb-hs: add qcom,vendor-init-seq for raw ULPI writes

Herman van Hazendonk linux-arm-msm linux-devicetree linux-phy 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: phy: qcom,usb-hs-phy: add qcom,vendor-init-seqDocumentation/devicetree/bindings/phy/qcom,usb-hs-phy.yaml+14 -07 replies
2/2phy: qcom: usb-hs: honour qcom,vendor-init-seq raw ULPI writesdrivers/phy/qualcomm/phy-qcom-usb-hs.c+90 -191 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] phy: qcom: usb-hs: add qcom,vendor-init-seq for raw ULPI writes

The qcom,usb-hs-phy driver already supports qcom,init-seq for board-specific ULPI initialisation, but the address field in that property is always offset by ULPI_EXT_VENDOR_SPECIFIC. That makes it impossible to reach the standard ULPI vendor register range (0x30-0x3f) where MSM8x60-class hardware keeps pre-emphasis, HS driver slope, and CDR auto-reset bits.

PATCH 1/2 adds the DT binding: an optional "qcom,vendor-init-seq" property carrying raw (addr, val) u8 pairs with no implicit offset.

PATCH 2/2 adds the driver support. The new sequence is applied AFTER reset_control_reset() so the values survive the register restore the reset performs. While refactoring the shared parse logic into a single helper, two pre-existing bugs in the qcom,init-seq path are also fixed: an odd byte count would previously silently drop the trailing half-pair, and there was no upper bound on the devm_kmalloc_array() allocation driven by the DT value.

Herman van Hazendonk (2):
dt-bindings: phy: qcom,usb-hs-phy: add qcom,vendor-init-seq
phy: qcom: usb-hs: honour qcom,vendor-init-seq raw ULPI writes

 .../bindings/phy/qcom,usb-hs-phy.yaml         |  14 +++
 drivers/phy/qualcomm/phy-qcom-usb-hs.c        | 109 +++++++++++++++---
 2 files changed, 104 insertions(+), 19 deletions(-)

base-commit: 944125b4c454b58d2fe6e35f1087a932b2050dff

Signature · 1 line
2.43.0