[PATCH v2 0/2] qcom: Add a method to manually toggle the DP pullup on HS USB PHY

From: Bryan O'Donoghue
Date: Thu Dec 29 2022 - 13:35:14 EST


V2:
I'm clearing out old patches in my tree and opted to rework the naming of
the relevant flag to align with the downstream name. Also the original set
was sent against a .txt description which has now moved onto .yaml.

I haven't retained Rob's Acked-by since its +18 months and the
Documentation patch applies to .yaml now not .txt

https://lore.kernel.org/all/20200528223458.GA804610@bogus/T/#mb20456db4a3d1cf608bb6335a1b6fa9dda8cb0cb
https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#2736

V1:
On an MSM8939 we have a system behind both a type-c controller and a USB
Hub. VBUS is not connected to the PHY and no GPIO is available to signal
VBUS state to the USB controller and PHY.

In this case we've used USB role-switching to transition between
host and device mode.

The current code in qcom-usb-hs only touches the VBUS pullup control bits
if we have an extcon but, setting those bits is still required on the
example I gave of the MSM8939.

This series takes the downstream concept of a DT driven flag for the VBUS
pullup bits and applies it to upstream in the poweron/poweroff path of the
PHY.

I've opted to unset the bits on PHY poweroff though in downstream the bits
are only ever switched on if the flag is present, downstream never switches
the bits off again. I think though, setting the bits off on PHY power-off
is the right thing to do, so I've done it.

Bryan O'Donoghue (2):
dt-bindings: phy: Add qcom,dp-manual-pullup description
phy: qcom-usb-hs: Add qcom,dp-manual-pullup logic

.../bindings/phy/qcom,usb-hs-phy.yaml | 7 ++++
drivers/phy/qualcomm/phy-qcom-usb-hs.c | 36 +++++++++++++++++++
2 files changed, 43 insertions(+)

--
2.34.1