From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v2] arm64: allwinner: a64: orangepi-zero-plus2: add usb otg Date: Mon, 15 Jan 2018 09:01:39 +0100 Message-ID: <20180115080139.k2vrczo3hnvdt3df@flea.lan> References: <1515748144-25204-1-git-send-email-jagan@amarulasolutions.com> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p6rafjyb3xdq3bfv" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <1515748144-25204-1-git-send-email-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Jagan Teki Cc: Chen-Yu Tsai , Icenowy Zheng , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Michael Trimarchi , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org --p6rafjyb3xdq3bfv Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline 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 > --- > 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. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --p6rafjyb3xdq3bfv--