Re: [PATCH 3/3] ARM: dts: sunxi: add support for Anbernic RG-Nano

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 29, 2023 at 08:34:10PM +0100, Andre Przywara wrote:
> > > > +&usbphy {
> > > > +	usb0_id_det-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> 
> Where is this pin connected to, in the USB-C connector? One of the CC
> pins?
> 
> > > > +	status = "okay";  
> > > 
> > > So in the commit message you say "USB-C for power", but this here
> > > describes a full featured USB port. So does that work? Can you use it as a
> > > gadget, but also as a host?  
> > 
> > Yes, it's an OTG port with the ID pin pulled to ground.
> 
> Do you mean both CC pins? IIRC this means it's hardwired as a
> peripheral (UFP).
> 
> If I ignore the ID pin above, this looks like on the OrangePi Zero2 or
> the MangoPi MQ-R. In those cases we put peripheral in the DT, as this
> is what this connection seems to indicate. That *can* be used a host as
> well, with the "right" cable, but it's not really a well supported
> configuration, so we leave this up to people to change this locally,
> should they really desire so.

The ID pin above is exactly what makes "the right cable" works:
depending on the state of the ID pin the controller will act either as a
peripheral or a host. Dual-mode works just fine, so if the hardware
supports it there's no reason not to enable it.

Maxime

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux