From: Tim Bird <tim.bird@sonymobile.com>
To: Rob Herring <robherring2@gmail.com>
Cc: "Antoine Ténart" <antoine.tenart@free-electrons.com>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Peter Chen" <Peter.Chen@freescale.com>,
"Linux USB List" <linux-usb@vger.kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"\"Andersson, Björn\"" <Bjorn.Andersson@sonymobile.com>
Subject: Re: Bug: shared usb dt document is incorrect
Date: Wed, 29 Jul 2015 10:29:08 -0700 [thread overview]
Message-ID: <55B90D64.1010509@sonymobile.com> (raw)
In-Reply-To: <CAL_JsqLTnHUTnmwc06ZK3CuqzB1x5t+BqU_xS=BK8mELUO08gw@mail.gmail.com>
On 07/28/2015 07:54 PM, Rob Herring wrote:
> On Tue, Jul 28, 2015 at 8:06 PM, Tim Bird <tim.bird@sonymobile.com> wrote:
>> Antoine and Rob,
>>
>> I was just doing some testing with USB on a Qualcomm SoC.
>>
>> I followed the instructions in the binding document:
>> Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
>>
>> which has a compatible for "qcom,ci-hdrc", and is, in general,
>> for chipidea-based USB controllers.
>>
>> It says in the document that the property usb-phy is deprecated, and to
>> use phys and phy-names instead. However, the Qualcomm
>> driver for this still uses usb-phy. That driver is in:
>> drivers/usb/chipidea/ci_hdrc_msm.c
>
> Deprecated means it still exists in the wild and should be maintained,
> but don't use it for new dts files.
OK. But for the Qualcomm driver, the new binding doesn't work (see below).
Since the binding doc specifically says: 'Use "phys" instead [of "usb-phy"].',
it is wrong as currently written, for this controller/phy combination.
>> I'm guessing I should update the Qualcomm driver to use
>> phys and phy-names, but wanted to check with you-all to
>> verify that this is the preferred method of getting
>> phys by phandle now. It's either change the driver
>> or make an exception in the binding document, I believe.
>
> That would be fine along with updating the dts files, but the doc
> should remain for some time.
Does this mean I should try phys/phy-names, and if that doesn't work
try usb-phy, for backwards compatibility?
>> I presume I should be changing devm_usb_get_phy_by_phandle()
>> to of_phy_get(), but let me know if there's more to it than that.
>
> devm_phy_get actually. The driver already supports it. See
> ci_hdrc_probe in core.c.
In my case the probe that is running is ci_hdrc_msm_probe(), in ci_hdrc_msm.c
This probe uses devm_usb_get_phy_by_phandle(..."usb-phy"). If I specify phys/phy-names
in my dts, the probe fails silently - leading ultimately to USB not working.
If I specify "usb-phy" in my dts, everything works. In this case, that property
is NOT deprecated. It's the only one that works.
I don't understand what's going on with the different probe routines and how the
SoC-specific parts interact with the core. I just know that the kernel behaviour
and the binding doc don't match, and I'd like to help fix it if I can.
Thanks for your patience while I try to understand this issue.
-- Tim
next prev parent reply other threads:[~2015-07-29 17:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 1:06 Bug: shared usb dt document is incorrect Tim Bird
2015-07-29 0:27 ` Peter Chen
2015-07-29 2:54 ` Rob Herring
2015-07-29 3:12 ` Peter Chen
2015-07-29 3:25 ` Rob Herring
2015-07-29 17:29 ` Tim Bird [this message]
2015-07-29 20:24 ` Rob Herring
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=55B90D64.1010509@sonymobile.com \
--to=tim.bird@sonymobile.com \
--cc=Bjorn.Andersson@sonymobile.com \
--cc=Peter.Chen@freescale.com \
--cc=antoine.tenart@free-electrons.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robherring2@gmail.com \
/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