Skip to content

Commit b2f1eaa

Browse files
shimodayFelipe Balbi
authored andcommitted
usb: gadget: udc: renesas-usb3: clear VBOUT bit in DRD_CON
This driver should clear the bit. Otherwise, the VBUS will output wrongly if the usb port on a board has VBUS output capability. Fixes: 746bfe6 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: <[email protected]> # v4.5+ Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 9d7aba7 commit b2f1eaa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/gadget/udc/renesas_usb3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106

107107
/* DRD_CON */
108108
#define DRD_CON_PERI_CON BIT(24)
109+
#define DRD_CON_VBOUT BIT(0)
109110

110111
/* USB_INT_ENA_1 and USB_INT_STA_1 */
111112
#define USB_INT_1_B3_PLLWKUP BIT(31)
@@ -363,6 +364,7 @@ static void usb3_init_epc_registers(struct renesas_usb3 *usb3)
363364
{
364365
/* FIXME: How to change host / peripheral mode as well? */
365366
usb3_set_bit(usb3, DRD_CON_PERI_CON, USB3_DRD_CON);
367+
usb3_clear_bit(usb3, DRD_CON_VBOUT, USB3_DRD_CON);
366368

367369
usb3_write(usb3, ~0, USB3_USB_INT_STA_1);
368370
usb3_enable_irq_1(usb3, USB_INT_1_VBUS_CNG);

0 commit comments

Comments
 (0)