On Fri, Jun 30, 2023 at 10:16:35AM +0200, Maxime Ripard wrote: > 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. Right, I'll have it as dr_mode = "otg". Since I have neither schematics nor a proper devicetree I'll have to expend some additional effort on this port, just as soon as I get the panel working. :-) > > Maxime