summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs-mediatek.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ufs/ufs-mediatek.h')
-rw-r--r--drivers/scsi/ufs/ufs-mediatek.h34
1 files changed, 12 insertions, 22 deletions
diff --git a/drivers/scsi/ufs/ufs-mediatek.h b/drivers/scsi/ufs/ufs-mediatek.h
index 2b6a1312c9bc..93d35097dfb0 100644
--- a/drivers/scsi/ufs/ufs-mediatek.h
+++ b/drivers/scsi/ufs/ufs-mediatek.h
@@ -31,22 +31,6 @@
#define REFCLK_REQ_TIMEOUT_US 3000
/*
- * Vendor specific pre-defined parameters
- */
-#define UFS_MTK_LIMIT_NUM_LANES_RX 2
-#define UFS_MTK_LIMIT_NUM_LANES_TX 2
-#define UFS_MTK_LIMIT_HSGEAR_RX UFS_HS_G3
-#define UFS_MTK_LIMIT_HSGEAR_TX UFS_HS_G3
-#define UFS_MTK_LIMIT_PWMGEAR_RX UFS_PWM_G4
-#define UFS_MTK_LIMIT_PWMGEAR_TX UFS_PWM_G4
-#define UFS_MTK_LIMIT_RX_PWR_PWM SLOW_MODE
-#define UFS_MTK_LIMIT_TX_PWR_PWM SLOW_MODE
-#define UFS_MTK_LIMIT_RX_PWR_HS FAST_MODE
-#define UFS_MTK_LIMIT_TX_PWR_HS FAST_MODE
-#define UFS_MTK_LIMIT_HS_RATE PA_HS_MODE_B
-#define UFS_MTK_LIMIT_DESIRED_MODE UFS_HS_MODE
-
-/*
* Other attributes
*/
#define VS_DEBUGCLOCKENABLE 0xD0A1
@@ -69,6 +53,7 @@ enum {
* SiP commands
*/
#define MTK_SIP_UFS_CONTROL MTK_SIP_SMC_CMD(0x276)
+#define UFS_MTK_SIP_VA09_PWR_CTRL BIT(0)
#define UFS_MTK_SIP_DEVICE_RESET BIT(1)
#define UFS_MTK_SIP_CRYPTO_CTRL BIT(2)
#define UFS_MTK_SIP_REF_CLK_NOTIFICATION BIT(3)
@@ -94,6 +79,8 @@ enum {
*/
enum ufs_mtk_host_caps {
UFS_MTK_CAP_BOOST_CRYPT_ENGINE = 1 << 0,
+ UFS_MTK_CAP_VA09_PWR_CTRL = 1 << 1,
+ UFS_MTK_CAP_DISABLE_AH8 = 1 << 2,
};
struct ufs_mtk_crypt_cfg {
@@ -104,19 +91,22 @@ struct ufs_mtk_crypt_cfg {
int vcore_volt;
};
-struct ufs_mtk_host_cfg {
- enum ufs_mtk_host_caps caps;
+struct ufs_mtk_hw_ver {
+ u8 step;
+ u8 minor;
+ u8 major;
};
struct ufs_mtk_host {
- struct ufs_hba *hba;
struct phy *mphy;
- struct ufs_mtk_host_cfg *cfg;
- struct ufs_mtk_crypt_cfg *crypt;
- enum ufs_mtk_host_caps caps;
+ struct regulator *reg_va09;
struct reset_control *hci_reset;
struct reset_control *unipro_reset;
struct reset_control *crypto_reset;
+ struct ufs_hba *hba;
+ struct ufs_mtk_crypt_cfg *crypt;
+ struct ufs_mtk_hw_ver hw_ver;
+ enum ufs_mtk_host_caps caps;
bool mphy_powered_on;
bool unipro_lpm;
bool ref_clk_enabled;