diff options
| author | Tuyen Dang <[email protected]> | 2026-08-03 00:25:52 +0200 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2026-08-07 21:58:59 +0200 |
| commit | 844e134e9d21f657e0b69945cb2523d988da9bf2 (patch) | |
| tree | 87e52403af8d9cadfd27ef3b1259506e20d9d144 | |
| parent | 08060053829cb65dd3231afbd601de2b150a4c05 (diff) | |
ufs: rcar-gen5: Switch from FASTAUTO mode to FAST mode
Switch from FASTAUTO to FAST mode and lane 2 to achieve
higher throughput. Drop the 64bit address quirk.
Signed-off-by: Tuyen Dang <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
| -rw-r--r-- | drivers/ufs/ufs-renesas-rcar-gen5.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/ufs/ufs-renesas-rcar-gen5.c b/drivers/ufs/ufs-renesas-rcar-gen5.c index a9473cd60b1..c6e436fe197 100644 --- a/drivers/ufs/ufs-renesas-rcar-gen5.c +++ b/drivers/ufs/ufs-renesas-rcar-gen5.c @@ -72,7 +72,7 @@ static int ufs_renesas_pre_init(struct ufs_hba *hba) if (ret) return ret; - writew(0x0000, priv->phy_base + 0x20000); + clrbits_le16(priv->phy_base + 0x20000, BIT(0)); ufshcd_writel(hba, BIT(0), REG_CONTROLLER_ENABLE); @@ -88,6 +88,9 @@ static int ufs_renesas_pre_init(struct ufs_hba *hba) if (ret) return ret; + ufshcd_rmwl(hba, 0xe000, 0, 0xc0); + ufshcd_rmwl(hba, 0x5000, 0x5000, 0xc0); + /* Skip IE because we cannot handle interrupts here */ ufs_dme_command(hba, 0x00000002, 0x81010000, 0x00000000, 0x00000005); ufs_dme_command(hba, 0x00000002, 0x81150000, 0x00000000, 0x00000001); @@ -133,6 +136,10 @@ static int ufs_renesas_pre_init(struct ufs_hba *hba) if (ret) return ret; + clrbits_le16(priv->phy_base + 0x20000, BIT(0)); + + ufs_dme_command(hba, 0x00000002, 0xd0890000, 0x00000000, 0x00000001); + priv->initialized = true; return 0; @@ -140,8 +147,7 @@ static int ufs_renesas_pre_init(struct ufs_hba *hba) static int ufs_renesas_init(struct ufs_hba *hba) { - hba->quirks |= UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS | UFSHCD_QUIRK_HIBERN_FASTAUTO | - UFSHCD_QUIRK_BROKEN_LCC; + hba->quirks |= UFSHCD_QUIRK_HIBERN_FASTAUTO | UFSHCD_QUIRK_BROKEN_LCC; return 0; } @@ -180,12 +186,12 @@ static int ufs_renesas_get_max_pwr_mode(struct ufs_hba *hba, { max_pwr_info->info.gear_rx = UFS_HS_G5; max_pwr_info->info.gear_tx = UFS_HS_G5; - max_pwr_info->info.pwr_tx = FASTAUTO_MODE; - max_pwr_info->info.pwr_rx = FASTAUTO_MODE; - max_pwr_info->info.hs_rate = PA_HS_MODE_A; + max_pwr_info->info.pwr_tx = FAST_MODE; + max_pwr_info->info.pwr_rx = FAST_MODE; + max_pwr_info->info.hs_rate = PA_HS_MODE_B; - max_pwr_info->info.lane_rx = 1; - max_pwr_info->info.lane_tx = 1; + max_pwr_info->info.lane_rx = 2; + max_pwr_info->info.lane_tx = 2; dev_info(hba->dev, "Max HS Gear: %d\n", max_pwr_info->info.gear_rx); |
