phy: qcom-ufs: remove hard-coded vdda-phy voltage definition
This patch removes the hard-coded voltage number of vdda-phy regulator and instead, gets it by using the appropriate API. Change-Id: Iab753c7e94424dd3ccce95296258bba264979cf2 Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
This commit is contained in:
parent
38a427e870
commit
cab11920a9
2 changed files with 5 additions and 4 deletions
|
@ -15,7 +15,6 @@
|
||||||
#include "phy-qcom-ufs-qmp-14nm.h"
|
#include "phy-qcom-ufs-qmp-14nm.h"
|
||||||
|
|
||||||
#define UFS_PHY_NAME "ufs_phy_qmp_14nm"
|
#define UFS_PHY_NAME "ufs_phy_qmp_14nm"
|
||||||
#define UFS_PHY_VDDA_PHY_UV (925000)
|
|
||||||
|
|
||||||
static
|
static
|
||||||
int ufs_qcom_phy_qmp_14nm_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
|
int ufs_qcom_phy_qmp_14nm_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
|
||||||
|
@ -94,8 +93,6 @@ static int ufs_qcom_phy_qmp_14nm_init(struct phy *generic_phy)
|
||||||
__func__, err);
|
__func__, err);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
phy_common->vdda_phy.max_uV = UFS_PHY_VDDA_PHY_UV;
|
|
||||||
phy_common->vdda_phy.min_uV = UFS_PHY_VDDA_PHY_UV;
|
|
||||||
|
|
||||||
ufs_qcom_phy_qmp_14nm_advertise_quirks(phy_common);
|
ufs_qcom_phy_qmp_14nm_advertise_quirks(phy_common);
|
||||||
|
|
||||||
|
|
|
@ -239,6 +239,7 @@ ufs_qcom_phy_init_vregulators(struct phy *generic_phy,
|
||||||
struct ufs_qcom_phy *phy_common)
|
struct ufs_qcom_phy *phy_common)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
int vdda_phy_uV;
|
||||||
|
|
||||||
err = ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vdda_pll,
|
err = ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vdda_pll,
|
||||||
"vdda-pll");
|
"vdda-pll");
|
||||||
|
@ -247,10 +248,13 @@ ufs_qcom_phy_init_vregulators(struct phy *generic_phy,
|
||||||
|
|
||||||
err = ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vdda_phy,
|
err = ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vdda_phy,
|
||||||
"vdda-phy");
|
"vdda-phy");
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
vdda_phy_uV = regulator_get_voltage(phy_common->vdda_phy.reg);
|
||||||
|
phy_common->vdda_phy.max_uV = vdda_phy_uV;
|
||||||
|
phy_common->vdda_phy.min_uV = vdda_phy_uV;
|
||||||
|
|
||||||
/* vddp-ref-clk-* properties are optional */
|
/* vddp-ref-clk-* properties are optional */
|
||||||
__ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vddp_ref_clk,
|
__ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vddp_ref_clk,
|
||||||
"vddp-ref-clk", true);
|
"vddp-ref-clk", true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue