summaryrefslogtreecommitdiff
path: root/drivers/phy/phy-qcom-ufs-i.h
diff options
context:
space:
mode:
authorVenkat Gopalakrishnan <venkatg@codeaurora.org>2016-04-15 11:24:31 -0700
committerKyle Yan <kyan@codeaurora.org>2016-06-08 15:13:17 -0700
commit6b266ad4c87c7bfe02eb0482191af1bc4c46c7cd (patch)
treea77e0e1e1b2d33bcff1cdd31e9b4d19b524e57ab /drivers/phy/phy-qcom-ufs-i.h
parentcad3a64d0cdcfed9e6bb653b329f4f12309861fb (diff)
phy: qcom-ufs: add svs2 support
phy-qcom-ufs-qmp-v3 supports SVS2 voltage scaling mode that allows lowest power consumption in HS G1. The PHY must be put in hibern8 state before configuring the PHY to enter SVS2 mode. The voltage can be reduced after this to SVS2 level. This change exposes an API that allows the UFS driver to configure the PHY to enter SVS2 mode. Change-Id: I2ef01d98603840289c436e14bf3df54a2ab9198b Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Diffstat (limited to 'drivers/phy/phy-qcom-ufs-i.h')
-rw-r--r--drivers/phy/phy-qcom-ufs-i.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/phy/phy-qcom-ufs-i.h b/drivers/phy/phy-qcom-ufs-i.h
index adeabe817174..35179c8be471 100644
--- a/drivers/phy/phy-qcom-ufs-i.h
+++ b/drivers/phy/phy-qcom-ufs-i.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015, Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016, Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -150,6 +150,8 @@ struct ufs_qcom_phy {
* state.
* @power_control: pointer to a function that controls analog rail of phy
* and writes to QSERDES_RX_SIGDET_CNTRL attribute
+ * @configure_lpm: pointer to a function that configures the phy
+ * for low power mode.
*/
struct ufs_qcom_phy_specific_ops {
int (*calibrate_phy)(struct ufs_qcom_phy *phy, bool is_rate_B);
@@ -158,6 +160,7 @@ struct ufs_qcom_phy_specific_ops {
void (*set_tx_lane_enable)(struct ufs_qcom_phy *phy, u32 val);
void (*ctrl_rx_linecfg)(struct ufs_qcom_phy *phy, bool ctrl);
void (*power_control)(struct ufs_qcom_phy *phy, bool val);
+ int (*configure_lpm)(struct ufs_qcom_phy *phy, bool enable);
};
struct ufs_qcom_phy *get_ufs_qcom_phy(struct phy *generic_phy);
@@ -178,4 +181,8 @@ int ufs_qcom_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
struct ufs_qcom_phy_calibration *tbl_A, int tbl_size_A,
struct ufs_qcom_phy_calibration *tbl_B, int tbl_size_B,
bool is_rate_B);
+void ufs_qcom_phy_write_tbl(struct ufs_qcom_phy *ufs_qcom_phy,
+ struct ufs_qcom_phy_calibration *tbl,
+ int tbl_size);
+
#endif