From mboxrd@z Thu Jan 1 00:00:00 1970 From: Icenowy Zheng Subject: Re: [PATCH v2] arm64: allwinner: a64: orangepi-zero-plus2: add usb otg Date: Mon, 15 Jan 2018 16:05:07 +0800 Message-ID: <8080607.cgOBd57Bn1@ice-x220i> References: <1515748144-25204-1-git-send-email-jagan@amarulasolutions.com> <20180115080139.k2vrczo3hnvdt3df@flea.lan> Reply-To: icenowy-h8G6r0blFSE@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <20180115080139.k2vrczo3hnvdt3df-ZC1Zs529Oq4@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Maxime Ripard , Jagan Teki , Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Catalin Marinas , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Will Deacon , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Chen-Yu Tsai , Rob Herring , Michael Trimarchi List-Id: devicetree@vger.kernel.org =E5=9C=A8 2018=E5=B9=B41=E6=9C=8815=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=80 CST= =E4=B8=8B=E5=8D=884:01:39=EF=BC=8CMaxime Ripard =E5=86=99=E9=81=93=EF=BC= =9A > Hi, >=20 > 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 > >=20 > > Tested mass storage function. > >=20 > > Signed-off-by: Jagan Teki > > --- > > Changes for v2: > > - Change dr_mode to peripheral > >=20 > > .../dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 18 > > ++++++++++++++++++ 1 file changed, 18 insertions(+) > >=20 > > 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 @@ > >=20 > > }; > > =20 > > }; > >=20 > > +&ehci0 { > > + status =3D "okay"; > > +}; > > + > >=20 > > &mmc0 { > > =20 > > pinctrl-names =3D "default"; > > pinctrl-0 =3D <&mmc0_pins_a>; > >=20 > > @@ -111,6 +115,10 @@ > >=20 > > status =3D "okay"; > > =20 > > }; > >=20 > > +&ohci0 { > > + status =3D "okay"; > > +}; > > + > >=20 > > &uart0 { > > =20 > > pinctrl-names =3D "default"; > > pinctrl-0 =3D <&uart0_pins_a>; > >=20 > > @@ -122,3 +130,13 @@ > >=20 > > pinctrl-0 =3D <&uart1_pins>, <&uart1_rts_cts_pins>; > > status =3D "okay"; > > =20 > > }; > >=20 > > + > > +&usb_otg { > > + dr_mode =3D "peripheral"; >=20 > 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 ho= st=20 in peripheral mode. >=20 > Maxime --=20 You received this message because you are subscribed to the Google Groups "= linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.