@@ -126,8 +126,8 @@
#define MX7D_USB_OTG_PHY_STATUS_CHRGDET BIT(29)
#define MX7D_USB_OTG_PHY_CFG1 0x30
-#define TXPREEMPAMPTUNE0 GENMASK(29, 28)
-#define TXVREFTUNE0 GENMASK(23, 20)
+#define MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0 GENMASK(29, 28)
+#define MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0 GENMASK(23, 20)
#define MX6_USB_OTG_WAKEUP_BITS (MX6_BM_WAKEUP_ENABLE | MX6_BM_VBUS_WAKEUP | \
MX6_BM_ID_WAKEUP)
@@ -659,15 +659,19 @@ static int usbmisc_imx7d_init(struct imx_usbmisc_data *data)
/* PHY tuning for signal quality */
reg = readl(usbmisc->base + MX7D_USB_OTG_PHY_CFG1);
if (data->emp_curr_control &&
- FIELD_FIT(TXPREEMPAMPTUNE0, data->emp_curr_control)) {
- reg &= ~TXPREEMPAMPTUNE0;
- reg |= FIELD_PREP(TXPREEMPAMPTUNE0, data->emp_curr_control);
+ FIELD_FIT(MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0,
+ data->emp_curr_control)) {
+ reg &= ~MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0;
+ reg |= FIELD_PREP(MX7D_USB_OTG_PHY_CFG1_TXPREEMPAMPTUNE0,
+ data->emp_curr_control);
}
if (data->dc_vol_level_adjust &&
- FIELD_FIT(TXVREFTUNE0, data->dc_vol_level_adjust)) {
- reg &= ~TXVREFTUNE0;
- reg |= FIELD_PREP(TXVREFTUNE0, data->dc_vol_level_adjust);
+ FIELD_FIT(MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0,
+ data->dc_vol_level_adjust)) {
+ reg &= ~MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0;
+ reg |= FIELD_PREP(MX7D_USB_OTG_PHY_CFG1_TXVREFTUNE0,
+ data->dc_vol_level_adjust);
}
writel(reg, usbmisc->base + MX7D_USB_OTG_PHY_CFG1);