On Tue, 4 Jul 2023 18:02:53 -0300 Fabio Estevam <festevam@xxxxxxxxx> wrote: > Hi Hugo, > > On Tue, Jul 4, 2023 at 5:41 PM Hugo Villeneuve <hugo@xxxxxxxxxxx> wrote: > > > Hi Fabio, > > with interrupts = <11 IRQ_TYPE_LEVEL_LOW>, USB OTG doesn't work. > > PTN5150 datasheet says: > > "Any changes in the attach/detach events or Rp current source changes > will trigger INTB pin to go LOW." Hi Fabio, it is important to remember that on this board, like I explained before, the INTB pin is not connected to anything. It is only the ID pin (9) that is connected to the GPIO1_11 pin. > What about: interrupts = <11 IRQ_TYPE_EDGE_FALLING>; ? With this setting, USB OTG works: $ dmesg | grep 5150 [ 4.833529] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 4.839972] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 4.874173] ptn5150 1-003d: DEBUG_IRQ: error in usb_role_switch_get() [ 4.896822] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 4.902905] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 4.911190] ptn5150 1-003d: DEBUG_IRQ: error in usb_role_switch_get() [ 4.918462] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 4.926197] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 4.935210] ptn5150 1-003d: DEBUG_IRQ: error in usb_role_switch_get() [ 4.947673] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 4.953771] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 4.961104] ptn5150 1-003d: DEBUG_IRQ: error in usb_role_switch_get() [ 5.052165] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 5.058234] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 5.064632] ptn5150 1-003d: DEBUG_IRQ: error in usb_role_switch_get() [ 5.096452] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 5.102578] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 5.114959] ptn5150 1-003d: DEBUG_IRQ: error in usb_role_switch_get() [ 5.187060] ptn5150 1-003d: No VBUS GPIO, ignoring VBUS control [ 5.193243] ptn5150 1-003d: DEBUG_IRQ: i2c->irq: 42 [ 5.206235] ptn5150 1-003d: DEBUG_IRQ: probe done > Also, please add a pullup to the GPIO1_11 pad. There is already an external 10K pull-up resistor (R88) to +3.3V on GPIO1_11 pin... Hugo.