mbox series

[v6,0/10] exynos-ufs: Add support for UFS HCI

Message ID 20200417175944.47189-1-alim.akhtar@samsung.com (mailing list archive)
Headers show
Series exynos-ufs: Add support for UFS HCI | expand

Message

Alim Akhtar April 17, 2020, 5:59 p.m. UTC
This patch-set introduces UFS (Universal Flash Storage) host controller support
for Samsung family SoC. Mostly, it consists of UFS PHY and host specific driver.

- Changes since v5:
* re-introduce various quicks which was removed because of no driver
* consumer of those quirks, initial 4 patches does the same.
* Added Reviewed-by tags
* rebased on top of v5.7-rc1
* included Kiwoong's patch in this series, which this driver needs

- Changes since v4:
* Addressed review comments from Avir and Rob 
* Minor improvment on the ufs phy and ufshc drivers
* Added Tested-by from Pawel
* Change UFS binding to DT schema format


- Changes since v3:
* Addressed Kishon's and Avir's review comments
* fixed make dt_binding_check error as pointed by Rob 

- Changes since v2:
* fixed build warning by kbuild test robot 
* Added Reported-by tags

- Changes since v1:
* fixed make dt_binding_check error as pointed by Rob
* Addressed Krzysztof's review comments
* Added Reviewed-by tags

Note: This series is based on Linux-5.7-rc1 (commit: 8f3d9f354286)

Alim Akhtar (9):
  scsi: ufs: add quirk to fix mishandling utrlclr/utmrlclr
  scsi: ufs: add quirk to disallow reset of interrupt aggregation
  scsi: ufs: add quirk to enable host controller without hce
  scsi: ufs: introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk
  dt-bindings: phy: Document Samsung UFS PHY bindings
  phy: samsung-ufs: add UFS PHY driver for samsung SoC
  dt-bindings: ufs: Add DT binding documentation for ufs
  scsi: ufs-exynos: add UFS host support for Exynos SoCs
  arm64: dts: Add node for ufs exynos7

Kiwoong Kim (1):
  scsi: ufs: add quirk to fix abnormal ocs fatal error

 .../bindings/phy/samsung,ufs-phy.yaml         |   74 +
 .../bindings/ufs/samsung,exynos-ufs.yaml      |   93 ++
 .../boot/dts/exynos/exynos7-espresso.dts      |    4 +
 arch/arm64/boot/dts/exynos/exynos7.dtsi       |   44 +-
 drivers/phy/samsung/Kconfig                   |    9 +
 drivers/phy/samsung/Makefile                  |    1 +
 drivers/phy/samsung/phy-exynos7-ufs.h         |   85 ++
 drivers/phy/samsung/phy-samsung-ufs.c         |  369 +++++
 drivers/phy/samsung/phy-samsung-ufs.h         |  142 ++
 drivers/scsi/ufs/Kconfig                      |   12 +
 drivers/scsi/ufs/Makefile                     |    1 +
 drivers/scsi/ufs/ufs-exynos.c                 | 1289 +++++++++++++++++
 drivers/scsi/ufs/ufs-exynos.h                 |  284 ++++
 drivers/scsi/ufs/ufshcd.c                     |  126 +-
 drivers/scsi/ufs/ufshcd.h                     |   29 +
 drivers/scsi/ufs/unipro.h                     |   36 +
 16 files changed, 2584 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/samsung,ufs-phy.yaml
 create mode 100644 Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml
 create mode 100644 drivers/phy/samsung/phy-exynos7-ufs.h
 create mode 100644 drivers/phy/samsung/phy-samsung-ufs.c
 create mode 100644 drivers/phy/samsung/phy-samsung-ufs.h
 create mode 100644 drivers/scsi/ufs/ufs-exynos.c
 create mode 100644 drivers/scsi/ufs/ufs-exynos.h


base-commit: 8f3d9f354286745c751374f5f1fcafee6b3f3136

Comments

Avri Altman April 18, 2020, 12:38 p.m. UTC | #1
> 
> This patch-set introduces UFS (Universal Flash Storage) host controller
> support
> for Samsung family SoC. Mostly, it consists of UFS PHY and host specific
> driver.
> 
> - Changes since v5:
> * re-introduce various quicks which was removed because of no driver
> * consumer of those quirks, initial 4 patches does the same.
You forgot to add those quirks to ufs_fixups.
Each patch that introduces a quirk needs to introduce its users as well - 
This is the reason it was removed in the first place.

Thanks,
Avri
Alim Akhtar April 18, 2020, 1:08 p.m. UTC | #2
Hi Avri,

