scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
Subsystems (3)
cover scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
This series add DT bindings and driver for TI wrapper for Cadence UFS IP that is present on TI's J721e SoC
Vignesh Raghavendra (2):
dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
.../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 ++++++++++ drivers/scsi/ufs/Kconfig | 10 +++ drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ti-j721e-ufs.c | 90 +++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml create mode 100644 drivers/scsi/ufs/ti-j721e-ufs.c
Signature · 1 line
2.23.0
PATCH 1/2 dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
Add binding documentation of TI wrapper for Cadence UFS Controller.
--- .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ufs/ti,j721e-ufs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI J721e UFS Host Controller Glue Driver + +maintainers: + - Vignesh Raghavendra <[email protected]> + +properties: + compatible: + items: + - const: ti,j721e-ufs + + reg: + maxItems: 1 + description: address of TI UFS glue registers + + clocks: + maxItems: 1 + description: phandle to the M-PHY clock + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - power-domains + +examples: + - | + ufs_wrapper: ufs-wrapper@4e80000 { + compatible = "ti,j721e-ufs"; + reg = <0x0 0x4e80000 0x0 0x100>; + power-domains = <&k3_pds 277>; + clocks = <&k3_clks 277 1>; + assigned-clocks = <&k3_clks 277 1>; + assigned-clock-parents = <&k3_clks 277 4>; + #address-cells = <2>; + #size-cells = <2>; + };
Signature · 1 line
2.23.0
PATCH 2/2 scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
In reply to Vignesh RaghavendraTI's J721e SoC has a Cadence UFS IP with a TI specific wrapper. This is a minimal driver to configure the wrapper. It releases the UFS slave device out of reset and sets up registers to indicate PHY reference clock input frequency before probing child Cadence UFS driver.
--- drivers/scsi/ufs/Kconfig | 10 ++++ drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ti-j721e-ufs.c | 90 +++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 drivers/scsi/ufs/ti-j721e-ufs.c
drivers/scsi/ufs/Kconfig +10 -0
@@ -132,6 +132,16 @@ config SCSI_UFS_HISI Select this if you have UFS controller on Hisilicon chipset. If unsure, say N. +config SCSI_UFS_TI_J721E + tristate "TI glue layer for Cadence UFS Controller" + depends on OF && HAS_IOMEM && (ARCH_K3 || COMPILE_TEST) + help + This selects driver for TI glue layer for Cadence UFS Host + Controller IP. + + Selects this if you have TI platform with UFS controller. + If unsure, say N. + config SCSI_UFS_BSG bool "Universal Flash Storage BSG device node" depends on SCSI_UFSHCD
drivers/scsi/ufs/Makefile +1 -0
@@ -11,3 +11,4 @@ obj-$(CONFIG_SCSI_UFSHCD_PCI) += ufshcd-pci.o obj-$(CONFIG_SCSI_UFSHCD_PLATFORM) += ufshcd-pltfrm.o obj-$(CONFIG_SCSI_UFS_HISI) += ufs-hisi.o obj-$(CONFIG_SCSI_UFS_MEDIATEK) += ufs-mediatek.o +obj-$(CONFIG_SCSI_UFS_TI_J721E) += ti-j721e-ufs.o
drivers/scsi/ufs/ti-j721e-ufs.c new file +90 -0
90 lines not on this page · raw message
Signature · 1 line
2.23.0
Vignesh,
Quoted 2 lines
This series add DT bindings and driver for TI wrapper for Cadence UFS IP that is present on TI's J721e SoC
Will need some reviews from DT and ufs folks respectively before I can queue this up.
Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 9 lines · Martin K. Petersen
Vignesh,
Quoted 2 lines
This series add DT bindings and driver for TI wrapper for Cadence UFS IP that is present on TI's J721e SoC
Will need some reviews from DT and ufs folks respectively before I can queue this up.
Ok, thanks for the update! I guess I have the required reviewers on CC for DT and SCSI/UFS as mentioned in MAINTAINERS file for . Please let me know if I missed someone
Will wait for their comments/Acks.
Quoted 2 lines
Thanks!
Signature · 2 lines
Regards Vignesh
Rob Herring
maintainerRe: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
In reply to Vignesh RaghavendraQuoted 48 lines · Vignesh Raghavendra
Add binding documentation of TI wrapper for Cadence UFS Controller.
Signed-off-by Vignesh Raghavendra <[email protected]>--- .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yamlDocumentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +34
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ufs/ti,j721e-ufs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI J721e UFS Host Controller Glue Driver + +maintainers: + - Vignesh Raghavendra <[email protected]> + +properties: + compatible: + items: + - const: ti,j721e-ufs + + reg: + maxItems: 1 + description: address of TI UFS glue registers + + clocks: + maxItems: 1 + description: phandle to the M-PHY clock + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - power-domains + +examples:
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml line 44
Quoted 10 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +10
-0+ - | + ufs_wrapper: ufs-wrapper@4e80000 { + compatible = "ti,j721e-ufs"; + reg = <0x0 0x4e80000 0x0 0x100>; + power-domains = <&k3_pds 277>; + clocks = <&k3_clks 277 1>; + assigned-clocks = <&k3_clks 277 1>; + assigned-clock-parents = <&k3_clks 277 4>; + #address-cells = <2>; + #size-cells = <2>;
Based on the driver you expect to have a child node here with the UFS controller? You need to show that and have a schema for it.
Quoted 4 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +1
-0+ };Signature · 1 line
2.23.0
Re: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
Quoted 54 lines · Rob Herring
Quoted 53 lines · Vignesh Raghavendra
Add binding documentation of TI wrapper for Cadence UFS Controller.
Signed-off-by Vignesh Raghavendra <[email protected]>--- .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yamlDocumentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +39
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ufs/ti,j721e-ufs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI J721e UFS Host Controller Glue Driver + +maintainers: + - Vignesh Raghavendra <[email protected]> + +properties: + compatible: + items: + - const: ti,j721e-ufs + + reg: + maxItems: 1 + description: address of TI UFS glue registers + + clocks: + maxItems: 1 + description: phandle to the M-PHY clock + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - power-domains + +examples: + - | + ufs_wrapper: ufs-wrapper@4e80000 { + compatible = "ti,j721e-ufs"; + reg = <0x0 0x4e80000 0x0 0x100>; + power-domains = <&k3_pds 277>;
Quoted 9 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml line 44
Quoted 5 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +5
-0+ clocks = <&k3_clks 277 1>; + assigned-clocks = <&k3_clks 277 1>; + assigned-clock-parents = <&k3_clks 277 4>; + #address-cells = <2>; + #size-cells = <2>;Based on the driver you expect to have a child node here with the UFS controller? You need to show that and have a schema for it.
Yes, Cadence UFS controller node will be the child node. Its bindings are documented at: Documentation/devicetree/bindings/ufs/cdns,ufshc.txt (which in turn refers to Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt)
But they are not in .yaml yet. How would you suggest to reference that? Or should I just write plain text DT binding doc given that subsystem is not converted to yaml?
Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +1
-0+ };Signature · 1 line
2.23.0
Signature · 2 lines
Regards Vignesh
Rob Herring
maintainerRe: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
Quoted 68 lines · Vignesh Raghavendra
Quoted 54 lines · Rob Herring
Quoted 53 lines · Vignesh Raghavendra
Add binding documentation of TI wrapper for Cadence UFS Controller.
Signed-off-by Vignesh Raghavendra <[email protected]>--- .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yamlDocumentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +39
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ufs/ti,j721e-ufs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI J721e UFS Host Controller Glue Driver + +maintainers: + - Vignesh Raghavendra <[email protected]> + +properties: + compatible: + items: + - const: ti,j721e-ufs + + reg: + maxItems: 1 + description: address of TI UFS glue registers + + clocks: + maxItems: 1 + description: phandle to the M-PHY clock + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - power-domains + +examples: + - | + ufs_wrapper: ufs-wrapper@4e80000 { + compatible = "ti,j721e-ufs"; + reg = <0x0 0x4e80000 0x0 0x100>; + power-domains = <&k3_pds 277>;Quoted 9 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml line 44
Quoted 5 lines
Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml new file +5
-0+ clocks = <&k3_clks 277 1>; + assigned-clocks = <&k3_clks 277 1>; + assigned-clock-parents = <&k3_clks 277 4>; + #address-cells = <2>; + #size-cells = <2>;Based on the driver you expect to have a child node here with the UFS controller? You need to show that and have a schema for it.
Quoted 8 lines
Yes, Cadence UFS controller node will be the child node. Its bindings are documented at:
Documentation/devicetree/bindings/ufs/cdns,ufshc.txt(which in turn refers toDocumentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt)But they are not in .yaml yet. How would you suggest to reference that? Or should I just write plain text DT binding doc given that subsystem is not converted to yaml?
I guess for now just define the child node and refer to the text document. Or feel free to convert the above 2 docs to schema. :)
Rob