All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/3] scsi: ufs: Add a vops to configure VCC voltage level
@ 2021-03-21 21:57 Nitin Rawat
  2021-03-21 21:57 ` [PATCH V2 1/3] scsi: ufs: export api for use in vendor file Nitin Rawat
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Nitin Rawat @ 2021-03-21 21:57 UTC (permalink / raw)
  To: asutoshd, cang, stummala, vbadigan, alim.akhtar, avri.altman,
	jejb, martin.petersen, stanley.chu, beanhuo, bjorn.andersson,
	adrian.hunter, bvanassche
  Cc: linux-scsi, linux-kernel, Nitin Rawat

UFS specification allows different VCC configurations for UFS devices,
for example,
	(1)2.70V - 3.60V (For UFS 2.x devices)
	(2)2.40V - 2.70V (For UFS 3.x devices)
For platforms supporting both ufs 2.x (2.7v-3.6v) and
ufs 3.x (2.4v-2.7v), the voltage requirements (VCC) is 2.4v-3.6v.
So to support this, we need to start the ufs device initialization with
the common VCC voltage(2.7v) and after reading the device descriptor we
need to switch to the correct range(vcc min and vcc max) of VCC voltage
as per UFS device type since 2.7v is the marginal voltage as per specs
for both type of devices.

Once VCC regulator supply has been intialised to 2.7v and UFS device
type is read from device descriptor, we follows below steps to
change the VCC voltage values.

1. Set the device to SLEEP state.
2. Disable the Vcc Regulator.
3. Set the vcc voltage according to the device type and reenable
   the regulator.
4. Set the device mode back to ACTIVE.

The above changes are done in vendor specific file by
adding a vops which will be needed for platform
supporting both ufs 2.x and ufs 3.x devices.

v1 -> v2
Added suggested-by on patch2 (scsi: ufs: add a vops to configure VCC voltage level)

Nitin Rawat (3):
  scsi: ufs: export api for use in vendor file
  scsi: ufs: add a vops to configure VCC voltage level
  scsi: ufs-qcom: configure VCC voltage level in vendor file

 drivers/scsi/ufs/ufs-qcom.c | 51 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/scsi/ufs/ufshcd.c   | 13 +++++++++---
 drivers/scsi/ufs/ufshcd.h   | 14 +++++++++++++
 3 files changed, 75 insertions(+), 3 deletions(-)

--
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-06-03 20:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 21:57 [PATCH V2 0/3] scsi: ufs: Add a vops to configure VCC voltage level Nitin Rawat
2021-03-21 21:57 ` [PATCH V2 1/3] scsi: ufs: export api for use in vendor file Nitin Rawat
2021-03-21 21:57 ` [PATCH V2 2/3] scsi: ufs: add a vops to configure VCC voltage level Nitin Rawat
2021-03-31 18:00   ` Asutosh Das (asd)
2021-04-01 15:00     ` nitirawa
2021-04-01 15:03     ` nitirawa
2021-03-21 21:57 ` [PATCH V2 3/3] scsi: ufs-qcom: configure VCC voltage level in vendor file Nitin Rawat
2021-03-23 15:28   ` Bjorn Andersson
2021-03-24 21:55     ` nitirawa
2021-03-31 18:19       ` Bjorn Andersson
2021-04-01 14:58         ` nitirawa
2021-04-01 15:12           ` Bjorn Andersson
2021-05-26  7:23             ` nitirawa
2021-06-03 20:31               ` nitirawa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.