From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: agross@kernel.org, andersson@kernel.org, vkoul@kernel.org,
kishon@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, konrad.dybcio@linaro.org,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 2/2] phy: qcom-usb-hs: Add qcom,dp-manual-pullup logic
Date: Thu, 29 Dec 2022 21:05:23 +0000 [thread overview]
Message-ID: <6061938c-b830-2fe0-2f4d-368e34c33676@linaro.org> (raw)
In-Reply-To: <Y64AfHcUw192Pyr6@gerhold.net>
On 29/12/2022 21:02, Stephan Gerhold wrote:
> On Thu, Dec 29, 2022 at 08:45:15PM +0100, Stephan Gerhold wrote:
>> On Thu, Dec 29, 2022 at 06:34:10PM +0000, Bryan O'Donoghue wrote:
>>> Downstream has a flag called qcom,dp-manual-pullup which informs the
>>> downstream driver if it should toggle ULPI_MISC_A_VBUSVLDEXTSEL and
>>> ULPI_MISC_A_VBUSVLDEXT.
>>>
>>> Downstream states:
>>>
>>> "qcom,dp-manual-pullup: If present, vbus is not routed to USB
>>> controller/phy and controller driver therefore enables pull-up
>>> explicitly before starting controller using usbcmd run/stop bit."
>>>
>>> Working with a system that has both an external Type-C port controller and
>>> an internal USB Hub results in a situation where VBUS is not connected to
>>> the SoC.
>>>
>>> In this case we still need to set the DP pullup.
>>>
>>> This patch enables and disables the DP pullup on PHY power_on and power_off
>>> respectively if the DT has declared the bool "qcom,enable-vbus-pullup"
>>> effectively replicating the downstream logic to the same effect.
>>>
>>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> [...]
>>
>> An alternative that I've occasionally used for early bring-up is to
>> simply use a dummy extcon driver [1] that permanently reports active
>> VBUS. The end result is the same. While it's clearly a hack perhaps this
>> makes it a bit more clear that ideally you really should try to assign
>> an extcon device, to avoid keeping the USB controller and PHY on
>> permanently.
>>
>
> BTW another nice trick that should work in all almost all cases is to
> use the state of the PMIC USB_IN pin as VBUS detection. All battery-
> powered devices I have seen route the USB VBUS to PM8916 USB_IN. And
> even many boards like DB410c seem to do that or at least permanently
> supply 5V there. In all these cases the &pm8916_usbin extcon will
> report a VBUS state that should make USB work.
>
> Have you tried using that on your MSM8939 board with the Type-C setup?
>
> &pm8916_usbin {
> status = "okay";
> };
>
> &usb {
> status = "okay";
> usb-role-switch;
> extcon = <&pm8916_usbin>;
> };
>
> &usb_hs_phy {
> extcon = <&pm8916_usbin>;
> };
>
> Stephan
I checked USBIN before my last email reply.
Its possible its connected but its not there on the 8939 schematic I have.
---
bod
next prev parent reply other threads:[~2022-12-29 21:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 18:34 [PATCH v2 0/2] qcom: Add a method to manually toggle the DP pullup on HS USB PHY Bryan O'Donoghue
2022-12-29 18:34 ` [PATCH v2 1/2] dt-bindings: phy: Add qcom,dp-manual-pullup description Bryan O'Donoghue
2022-12-29 18:57 ` Stephan Gerhold
2022-12-29 19:48 ` Bryan O'Donoghue
2022-12-29 20:43 ` Stephan Gerhold
2022-12-30 8:21 ` Krzysztof Kozlowski
2022-12-29 18:34 ` [PATCH v2 2/2] phy: qcom-usb-hs: Add qcom,dp-manual-pullup logic Bryan O'Donoghue
2022-12-29 19:45 ` Stephan Gerhold
2022-12-29 19:55 ` Bryan O'Donoghue
2022-12-29 21:02 ` Stephan Gerhold
2022-12-29 21:05 ` Bryan O'Donoghue [this message]
2022-12-29 21:11 ` Stephan Gerhold
2022-12-29 21:20 ` Bryan O'Donoghue
2022-12-29 21:41 ` Stephan Gerhold
2022-12-29 23:38 ` Bryan O'Donoghue
2022-12-30 12:05 ` Stephan Gerhold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6061938c-b830-2fe0-2f4d-368e34c33676@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=stephan@gerhold.net \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox