mbox series

[v6,0/7] treewide: ufs: Add support for Renesas R-Car UFS controller

Message ID 20220603110524.1997825-1-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
Headers show
Series treewide: ufs: Add support for Renesas R-Car UFS controller | expand

Message

Yoshihiro Shimoda June 3, 2022, 11:05 a.m. UTC
This patch series adds support Renesas R-Car S4-8 UFS controller.
This controller has some restrictions so adds some quirks for it.
Before using this driver, we have to initialize a clock generator
on the environment board (named "Spider") by using the commands of
U-Boot like below:
 => i2c dev 0
 => i2c mw 0x6c 0x26 0x05
 => i2c olen 0x6c 2
 => i2c mw 0x6c 0x13a 0x86
 => i2c mw 0x6c 0x268 0x06
 => i2c mw 0x6c 0x269 0x00
 => i2c mw 0x6c 0x26a 0x3c
 => i2c mw 0x6c 0x26b 0x00
 => i2c mw 0x6c 0x26c 0x06
 => i2c mw 0x6c 0x26d 0x00
 => i2c mw 0x6c 0x26e 0x3f
 => i2c mw 0x6c 0x26f 0x00

Changes from v5:
 - Rebase on the following repositories:
   - Based on renesas-drivers-2022-05-24-v5.18
   - Merged jejb/for-next
 - Add Reviewed-by and Acked-by tags in patch [1/7].
   Note that the document has an error about number of interrupts.
   So, the Renesas UFS has one interrupt and it's the same with ufs-common.yaml.
 - Clear hda->capabilities of MASK_64_ADDRESSING_SUPPORT instead in patch [2/7].
 - Fix some issues in patch [4/7].
 - Add Reviewed-by in patch [6/7] and [7/7].
https://lore.kernel.org/all/20220427123706.555166-2-yoshihiro.shimoda.uh@renesas.com/

Changes from v4:
 - Fix ufs_renesas_of_match was not terminated in patch [4/7].
   (from kernel test robot, thanks!)
https://lore.kernel.org/all/20220420025450.289578-1-yoshihiro.shimoda.uh@renesas.com/

Changes from v3:
 - Fix build warning by clang in patch [4/7].
https://lore.kernel.org/all/20220419120316.209151-1-yoshihiro.shimoda.uh@renesas.com/

Changes from v2:
 - Add Reviewed-by in patch [1/7]. (Krzysztof, thanks!)
 - Use WARN_ON() instead of BUG_ON in patch [4/7].
https://lore.kernel.org/all/20220414023115.4190736-1-yoshihiro.shimoda.uh@renesas.com/

Changes from v1:
 - Fix dt-binding doc in patch [1/7].
 - Add __maybe_unused for compile test on other platforms in patch [4/7].
 - Fix node names in patch [5/7].
https://lore.kernel.org/all/20220412073647.3808493-1-yoshihiro.shimoda.uh@renesas.com/

Yoshihiro Shimoda (7):
  dt-bindings: ufs: Document Renesas R-Car UFS host controller
  ufs: add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
  ufs: add UFSHCD_QUIRK_HIBERN_FASTAUTO
  scsi: ufs-renesas: Add support for Renesas R-Car UFS controller
  scsi: MAINTAINERS: Add maintainer for Renesas UFS driver
  arm64: dts: renesas: r8a779f0: Add UFS node
  arm64: dts: renesas: r8a779f0: spider-cpu: Enable UFS device

 .../devicetree/bindings/ufs/renesas,ufs.yaml  |  61 +++
 MAINTAINERS                                   |   7 +
 .../boot/dts/renesas/r8a779f0-spider-cpu.dtsi |   8 +
 arch/arm64/boot/dts/renesas/r8a779f0.dtsi     |  19 +
 drivers/ufs/core/ufshcd.c                     |  11 +-
 drivers/ufs/host/Kconfig                      |  12 +
 drivers/ufs/host/Makefile                     |   1 +
 drivers/ufs/host/ufs-renesas.c                | 412 ++++++++++++++++++
 include/ufs/ufshcd.h                          |  12 +
 9 files changed, 541 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ufs/renesas,ufs.yaml
 create mode 100644 drivers/ufs/host/ufs-renesas.c

Comments

Geert Uytterhoeven June 14, 2022, 8 a.m. UTC | #1
Hi Martin,

