mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
phy fixes for 7.0
Couple of driver fixes - Qualcomm PCS table fix for ufs phy - TI device node reference fix - Common prop kconfig fix - lynx CDR lock workaround for lanes disabled - usb disconnect function fix of k1 driver -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmnJEFoACgkQfBQHDyUj g0fL0RAAuRoXzQk70/6pGl0Ap5rndQ+ommgE+b9LXYfgcT18jJHAwiUr+14En+At NdI+Cw8nmpTbg4WRGfE8StRQPu6fRUjsEzxG0WbyZIccpXCvp926LgFVio1/tmNH YnUs6oT48SWiTT7EF5seYG6YtWCBPu1dFWjfg46czoPC399Ieyp38mX48Vsl1i/G t9g20T7eioYDS/wKOt1fDSEGG+kWVsWttqzXJ5w42hqUbAK0FGCuw9oRNMZSmNZK z9z7l5cPhGb5SN+N0fq3mHYhZ7BAzKKNrRwW6cf+N6gnPd+g3L19SGW80ocJx6AR 74xK9Sfjl/bUw5/CwWGIIbFxVPfNap4i0qxABPtONFTy0463F2TSR58Wsnru17fX OSdY9IUMh527d8Bgj5Pyp6I3/VD7VHaXYg2XgAu+rzwv2tCw3JHwWn5tdPF8cnFe efgUr1xwLQM0ZIWZzuXuozNaldD5vUQB0XvSy2UETlI8vlkCmGtgxoxyvSB/CNKw mkUEfyZeXg4wuvivRPXvJOOU9pIWv+MkDQ475m7nE3VR/PwRon9ABSxfL2YkR2uk sOKqIsPQkYaEFRi5sfa/V5g6tAvhAI/G6qUdftiFzblQWgq3bLcwstH0cFQEoeku Tji3hQt1ihJEZyZmp6/Y04c/WMeoRmO9Q0c4XTkJAUKdo9p2MZY= =HcR7 -----END PGP SIGNATURE----- Merge tag 'phy-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - Qualcomm PCS table fix for ufs phy - TI device node reference fix - Common prop kconfig fix - lynx CDR lock workaround for lanes disabled - usb disconnect function fix of k1 driver * tag 'phy-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: qcom: qmp-ufs: Fix SM8650 PCS table for Gear 4 phy: ti: j721e-wiz: Fix device node reference leak in wiz_get_lane_phy_types() phy: k1-usb: add disconnect function support phy: lynx-28g: skip CDR lock workaround for lanes disabled in the device tree phy: make PHY_COMMON_PROPS Kconfig symbol conditionally user-selectable
This commit is contained in:
commit
fc9eae25ec
|
|
@ -6,7 +6,7 @@
|
|||
menu "PHY Subsystem"
|
||||
|
||||
config PHY_COMMON_PROPS
|
||||
bool
|
||||
bool "PHY common properties" if KUNIT_ALL_TESTS
|
||||
help
|
||||
This parses properties common between generic PHYs and Ethernet PHYs.
|
||||
|
||||
|
|
@ -16,8 +16,7 @@ config PHY_COMMON_PROPS
|
|||
|
||||
config PHY_COMMON_PROPS_TEST
|
||||
tristate "KUnit tests for PHY common props" if !KUNIT_ALL_TESTS
|
||||
select PHY_COMMON_PROPS
|
||||
depends on KUNIT
|
||||
depends on KUNIT && PHY_COMMON_PROPS
|
||||
default KUNIT_ALL_TESTS
|
||||
help
|
||||
This builds KUnit tests for the PHY common property API.
|
||||
|
|
|
|||
|
|
@ -1069,6 +1069,8 @@ static void lynx_28g_cdr_lock_check(struct work_struct *work)
|
|||
|
||||
for (i = 0; i < LYNX_28G_NUM_LANE; i++) {
|
||||
lane = &priv->lane[i];
|
||||
if (!lane->phy)
|
||||
continue;
|
||||
|
||||
mutex_lock(&lane->phy->mutex);
|
||||
|
||||
|
|
|
|||
|
|
@ -990,6 +990,7 @@ static const struct qmp_phy_init_tbl sm8650_ufsphy_pcs[] = {
|
|||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_MULTI_LANE_CTRL1, 0x02),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_MID_TERM_CTRL1, 0x43),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PCS_CTRL1, 0xc1),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x33),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_LARGE_AMP_DRV_LVL, 0x0f),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_SIGDET_CTRL2, 0x68),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_POST_EMP_LVL_S4, 0x0e),
|
||||
|
|
@ -999,13 +1000,11 @@ static const struct qmp_phy_init_tbl sm8650_ufsphy_pcs[] = {
|
|||
};
|
||||
|
||||
static const struct qmp_phy_init_tbl sm8650_ufsphy_g4_pcs[] = {
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x13),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_HSGEAR_CAPABILITY, 0x04),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HSGEAR_CAPABILITY, 0x04),
|
||||
};
|
||||
|
||||
static const struct qmp_phy_init_tbl sm8650_ufsphy_g5_pcs[] = {
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x33),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_HSGEAR_CAPABILITY, 0x05),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HSGEAR_CAPABILITY, 0x05),
|
||||
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HS_G5_SYNC_LENGTH_CAPABILITY, 0x4d),
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@
|
|||
#define PHY_CLK_HSTXP_EN BIT(3) /* clock hstxp enable */
|
||||
#define PHY_HSTXP_MODE BIT(4) /* 0: force en_txp to be 1; 1: no force */
|
||||
|
||||
#define PHY_K1_HS_HOST_DISC 0x40
|
||||
#define PHY_K1_HS_HOST_DISC_CLR BIT(0)
|
||||
|
||||
#define PHY_PLL_DIV_CFG 0x98
|
||||
#define PHY_FDIV_FRACT_8_15 GENMASK(7, 0)
|
||||
#define PHY_FDIV_FRACT_16_19 GENMASK(11, 8)
|
||||
|
|
@ -142,9 +145,20 @@ static int spacemit_usb2phy_exit(struct phy *phy)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int spacemit_usb2phy_disconnect(struct phy *phy, int port)
|
||||
{
|
||||
struct spacemit_usb2phy *sphy = phy_get_drvdata(phy);
|
||||
|
||||
regmap_update_bits(sphy->regmap_base, PHY_K1_HS_HOST_DISC,
|
||||
PHY_K1_HS_HOST_DISC_CLR, PHY_K1_HS_HOST_DISC_CLR);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct phy_ops spacemit_usb2phy_ops = {
|
||||
.init = spacemit_usb2phy_init,
|
||||
.exit = spacemit_usb2phy_exit,
|
||||
.disconnect = spacemit_usb2phy_disconnect,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1425,6 +1425,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz)
|
|||
dev_err(dev,
|
||||
"%s: Reading \"reg\" from \"%s\" failed: %d\n",
|
||||
__func__, subnode->name, ret);
|
||||
of_node_put(serdes);
|
||||
return ret;
|
||||
}
|
||||
of_property_read_u32(subnode, "cdns,num-lanes", &num_lanes);
|
||||
|
|
@ -1439,6 +1440,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz)
|
|||
}
|
||||
}
|
||||
|
||||
of_node_put(serdes);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user