Merge "usb: dwc3: Enable PHY deep low power mode in L1 suspend"

This commit is contained in:
qctecmdr 2019-10-30 02:02:19 -07:00 • committed by Gerrit - the friendly Code Review server
commit d905a441da
2 changed files with 9 additions and 0 deletions

View file

@ -265,6 +265,7 @@
#define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28)
#define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW BIT(24)
#define DWC3_GUCTL1_IP_GAP_ADD_ON(n) (n << 21)
#define DWC3_GUCTL1_L1_SUSP_THRLD_EN_FOR_HOST BIT(8)
/* Global Status Register */
#define DWC3_GSTS_OTG_IP BIT(10)

View file

@ -2436,6 +2436,10 @@ static void dwc3_en_sleep_mode(struct dwc3_msm *mdwc)
reg = dwc3_msm_read_reg(mdwc->base, DWC3_GUSB2PHYCFG(0));
reg |= DWC3_GUSB2PHYCFG_ENBLSLPM;
dwc3_msm_write_reg(mdwc->base, DWC3_GUSB2PHYCFG(0), reg);
reg = dwc3_msm_read_reg(mdwc->base, DWC3_GUCTL1);
reg |= DWC3_GUCTL1_L1_SUSP_THRLD_EN_FOR_HOST;
dwc3_msm_write_reg(mdwc->base, DWC3_GUCTL1, reg);
}
static void dwc3_dis_sleep_mode(struct dwc3_msm *mdwc)
@ -2445,6 +2449,10 @@ static void dwc3_dis_sleep_mode(struct dwc3_msm *mdwc)
reg = dwc3_msm_read_reg(mdwc->base, DWC3_GUSB2PHYCFG(0));
reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM;
dwc3_msm_write_reg(mdwc->base, DWC3_GUSB2PHYCFG(0), reg);
reg = dwc3_msm_read_reg(mdwc->base, DWC3_GUCTL1);
reg &= ~DWC3_GUCTL1_L1_SUSP_THRLD_EN_FOR_HOST;
dwc3_msm_write_reg(mdwc->base, DWC3_GUCTL1, reg);
}
static void dwc3_msm_power_collapse_por(struct dwc3_msm *mdwc)