> -----Original Message-----
> From: Avri Altman <Avri.Altman@wdc.com>
> Sent: 18 April 2020 18:09
> To: Alim Akhtar <alim.akhtar@samsung.com>; robh@kernel.org
> Cc: devicetree@vger.kernel.org; linux-scsi@vger.kernel.org; krzk@kernel.org;
> martin.petersen@oracle.com; kwmad.kim@samsung.com;
> stanley.chu@mediatek.com; cang@codeaurora.org; linux-samsung-
> soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: RE: [PATCH v6 0/10] exynos-ufs: Add support for UFS HCI
> 
> 
> >
> > This patch-set introduces UFS (Universal Flash Storage) host
> > controller support for Samsung family SoC. Mostly, it consists of UFS
> > PHY and host specific driver.
> >
> > - Changes since v5:
> > * re-introduce various quicks which was removed because of no driver
> > * consumer of those quirks, initial 4 patches does the same.
> You forgot to add those quirks to ufs_fixups.

ufs_fixups are for ufs __device__ related quirks, what I have posted are all host controller quirks.
Please have a look on the other quirks related to HCI like UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION
Which is used in other vendor HCI driver. 
Let me know if I am missing anything here.

> Each patch that introduces a quirk needs to introduce its users as well - This is
> the reason it was removed in the first place.
> 
> Thanks,
> Avri
Avri Altman April 18, 2020, 4 p.m. UTC | #3
> > -----Original Message-----
> > From: Avri Altman <Avri.Altman@wdc.com>
> > Sent: 18 April 2020 18:09
> > To: Alim Akhtar <alim.akhtar@samsung.com>; robh@kernel.org
> > Cc: devicetree@vger.kernel.org; linux-scsi@vger.kernel.org;
> krzk@kernel.org;
> > martin.petersen@oracle.com; kwmad.kim@samsung.com;
> > stanley.chu@mediatek.com; cang@codeaurora.org; linux-samsung-
> > soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > kernel@vger.kernel.org
> > Subject: RE: [PATCH v6 0/10] exynos-ufs: Add support for UFS HCI
> >
> >
> > >
> > > This patch-set introduces UFS (Universal Flash Storage) host
> > > controller support for Samsung family SoC. Mostly, it consists of UFS
> > > PHY and host specific driver.
> > >
> > > - Changes since v5:
> > > * re-introduce various quicks which was removed because of no driver
> > > * consumer of those quirks, initial 4 patches does the same.
> > You forgot to add those quirks to ufs_fixups.
> 
> ufs_fixups are for ufs __device__ related quirks, what I have posted are all
> host controller quirks.
Right.
So what I am saying is that I am missing the hba->quirks |= UFSHCI_QUIRK_<new-quirk>
In ufs-exynos.c for each one of the new quirks.
Avri Altman April 18, 2020, 4:04 p.m. UTC | #4
> -----Original Message-----
> From: Avri Altman
> Sent: Saturday, April 18, 2020 7:00 PM
> To: Alim Akhtar <alim.akhtar@samsung.com>; robh@kernel.org
> Cc: devicetree@vger.kernel.org; linux-scsi@vger.kernel.org;
> krzk@kernel.org; martin.petersen@oracle.com; kwmad.kim@samsung.com;
> stanley.chu@mediatek.com; cang@codeaurora.org; linux-samsung-
> soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: RE: [PATCH v6 0/10] exynos-ufs: Add support for UFS HCI
> 
> > > -----Original Message-----
> > > From: Avri Altman <Avri.Altman@wdc.com>
> > > Sent: 18 April 2020 18:09
> > > To: Alim Akhtar <alim.akhtar@samsung.com>; robh@kernel.org
> > > Cc: devicetree@vger.kernel.org; linux-scsi@vger.kernel.org;
> > krzk@kernel.org;
> > > martin.petersen@oracle.com; kwmad.kim@samsung.com;
> > > stanley.chu@mediatek.com; cang@codeaurora.org; linux-samsung-
> > > soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > > kernel@vger.kernel.org
> > > Subject: RE: [PATCH v6 0/10] exynos-ufs: Add support for UFS HCI
> > >
> > >
> > > >
> > > > This patch-set introduces UFS (Universal Flash Storage) host
> > > > controller support for Samsung family SoC. Mostly, it consists of UFS
> > > > PHY and host specific driver.
> > > >
> > > > - Changes since v5:
> > > > * re-introduce various quicks which was removed because of no driver
> > > > * consumer of those quirks, initial 4 patches does the same.
> > > You forgot to add those quirks to ufs_fixups.
> >
> > ufs_fixups are for ufs __device__ related quirks, what I have posted are all
> > host controller quirks.
> Right.
> So what I am saying is that I am missing the hba->quirks |=
> UFSHCI_QUIRK_<new-quirk>
> In ufs-exynos.c for each one of the new quirks.
Oh, but you add those in patch #9 - 
Ok.  Got it.  Sorry about the confusion.

Thanks,
Avri