Skip to content

Commit fc9eae2

Browse files
committed
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
2 parents a516c61 + 81af9e4 commit fc9eae2

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

drivers/phy/Kconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
menu "PHY Subsystem"
77

88
config PHY_COMMON_PROPS
9-
bool
9+
bool "PHY common properties" if KUNIT_ALL_TESTS
1010
help
1111
This parses properties common between generic PHYs and Ethernet PHYs.
1212

@@ -16,8 +16,7 @@ config PHY_COMMON_PROPS
1616

1717
config PHY_COMMON_PROPS_TEST
1818
tristate "KUnit tests for PHY common props" if !KUNIT_ALL_TESTS
19-
select PHY_COMMON_PROPS
20-
depends on KUNIT
19+
depends on KUNIT && PHY_COMMON_PROPS
2120
default KUNIT_ALL_TESTS
2221
help
2322
This builds KUnit tests for the PHY common property API.

drivers/phy/freescale/phy-fsl-lynx-28g.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,8 @@ static void lynx_28g_cdr_lock_check(struct work_struct *work)
10691069

10701070
for (i = 0; i < LYNX_28G_NUM_LANE; i++) {
10711071
lane = &priv->lane[i];
1072+
if (!lane->phy)
1073+
continue;
10721074

10731075
mutex_lock(&lane->phy->mutex);
10741076

drivers/phy/qualcomm/phy-qcom-qmp-ufs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ static const struct qmp_phy_init_tbl sm8650_ufsphy_pcs[] = {
990990
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_MULTI_LANE_CTRL1, 0x02),
991991
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_MID_TERM_CTRL1, 0x43),
992992
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PCS_CTRL1, 0xc1),
993+
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x33),
993994
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_LARGE_AMP_DRV_LVL, 0x0f),
994995
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_SIGDET_CTRL2, 0x68),
995996
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[] = {
9991000
};
10001001

10011002
static const struct qmp_phy_init_tbl sm8650_ufsphy_g4_pcs[] = {
1002-
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x13),
10031003
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_HSGEAR_CAPABILITY, 0x04),
10041004
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HSGEAR_CAPABILITY, 0x04),
10051005
};
10061006

10071007
static const struct qmp_phy_init_tbl sm8650_ufsphy_g5_pcs[] = {
1008-
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x33),
10091008
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_HSGEAR_CAPABILITY, 0x05),
10101009
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HSGEAR_CAPABILITY, 0x05),
10111010
QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HS_G5_SYNC_LENGTH_CAPABILITY, 0x4d),

drivers/phy/spacemit/phy-k1-usb2.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
#define PHY_CLK_HSTXP_EN BIT(3) /* clock hstxp enable */
4949
#define PHY_HSTXP_MODE BIT(4) /* 0: force en_txp to be 1; 1: no force */
5050

51+
#define PHY_K1_HS_HOST_DISC 0x40
52+
#define PHY_K1_HS_HOST_DISC_CLR BIT(0)
53+
5154
#define PHY_PLL_DIV_CFG 0x98
5255
#define PHY_FDIV_FRACT_8_15 GENMASK(7, 0)
5356
#define PHY_FDIV_FRACT_16_19 GENMASK(11, 8)
@@ -142,9 +145,20 @@ static int spacemit_usb2phy_exit(struct phy *phy)
142145
return 0;
143146
}
144147

148+
static int spacemit_usb2phy_disconnect(struct phy *phy, int port)
149+
{
150+
struct spacemit_usb2phy *sphy = phy_get_drvdata(phy);
151+
152+
regmap_update_bits(sphy->regmap_base, PHY_K1_HS_HOST_DISC,
153+
PHY_K1_HS_HOST_DISC_CLR, PHY_K1_HS_HOST_DISC_CLR);
154+
155+
return 0;
156+
}
157+
145158
static const struct phy_ops spacemit_usb2phy_ops = {
146159
.init = spacemit_usb2phy_init,
147160
.exit = spacemit_usb2phy_exit,
161+
.disconnect = spacemit_usb2phy_disconnect,
148162
.owner = THIS_MODULE,
149163
};
150164

drivers/phy/ti/phy-j721e-wiz.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,7 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz)
14251425
dev_err(dev,
14261426
"%s: Reading \"reg\" from \"%s\" failed: %d\n",
14271427
__func__, subnode->name, ret);
1428+
of_node_put(serdes);
14281429
return ret;
14291430
}
14301431
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)
14391440
}
14401441
}
14411442

1443+
of_node_put(serdes);
14421444
return 0;
14431445
}
14441446

0 commit comments

Comments
 (0)