mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
phy: qcom-ufs: separate out 2 lanes configuration
Some platforms have 2 UFS PHY instances, one instance supports 2-lane while other instance supports only 1-lane. This change separates out the 2nd lane configuration from 1-lane configuration so that we can apply the 2nd lane configuration only if needed. Change-Id: Idcf8aaa8ed7a9662c0f4186e5a28d2405f8fd5fc Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> [cang@codeaurora.org: resolved trivial merge conflicts] Signed-off-by: Can Guo <cang@codeaurora.org>
This commit is contained in:
parent
fee035811d
commit
427b10e68e
2 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue