From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 01/12] arm64: dts: allwinner: h6: Add Orange Pi 3 DTS Date: Tue, 9 Apr 2019 09:22:37 +0200 Message-ID: <20190409072237.fn2pe7ugtukdlnm2@flea> References: <20190405234514.6183-1-megous@megous.com> <20190405234514.6183-2-megous@megous.com> <20190408074628.e5ers4gzlqz4coyk@flea> <20190408225851.svelyf7h3fiw4wjw@core.my.home> Reply-To: maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vazlaal22ii7l2e2" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <20190408225851.svelyf7h3fiw4wjw-9v8tmBix7cb9zxVx7UNMDg@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Chen-Yu Tsai , Rob Herring , Linus Walleij , David Airlie , Daniel Vetter , Mark Rutland , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo , Naveen Gupta , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev@v List-Id: devicetree@vger.kernel.org --vazlaal22ii7l2e2 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 09, 2019 at 12:58:51AM +0200, Ond=C5=99ej Jirman wrote: > > > +&usb2otg { > > > + dr_mode =3D "host"; > > > + status =3D "okay"; > > > +}; > > > + > > > +&usb2phy { > > > + usb0_id_det-gpios =3D <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */ > > > + usb0_vbus-supply =3D <®_vcc5v>; > > > + usb3_vbus-supply =3D <®_vcc5v>; > > > + status =3D "okay"; > > > > If we have an ID pin, then why is the OTG controller set to host? > > This board has fixed conenction between VBUS and DCIN, so if it is powere= d > from DCIN and someone will try to connect it to the PC as a peripheral, > they'll get PC's VBUS shorted to the power supply connected to DCIN. > > Depending on voltage difference between DCIN and PC's VBUS, you can get > overcurrent condidion and PC's port shutdown. > > The board is not entirely foolproof in this regard. > > - It can be host powered when connected via microUSB > - It can be self-powered and host an device on microUSB > - It can be self-powered and serve as a peripheral if you modify > a cable (cut VBUS) or the host is expecting this and has some > VBUS detection logic (most hosts will not have this) > > I just didn't want to encourage use as a peripheral, because it's not > very foolproof. But I guess, DTS file will not stop anyone anyway. > > I'll change it to otg, and maybe leave a small note. Your solution was great actually. I guess making a comment explaining what you just did would be better though, so that no one is confused. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --=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. --vazlaal22ii7l2e2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXKxIPQAKCRDj7w1vZxhR xQcXAQDol3REexlF7y84fFUCcIEyEMiedbnGpFQLj6gLdmA1LQD6AnjKbKwNsJqo Is/r3wfDkq5t5cMb3FvH7ld60Tv3rA0= =d1oR -----END PGP SIGNATURE----- --vazlaal22ii7l2e2--