From: hzpeterchen@gmail.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] doc: usb: ci-hdrc-usb2: add property over-current-polarity
Date: Tue, 19 Jul 2016 09:47:00 +0800 [thread overview]
Message-ID: <20160719014700.GH31293@shlinux2> (raw)
In-Reply-To: <578CF4C2.4000804@gmail.com>
On Mon, Jul 18, 2016 at 08:24:50AM -0700, Joshua Clayton wrote:
> Greetings,
> On 07/18/2016 04:15 AM, Li Jun wrote:
> > Adding over-current-polarity to indicate the over current flag
> > is low active or high active.
> >
> > Signed-off-by: Li Jun <jun.li@nxp.com>
> > ---
> > Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > index 341dc67..c5d35f4 100644
> > --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > @@ -81,6 +81,8 @@ i.mx specific properties
> > - fsl,usbmisc: phandler of non-core register device, with one
> > argument that indicate usb controller index
> > - disable-over-current: disable over current detect
> > +- over-current-polarity: 0 if the over current signal polarity is low active,
> > + 1 if the over current signal polarity is high active.
> > - external-vbus-divider: enables off-chip resistor divider for Vbus
> >
> > Example:
> The gpio device bindings already have active low/ active high.
> Could that be used here?
>
No, the over current pin is a dedicated pin for USB, you need
to configure it through pinmux. If we are using a gpio (even
the same pin as OC pin), the USB subsystem will not know
OC event. The polarity is for OC pin and configured through
USB register.
> In the imx SPI subsystem, for instance, the developers used gpio rather than
> MUXED spi chipselect lines for exactly this kind of flexibility.
>
> If there is no magic happening in silicon (which would seem to be the case if we can
> handle inverting polarity in the driver), I would suggest going the gpiod route.
>
--
Best Regards,
Peter Chen
WARNING: multiple messages have this Message-ID (diff)
From: Peter Chen <hzpeterchen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Joshua Clayton <stillcompiling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Li Jun <jun.li-3arQi8VN3Tc@public.gmane.org>,
peter.chen-3arQi8VN3Tc@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 2/4] doc: usb: ci-hdrc-usb2: add property over-current-polarity
Date: Tue, 19 Jul 2016 09:47:00 +0800 [thread overview]
Message-ID: <20160719014700.GH31293@shlinux2> (raw)
In-Reply-To: <578CF4C2.4000804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Mon, Jul 18, 2016 at 08:24:50AM -0700, Joshua Clayton wrote:
> Greetings,
> On 07/18/2016 04:15 AM, Li Jun wrote:
> > Adding over-current-polarity to indicate the over current flag
> > is low active or high active.
> >
> > Signed-off-by: Li Jun <jun.li-3arQi8VN3Tc@public.gmane.org>
> > ---
> > Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > index 341dc67..c5d35f4 100644
> > --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > @@ -81,6 +81,8 @@ i.mx specific properties
> > - fsl,usbmisc: phandler of non-core register device, with one
> > argument that indicate usb controller index
> > - disable-over-current: disable over current detect
> > +- over-current-polarity: 0 if the over current signal polarity is low active,
> > + 1 if the over current signal polarity is high active.
> > - external-vbus-divider: enables off-chip resistor divider for Vbus
> >
> > Example:
> The gpio device bindings already have active low/ active high.
> Could that be used here?
>
No, the over current pin is a dedicated pin for USB, you need
to configure it through pinmux. If we are using a gpio (even
the same pin as OC pin), the USB subsystem will not know
OC event. The polarity is for OC pin and configured through
USB register.
> In the imx SPI subsystem, for instance, the developers used gpio rather than
> MUXED spi chipselect lines for exactly this kind of flexibility.
>
> If there is no magic happening in silicon (which would seem to be the case if we can
> handle inverting polarity in the driver), I would suggest going the gpiod route.
>
--
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-07-19 1:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 11:15 [PATCH 1/4] doc: usb: usbmisc-imx: add imx7d compatible string Li Jun
2016-07-18 11:15 ` Li Jun
2016-07-18 11:15 ` [PATCH 2/4] doc: usb: ci-hdrc-usb2: add property over-current-polarity Li Jun
2016-07-18 11:15 ` Li Jun
2016-07-18 15:24 ` Joshua Clayton
2016-07-18 15:24 ` Joshua Clayton
2016-07-19 1:47 ` Peter Chen [this message]
2016-07-19 1:47 ` Peter Chen
2016-07-19 2:56 ` Jun Li
2016-07-19 2:56 ` Jun Li
2016-07-20 1:09 ` Rob Herring
2016-07-20 1:09 ` Rob Herring
2016-07-18 11:15 ` [PATCH 3/4] ARM: dts: imx7d-sdb: Set OTG2 oc polarity to be active low Li Jun
2016-07-18 11:15 ` Li Jun
2016-07-18 11:15 ` [PATCH 4/4] usb: chipidea: imx: set over current polarity per dts setting Li Jun
2016-07-18 11:15 ` Li Jun
2016-07-19 1:57 ` Peter Chen
2016-07-19 1:57 ` Peter Chen
2016-07-19 2:31 ` Jun Li
2016-07-19 2:31 ` Jun Li
2016-07-19 2:44 ` Peter Chen
2016-07-19 2:44 ` Peter Chen
2016-07-20 1:04 ` [PATCH 1/4] doc: usb: usbmisc-imx: add imx7d compatible string Rob Herring
2016-07-20 1:04 ` 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=20160719014700.GH31293@shlinux2 \
--to=hzpeterchen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.