phy: Import Xiaomi changes
Signed-off-by: claxten10 <claxten10@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1336,11 +1336,15 @@ static void u2_phy_instance_power_on(struct mtk_tphy *tphy,
|
||||
/* HQA Setting */
|
||||
tmp = readl(com + U3P_USBPHYACR6);
|
||||
tmp &= ~PA6_RG_U2_DISCTH;
|
||||
tmp |= PA6_RG_U2_DISCTH_VAL(0xf);
|
||||
tmp |= PA6_RG_U2_DISCTH_VAL(0xa);
|
||||
writel(tmp, com + U3P_USBPHYACR6);
|
||||
#endif
|
||||
|
||||
dev_info(tphy->dev, "%s(%d)\n", __func__, index);
|
||||
tmp = readl(com + 0x08);
|
||||
tmp |= 0x1<<3;
|
||||
writel(tmp, u2_banks->com + 0x08);
|
||||
dev_info(tphy->dev, "%s, 0x08 = (0x%0x)\n", __func__, readl(com + 0x08));
|
||||
}
|
||||
|
||||
static void u2_phy_instance_power_off(struct mtk_tphy *tphy,
|
||||
@@ -1562,6 +1566,7 @@ static void u2_phy_instance_set_mode(struct mtk_tphy *tphy,
|
||||
return;
|
||||
case PHY_MODE_USB_DEVICE:
|
||||
tmp |= P2C_FORCE_IDDIG | P2C_RG_IDDIG;
|
||||
#if 0
|
||||
device_property_read_u32(dev, "mediatek,eye-src",
|
||||
&instance->eye_src);
|
||||
device_property_read_u32(dev, "mediatek,eye-vrt",
|
||||
@@ -1572,6 +1577,10 @@ static void u2_phy_instance_set_mode(struct mtk_tphy *tphy,
|
||||
&instance->eye_rev6);
|
||||
device_property_read_u32(dev, "mediatek,eye-disc",
|
||||
&instance->eye_disc);
|
||||
#endif
|
||||
instance->eye_vrt = 7;
|
||||
instance->eye_term = 6;
|
||||
instance->eye_rev6 = 3;
|
||||
u2_phy_props_set(tphy, instance);
|
||||
break;
|
||||
case PHY_MODE_USB_HOST:
|
||||
@@ -1582,6 +1591,7 @@ static void u2_phy_instance_set_mode(struct mtk_tphy *tphy,
|
||||
tmp |= P2C_RG_VBUSVALID | P2C_RG_BVALID | P2C_RG_AVALID;
|
||||
tmp &= ~P2C_RG_SESSEND;
|
||||
#endif
|
||||
#if 0
|
||||
device_property_read_u32(dev, "mediatek,host-eye-src",
|
||||
&instance->eye_src);
|
||||
device_property_read_u32(dev, "mediatek,host-eye-vrt",
|
||||
@@ -1592,6 +1602,10 @@ static void u2_phy_instance_set_mode(struct mtk_tphy *tphy,
|
||||
&instance->eye_rev6);
|
||||
device_property_read_u32(dev, "mediatek,host-eye-disc",
|
||||
&instance->eye_disc);
|
||||
#endif
|
||||
instance->eye_vrt = 4;
|
||||
instance->eye_term = 4;
|
||||
instance->eye_rev6 = 1;
|
||||
u2_phy_props_set(tphy, instance);
|
||||
break;
|
||||
case PHY_MODE_USB_OTG:
|
||||
|
||||
Reference in New Issue
Block a user