public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: icenowy@aosc.io (Icenowy Zheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: allwinner: a64: orangepi-zero-plus2: add usb otg
Date: Mon, 15 Jan 2018 16:05:07 +0800	[thread overview]
Message-ID: <8080607.cgOBd57Bn1@ice-x220i> (raw)
In-Reply-To: <20180115080139.k2vrczo3hnvdt3df@flea.lan>

? 2018?1?15???? CST ??4:01:39?Maxime Ripard ???
> Hi,
> 
> On Fri, Jan 12, 2018 at 02:39:04PM +0530, Jagan Teki wrote:
> > Add usb otg support for orangepi-zero-plus2 board:
> > - Add usb_otg node with dr_mode as 'otg'
> > - USB0-IDDET connected to PA21
> > - VBUS connected through DCIN which always on
> > 
> > Tested mass storage function.
> > 
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v2:
> > - Change dr_mode to peripheral
> > 
> >  .../dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 18
> >  ++++++++++++++++++ 1 file changed, 18 insertions(+)
> > 
> > diff --git
> > a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index
> > af43533..6511190 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > @@ -73,6 +73,10 @@
> > 
> >  	};
> >  
> >  };
> > 
> > +&ehci0 {
> > +	status = "okay";
> > +};
> > +
> > 
> >  &mmc0 {
> >  
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&mmc0_pins_a>;
> > 
> > @@ -111,6 +115,10 @@
> > 
> >  	status = "okay";
> >  
> >  };
> > 
> > +&ohci0 {
> > +	status = "okay";
> > +};
> > +
> > 
> >  &uart0 {
> >  
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&uart0_pins_a>;
> > 
> > @@ -122,3 +130,13 @@
> > 
> >  	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
> >  	status = "okay";
> >  
> >  };
> > 
> > +
> > +&usb_otg {
> > +	dr_mode = "peripheral";
> 
> If VBUS is always on, this can only operate safely in host mode, not
> peripheral.

I think this kind of device is designed to directly drain power from the host 
in peripheral mode.

> 
> Maxime

  reply	other threads:[~2018-01-15  8:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12  9:09 [PATCH v2] arm64: allwinner: a64: orangepi-zero-plus2: add usb otg Jagan Teki
2018-01-15  8:01 ` Maxime Ripard
2018-01-15  8:05   ` Icenowy Zheng [this message]
2018-01-15 15:33     ` Maxime Ripard

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=8080607.cgOBd57Bn1@ice-x220i \
    --to=icenowy@aosc.io \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox