diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2019-08-20 03:36:06 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-08-28 12:04:59 +0200 |
commit | 54fb5ba647f8f942e372dee45025bce4adc08c38 (patch) | |
tree | 3cb9eb4d77d007381701555182f85323d2fa604b /drivers/usb/dwc3/gadget.c | |
parent | usb: dwc3: Separate field holding multiple properties (diff) | |
download | linux-54fb5ba647f8f942e372dee45025bce4adc08c38.tar.xz linux-54fb5ba647f8f942e372dee45025bce4adc08c38.zip |
usb: dwc3: gadget: Set BESL config parameter
When operating with LPM signals, the controller asserts the deep
low-power signal (utmi_l1_suspend_n) to the phy when the BESL value of
the LPM token is equal to or greater than DCTL.HIRD_Thres[3:0] (and
with DCTL.HIRD_Thres[4] set). Otherwise, the shallow low-power signal
(utmi_sleep_n) is asserted. Set the recommended deep BESL equal to the
controller's DCTL.HIRD_Thres[3:0] setting, and set the baseline BESL
to 0 for the shallow low-power signal. This maximizes the opportunity
for L1 residency and optimizes power savings.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index cfd07808ce62..7b58e0e1e438 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2078,6 +2078,16 @@ static void dwc3_gadget_config_params(struct usb_gadget *g, { struct dwc3 *dwc = gadget_to_dwc(g); + params->besl_baseline = USB_DEFAULT_BESL_UNSPECIFIED; + params->besl_deep = USB_DEFAULT_BESL_UNSPECIFIED; + + /* Recommended BESL */ + if (!dwc->dis_enblslpm_quirk) { + params->besl_baseline = 0; + if (dwc->is_utmi_l1_suspend) + params->besl_deep = min_t(u8, dwc->hird_threshold, 15); + } + /* U1 Device exit Latency */ if (dwc->dis_u1_entry_quirk) params->bU1devExitLat = 0; |