mbox series

[v4,0/3] Qualcomm UFS device reset support

Message ID 20190828191756.24312-1-bjorn.andersson@linaro.org
Headers show
Series Qualcomm UFS device reset support | expand

Message

Bjorn Andersson Aug. 28, 2019, 7:17 p.m. UTC
This series adds a new ufs vops to allow platform specific methods for
resetting an attached UFS device, then implements this for the Qualcomm driver.
This reset seems to be necessary for the majority of Dragonboard845c devices.

Bean requested in v3 that a software fallback mechanism, using
UIC_CMD_DME_END_PT_RST. I have not been successful in validating that this
works for me, so I'm postponing this effort and hoping we can add it
incrementally at a later time.

Bjorn Andersson (3):
  scsi: ufs: Introduce vops for resetting device
  scsi: ufs-qcom: Implement device_reset vops
  arm64: dts: qcom: sdm845: Specify UFS device-reset GPIO

 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt |  2 ++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  2 ++
 arch/arm64/boot/dts/qcom/sdm845-mtp.dts       |  2 ++
 drivers/scsi/ufs/ufs-qcom.c                   | 36 +++++++++++++++++++
 drivers/scsi/ufs/ufs-qcom.h                   |  4 +++
 drivers/scsi/ufs/ufshcd.c                     |  6 ++++
 drivers/scsi/ufs/ufshcd.h                     |  8 +++++
 7 files changed, 60 insertions(+)

-- 
2.18.0

Comments

Rob Herring (Arm) Sept. 2, 2019, 1:38 p.m. UTC | #1
On Wed, 28 Aug 2019 12:17:55 -0700, Bjorn Andersson wrote:
> The UFS_RESET pin on Qualcomm SoCs are controlled by TLMM and exposed

> through the GPIO framework. Acquire the device-reset GPIO and use this

> to implement the device_reset vops, to allow resetting the attached

> memory.

> 

> Based on downstream support implemented by Subhash Jadavani

> <subhashj@codeaurora.org>.

> 

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---

> 

> Changes since v3:

> - Renamed device-reset-gpios to just reset-gpios.

> - Explicitly bail on !host->device_reset, to not rely on passing NULL to

>   gpiod_set_value_cansleep()

> 

>  .../devicetree/bindings/ufs/ufshcd-pltfrm.txt |  2 ++

>  drivers/scsi/ufs/ufs-qcom.c                   | 36 +++++++++++++++++++

>  drivers/scsi/ufs/ufs-qcom.h                   |  4 +++

>  3 files changed, 42 insertions(+)

> 


Acked-by: Rob Herring <robh@kernel.org>