File tree Expand file tree Collapse file tree 6 files changed +20
-0
lines changed Expand file tree Collapse file tree 6 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 770770
771771 phys = <&usb_phy>;
772772 phy-names = "usb2-phy";
773+ g-rx-fifo-size = <256>;
773774 g-tx-fifo-size = <256 256 256 256>;
774775 };
775776 };
Original file line number Diff line number Diff line change @@ -716,6 +716,7 @@ CONFIG_USBIP_CORE=m
716716CONFIG_USBIP_VHCI_HCD=m
717717CONFIG_USBIP_HOST=m
718718CONFIG_USB_DWC2=y
719+ CONFIG_USB_DWC2_DISABLE_VOD=y
719720CONFIG_USB_SERIAL=m
720721CONFIG_USB_SERIAL_GENERIC=y
721722CONFIG_USB_SERIAL_AIRCABLE=m
Original file line number Diff line number Diff line change @@ -97,4 +97,10 @@ config USB_DWC2_DEBUG_PERIODIC
9797 non-periodic transfers, but of course the debug logs will be
9898 incomplete. Note that this also disables some debug messages
9999 for which the transfer type cannot be deduced.
100+
101+ config USB_DWC2_DISABLE_VOD
102+ bool "Disable VBUS overcurrent detection"
103+ help
104+ Say Y here to switch off VBUS overcurrent detection. It enables USB
105+ functionality blocked by overcurrent detection.
100106endif
Original file line number Diff line number Diff line change @@ -715,6 +715,13 @@ void dwc2_core_host_init(struct dwc2_hsotg *hsotg)
715715 otgctl &= ~GOTGCTL_HSTSETHNPEN ;
716716 writel (otgctl , hsotg -> regs + GOTGCTL );
717717
718+ #ifdef CONFIG_USB_DWC2_DISABLE_VOD
719+ otgctl = readl (hsotg -> regs + GOTGCTL );
720+ otgctl |= GOTGCTL_VB_VALID_OV_VAL ;
721+ otgctl |= GOTGCTL_VB_VALID_OV_EN ;
722+ writel (otgctl , hsotg -> regs + GOTGCTL );
723+ #endif
724+
718725 if (hsotg -> core_params -> dma_desc_enable <= 0 ) {
719726 int num_channels , i ;
720727 u32 hcchar ;
Original file line number Diff line number Diff line change @@ -350,6 +350,9 @@ static void dwc2_port_intr(struct dwc2_hsotg *hsotg)
350350 dev_vdbg (hsotg -> dev ,
351351 "--Port Interrupt HPRT0=0x%08x Port Connect Detected--\n" ,
352352 hprt0 );
353+ if (hsotg -> lx_state != DWC2_L0 )
354+ usb_hcd_resume_root_hub (hsotg -> priv );
355+
353356 hsotg -> flags .b .port_connect_status_change = 1 ;
354357 hsotg -> flags .b .port_connect_status = 1 ;
355358 hprt0_modify |= HPRT0_CONNDET ;
Original file line number Diff line number Diff line change 5252#define GOTGCTL_HSTSETHNPEN (1 << 10)
5353#define GOTGCTL_HNPREQ (1 << 9)
5454#define GOTGCTL_HSTNEGSCS (1 << 8)
55+ #define GOTGCTL_VB_VALID_OV_VAL (1 << 3)
56+ #define GOTGCTL_VB_VALID_OV_EN (1 << 2)
5557#define GOTGCTL_SESREQ (1 << 1)
5658#define GOTGCTL_SESREQSCS (1 << 0)
5759
You can’t perform that action at this time.
0 commit comments