LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Manu Gautam <mgautam@codeaurora.org>
To: Jack Pham <jackp@codeaurora.org>
Cc: balbi@kernel.org, robh@kernel.org, andy.gross@linaro.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, robh+dt@kernel.org,
	linux-arm-msm@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2 2/3] usb: dwc3: Add Qualcomm DWC3 glue driver
Date: Fri, 13 Apr 2018 23:32:04 +0530	[thread overview]
Message-ID: <076ce053-c51d-0a53-507a-faa7481e8dcc@codeaurora.org> (raw)
In-Reply-To: <20180413173322.GA30306@usblab-sd-06.qualcomm.com>

Hi Jack,


On 4/13/2018 11:03 PM, Jack Pham wrote:
> Hi Manu,
>
> On Fri, Apr 13, 2018 at 10:21:23PM +0530, Manu Gautam wrote:
>> DWC3 controller on Qualcomm SOCs has a Qscratch wrapper.
>> Some of its uses are described below resulting in need to
>> have a separate glue driver instead of using dwc3-of-simple:
>>  - It exposes register interface to override vbus-override
>>    and lane0-pwr-present signals going to hardware. These
>>    must be updated in peripheral mode for DWC3 if vbus lines
>>    are not connected to hardware block. Otherwise RX termination
>>    in SS mode or DP pull-up is not applied by device controller.
>>  - pwr_events_irq_stat support to check if USB2 PHY is in L2 state
>>    before glue driver proceeds with suspend.
>>  - Support for wakeup interrupts lines that are asserted whenever
>>    there is any wakeup event on USB3 or USB2 bus.
>>  - Support to replace pip3 clock going to DWC3 with utmi clock
>>    for hardware configuration where SSPHY is not used with DWC3.
>>
>> Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
> <snip>
>
>> +static int dwc3_qcom_register_extcon(struct dwc3_qcom *qcom)
>> +{
>> +	struct device		*dev = qcom->dev;
>> +	struct extcon_dev	*host_edev;
>> +	int			ret;
>> +
>> +	if (!of_property_read_bool(dev->of_node, "extcon"))
>> +		return 0;
>> +
>> +	qcom->edev = extcon_get_edev_by_phandle(dev, 0);
> Are the extcon phandles bound to the glue node? I don't see the
> description in the bindings doc in PATCH 1/3. And if so, would it be
> a duplicate of the child node's extcon binding? Then again, the
> alternative would be to grab it directly from the child (i.e.
> qcom->dwc3->dev.of_node) which I'm not sure is ok to do or not.
>

Yes these are bound to glue node. I missed to add it to documentation, will do
so.
I kept it separate for couple of reasons - one is to not peek too-much into child
node. Another reason is that doing so allows to have extcon in "peripheral"
only mode as well (not just drd mode which is the case with dwc3 core).
It allows to notify h/w when vbus is not there in device mode which IMO is
right thing to do.



-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


  reply	other threads:[~2018-04-13 18:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 16:51 [PATCH v2 0/3] usb: dwc3: support for Qualcomm DWC3 glue Manu Gautam
2018-04-13 16:51 ` [PATCH v2 1/3] dt-bindings: usb: Update documentation for Qualcomm DWC3 driver Manu Gautam
2018-04-16 20:38   ` Rob Herring
2018-04-17  3:39     ` Manu Gautam
2018-04-13 16:51 ` [PATCH v2 2/3] usb: dwc3: Add Qualcomm DWC3 glue driver Manu Gautam
2018-04-13 17:33   ` Jack Pham
2018-04-13 18:02     ` Manu Gautam [this message]
2018-04-13 18:23       ` Jack Pham
2018-04-13 16:51 ` [PATCH v2 3/3] usb: dwc3: core: Suspend PHYs on runtime suspend in host mode Manu Gautam

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=076ce053-c51d-0a53-507a-faa7481e8dcc@codeaurora.org \
    --to=mgautam@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jackp@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --subject='Re: [PATCH v2 2/3] usb: dwc3: Add Qualcomm DWC3 glue driver' \
    /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

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).