scsi: ufs-mediatek: Support performance mode for inline encryption engine
authorStanley Chu <stanley.chu@mediatek.com>
Mon, 14 Sep 2020 05:00:51 +0000 (13:00 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 23 Sep 2020 00:37:02 +0000 (20:37 -0400)
commit590b0d2372fef09f9755f40e43358fabf5a7fd63
tree53b68f2042db9fec7e97ab02c8a5b6ccdd8c613e
parent3d1a99e2b5400fd32ec647b290340b5ed091d3ae
scsi: ufs-mediatek: Support performance mode for inline encryption engine

Some MediaTek UFS platforms support high-performance mode that inline
encryption engine can be boosted while UFS is not clock-gated.

The high-performance mode will be enabled if all below conditions are
well-declaired in device tree,

 - Proper platform-specific compatible string which enables the host
   capability "UFS_MTK_CAP_BOOST_CRYPT_ENGINE".

 - "dvfsrc-vcore" node is available in this platform.

 - Required minimum vcore voltage for high-performance mode.

 - Clock mux and clock parents of inline encryption engine for both
   "low-power mode" and "high-performance mode".

Link: https://lore.kernel.org/r/20200914050052.3974-2-stanley.chu@mediatek.com
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-mediatek.c
drivers/scsi/ufs/ufs-mediatek.h