On Fri, Jun 3, 2022 at 5:40 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> This patch series adds support Renesas R-Car S4-8 UFS controller.
> This controller has some restrictions so adds some quirks for it.
>
> Yoshihiro Shimoda (7):
>   dt-bindings: ufs: Document Renesas R-Car UFS host controller
>   ufs: add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
>   ufs: add UFSHCD_QUIRK_HIBERN_FASTAUTO
>   scsi: ufs-renesas: Add support for Renesas R-Car UFS controller
>   scsi: MAINTAINERS: Add maintainer for Renesas UFS driver
>   arm64: dts: renesas: r8a779f0: Add UFS node
>   arm64: dts: renesas: r8a779f0: spider-cpu: Enable UFS device

I see you have applied this series, including the DTS parts, to
your for-next tree. Please never apply DTS patches to the SCSI tree,
as they are meant to go in through the soc tree.

Can you please drop the last two patches from your tree?
Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Martin K. Petersen June 15, 2022, 2:53 a.m. UTC | #2
Geert,

> I see you have applied this series, including the DTS parts, to your
> for-next tree. Please never apply DTS patches to the SCSI tree, as
> they are meant to go in through the soc tree.

OK. Just queued it up in for-next to see what would break. It's not in
the actual queue for 5.20.

> Can you please drop the last two patches from your tree?

Sure. I can also wait with the rest if you prefer?
Geert Uytterhoeven June 15, 2022, 7:20 a.m. UTC | #3
Hi Martin,

On Wed, Jun 15, 2022 at 4:54 AM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
> > I see you have applied this series, including the DTS parts, to your
> > for-next tree. Please never apply DTS patches to the SCSI tree, as
> > they are meant to go in through the soc tree.
>
> OK. Just queued it up in for-next to see what would break. It's not in
> the actual queue for 5.20.

IC. How will I know when they are queued for real?

> > Can you please drop the last two patches from your tree?
>
> Sure. I can also wait with the rest if you prefer?

No need to wait with the rest, unless you are not happy with it yet?
Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Martin K. Petersen June 17, 2022, 1:29 a.m. UTC | #4
Geert,

>> OK. Just queued it up in for-next to see what would break. It's not in
>> the actual queue for 5.20.
>
> IC. How will I know when they are queued for real?

I send out merge notifications when patches end up in either 'fixes' or
'queue'.

My 'for-next' branch is ephemeral and I often queue things to just see
what breaks. I do not have the ability to test several of the drivers
that go through my tree so I do depend on the various checkers to help
identify issues prior to merging.

> No need to wait with the rest, unless you are not happy with it yet?
> Thanks!

The rest looks OK to me. I'll leave it in.
Martin K. Petersen June 17, 2022, 2:21 a.m. UTC | #5
On Fri, 3 Jun 2022 20:05:17 +0900, Yoshihiro Shimoda wrote:

> This patch series adds support Renesas R-Car S4-8 UFS controller.
> This controller has some restrictions so adds some quirks for it.
> Before using this driver, we have to initialize a clock generator
> on the environment board (named "Spider") by using the commands of
> U-Boot like below:
>  => i2c dev 0
>  => i2c mw 0x6c 0x26 0x05
>  => i2c olen 0x6c 2
>  => i2c mw 0x6c 0x13a 0x86
>  => i2c mw 0x6c 0x268 0x06
>  => i2c mw 0x6c 0x269 0x00
>  => i2c mw 0x6c 0x26a 0x3c
>  => i2c mw 0x6c 0x26b 0x00
>  => i2c mw 0x6c 0x26c 0x06
>  => i2c mw 0x6c 0x26d 0x00
>  => i2c mw 0x6c 0x26e 0x3f
>  => i2c mw 0x6c 0x26f 0x00
> 
> [...]

Applied to 5.20/scsi-queue, thanks!

[1/7] dt-bindings: ufs: Document Renesas R-Car UFS host controller
      https://git.kernel.org/mkp/scsi/c/7522c08d1e55
[2/7] ufs: add UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS
      https://git.kernel.org/mkp/scsi/c/6554400d6f66
[3/7] ufs: add UFSHCD_QUIRK_HIBERN_FASTAUTO
      https://git.kernel.org/mkp/scsi/c/2f11bbc2c7f3
[4/7] scsi: ufs-renesas: Add support for Renesas R-Car UFS controller
      https://git.kernel.org/mkp/scsi/c/d69520288efd
[5/7] scsi: MAINTAINERS: Add maintainer for Renesas UFS driver
      https://git.kernel.org/mkp/scsi/c/09c962fd4816