diff --git a/drivers/phy/qualcomm/phy-qcom-ufs-i.h b/drivers/phy/qualcomm/phy-qcom-ufs-i.h index 5e0c9fc7282c..84e3aa525a4a 100644 --- a/drivers/phy/qualcomm/phy-qcom-ufs-i.h +++ b/drivers/phy/qualcomm/phy-qcom-ufs-i.h @@ -72,6 +72,10 @@ struct ufs_qcom_phy { struct ufs_qcom_phy_vreg vdda_pll; struct ufs_qcom_phy_vreg vdda_phy; struct ufs_qcom_phy_vreg vddp_ref_clk; + + /* Number of lanes available (1 or 2) for Rx/Tx */ + u32 lanes_per_direction; + unsigned int quirks; /* diff --git a/drivers/phy/qualcomm/phy-qcom-ufs.c b/drivers/phy/qualcomm/phy-qcom-ufs.c index e1dde9740069..6c7f17ef6ece 100644 --- a/drivers/phy/qualcomm/phy-qcom-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-ufs.c @@ -13,6 +13,8 @@ #define VDDP_REF_CLK_MIN_UV 1200000 #define VDDP_REF_CLK_MAX_UV 1200000 +#define UFS_PHY_DEFAULT_LANES_PER_DIRECTION 1 + int ufs_qcom_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy, struct ufs_qcom_phy_calibration *tbl_A, int tbl_size_A, @@ -123,6 +125,11 @@ struct phy *ufs_qcom_phy_generic_probe(struct platform_device *pdev, goto out; } + if (of_property_read_u32(dev->of_node, "lanes-per-direction", + &common_cfg->lanes_per_direction)) + common_cfg->lanes_per_direction = + UFS_PHY_DEFAULT_LANES_PER_DIRECTION; + /* * UFS PHY power management is managed by its parent (UFS host * controller) hence set the no runtime PM callbacks flag