Skip to content

Commit 2936049

Browse files
ptr324martinkpetersen
authored andcommitted
scsi: ufs: host: mediatek: Fix device power control
Adjust the timing of device power control to ensure low power mode (LPM) is entered only after VCC is turned off. Prevent VCCQ/VCCQ2 from entering LPM prematurely, ensuring proper power management and device stability. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 91cad91 commit 2936049

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/ufs/host/ufs-mediatek.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,6 +2342,13 @@ static int ufs_mtk_probe(struct platform_device *pdev)
23422342
host->phy_dev = phy_dev;
23432343
}
23442344

2345+
/*
2346+
* Because the default power setting of VSx (the upper layer of
2347+
* VCCQ/VCCQ2) is HWLP, we need to prevent VCCQ/VCCQ2 from
2348+
* entering LPM.
2349+
*/
2350+
ufs_mtk_dev_vreg_set_lpm(hba, false);
2351+
23452352
out:
23462353
of_node_put(phy_node);
23472354
of_node_put(reset_node);

0 commit comments

Comments
 (0)