From: Roger Quadros <rogerq@ti.com>
To: Vivek Gautam <gautamvivek1987@gmail.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Felipe Balbi <balbi@ti.com>,
Benoit Cousson <bcousson@baylibre.com>,
Tony Lindgren <tony@atomide.com>,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Grant Likely <grant.likely@linaro.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Kumar Gala <galak@codeaurora.org>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ian.campbell@citrix.com>,
Rob Landley <rob@landley.net>,
george.cherian@ti.com, Greg KH <gregkh@linuxfoundation.org>,
linux-doc@vger.kernel.org, linux-omap@vger.kernel.org,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linux USB Mailing List <linux-usb@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] usb: dwc3: get "usb_phy" only if the platform indicates the presence of PHY
Date: Thu, 12 Sep 2013 14:04:36 +0300 [thread overview]
Message-ID: <52319FC4.8040703@ti.com> (raw)
In-Reply-To: <CAFp+6iE+xbSWWp2bNc5MRSUrA4Fi6qVU4vhR4+mtZHZGidkMGg@mail.gmail.com>
Hi,
On 09/12/2013 01:47 PM, Vivek Gautam wrote:
> On Thu, Sep 12, 2013 at 4:06 PM, Roger Quadros <rogerq@ti.com> wrote:
>> Hi Kishon,
>>
>> On 09/02/2013 06:43 PM, Kishon Vijay Abraham I wrote:
>>> There can be systems which does not have a external usb_phy, so get
>>> usb_phy only if usb-phy property is added in the case of dt boot or if
>>> platform_data indicates the presence of PHY. Also remove checking if
>>> return value is -ENXIO since it's now changed to always enable usb_phy layer.
>>>
>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>> drivers/usb/dwc3/Kconfig | 1 +
>>> drivers/usb/dwc3/core.c | 60 +++++++++++++++++---------------------
>>> drivers/usb/dwc3/platform_data.h | 1 +
>>> 3 files changed, 28 insertions(+), 34 deletions(-)
>>>
>>> diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
>>> index f969ea2..cfc16dd 100644
>>> --- a/drivers/usb/dwc3/Kconfig
>>> +++ b/drivers/usb/dwc3/Kconfig
>>> @@ -2,6 +2,7 @@ config USB_DWC3
>>> tristate "DesignWare USB3 DRD Core Support"
>>> depends on (USB || USB_GADGET) && GENERIC_HARDIRQS && HAS_DMA
>>> depends on EXTCON
>>> + select USB_PHY
>>> select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD
>>> help
>>> Say Y or M here if your system has a Dual Role SuperSpeed
>>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>>> index 474162e..428c29e 100644
>>> --- a/drivers/usb/dwc3/core.c
>>> +++ b/drivers/usb/dwc3/core.c
>>> @@ -387,16 +387,38 @@ static int dwc3_probe(struct platform_device *pdev)
>>> if (node) {
>>> dwc->maximum_speed = of_usb_get_maximum_speed(node);
>>>
>>> - dwc->usb2_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 0);
>>> - dwc->usb3_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 1);
>>> + if (of_property_read_bool(node, "usb-phy")) {
>>> + dwc->usb2_phy = devm_usb_get_phy_by_phandle(dev,
>>> + "usb-phy", 0);
>>> + if (IS_ERR(dwc->usb2_phy))
>>> + return PTR_ERR(dwc->usb2_phy);
>>> + dwc->usb3_phy = devm_usb_get_phy_by_phandle(dev,
>>> + "usb-phy", 1);
>>> + if (IS_ERR(dwc->usb3_phy))
>>> + return PTR_ERR(dwc->usb3_phy);
>>
>> Some DWC3 instances use only usb2_phy. e.g. on DRA7 the 2nd dwc3 instance doesn't use usb3_phy.
>> This needs to be a valid case and driver shouldn't error out.
>
> So, i think adding flexibility to DWC3 to have either
> usb2-phy/usb3-phy or both of them seems to be valid point.
> Any suggestions ?
>
For high speed operation we need only usb2_phy but for super speed we need both usb2_phy
and usb3_phy.
Why would a dwc3 controller use only usb3_phy? A USB3.0 interface has to be compatible with
USB2.0 as well, no?
cheers,
-roger
next prev parent reply other threads:[~2013-09-12 11:04 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 15:43 [PATCH 0/7] Make dwc3 use Generic PHY Framework and misc cleanup Kishon Vijay Abraham I
2013-09-02 15:43 ` [PATCH 1/7] usb: dwc3: get "usb_phy" only if the platform indicates the presence of PHY Kishon Vijay Abraham I
2013-09-12 10:36 ` Roger Quadros
2013-09-12 10:47 ` Vivek Gautam
2013-09-12 11:04 ` Roger Quadros [this message]
2013-09-12 11:26 ` Vivek Gautam
2013-09-12 13:11 ` Roger Quadros
[not found] ` <5231BD9F.4020105-l0cyMroinI0@public.gmane.org>
2013-09-16 8:40 ` Vivek Gautam
2013-09-17 15:45 ` Felipe Balbi
2013-09-02 15:43 ` [PATCH 2/7] usb: dwc3: adapt dwc3 core to use Generic PHY Framework Kishon Vijay Abraham I
2013-09-12 9:27 ` Vivek Gautam
2013-09-12 10:10 ` Kishon Vijay Abraham I
2013-09-12 10:27 ` Vivek Gautam
2013-10-10 10:28 ` Kishon Vijay Abraham I
[not found] ` <1378136591-7463-3-git-send-email-kishon-l0cyMroinI0@public.gmane.org>
2013-09-12 13:19 ` Roger Quadros
[not found] ` <5231BF7A.3080104-l0cyMroinI0@public.gmane.org>
2013-09-16 2:52 ` Kishon Vijay Abraham I
2013-09-16 7:25 ` Roger Quadros
2013-10-11 15:09 ` Roger Quadros
2013-10-14 9:26 ` Kishon Vijay Abraham I
2013-10-14 10:21 ` Roger Quadros
2013-10-15 5:31 ` Kishon Vijay Abraham I
2013-10-15 7:57 ` Roger Quadros
2013-10-15 12:00 ` Felipe Balbi
2013-10-15 11:58 ` Felipe Balbi
2013-10-15 11:57 ` Felipe Balbi
2013-10-15 12:10 ` Roger Quadros
2013-10-15 13:19 ` Felipe Balbi
2013-10-15 13:48 ` Roger Quadros
2013-10-15 13:56 ` Felipe Balbi
2013-10-15 14:03 ` Roger Quadros
2013-10-15 14:12 ` Felipe Balbi
2013-09-02 15:43 ` [PATCH 3/7] drivers: phy: usb3/pipe3: Adapt pipe3 driver to " Kishon Vijay Abraham I
2013-09-12 11:19 ` Roger Quadros
2013-09-16 3:01 ` Kishon Vijay Abraham I
2013-09-16 7:37 ` Roger Quadros
[not found] ` <5236B537.1090902-l0cyMroinI0@public.gmane.org>
2013-10-11 15:02 ` Roger Quadros
2013-10-14 9:19 ` Kishon Vijay Abraham I
2013-10-14 9:31 ` Roger Quadros
2013-09-02 15:43 ` [PATCH 4/7] Documentation: dt bindings: move ..usb/usb-phy.txt to ..phy/omap-phy.txt Kishon Vijay Abraham I
2013-09-12 13:23 ` Roger Quadros
[not found] ` <5231C040.4040609-l0cyMroinI0@public.gmane.org>
2013-09-16 3:04 ` Kishon Vijay Abraham I
2013-09-02 15:43 ` [PATCH 5/7] phy: omap-usb2: move omap_usb.h from linux/usb/ to linux/phy/ Kishon Vijay Abraham I
2013-09-02 15:43 ` [PATCH 6/7] arm/dts: added dt properties to adapt to the new phy framwork Kishon Vijay Abraham I
2013-09-12 13:28 ` Roger Quadros
2013-09-02 15:43 ` [PATCH 7/7] drivers: phy: renamed struct omap_control_usb to struct omap_control_phy Kishon Vijay Abraham I
2013-09-12 13:42 ` Roger Quadros
[not found] ` <5231C4C4.1000100-l0cyMroinI0@public.gmane.org>
2013-09-16 3:06 ` Kishon Vijay Abraham I
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=52319FC4.8040703@ti.com \
--to=rogerq@ti.com \
--cc=balbi@ti.com \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gautamvivek1987@gmail.com \
--cc=george.cherian@ti.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=ian.campbell@citrix.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=s.nawrocki@samsung.com \
--cc=swarren@wwwdotorg.org \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).