All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
@ 2019-09-18 13:39 ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-09-18 13:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, jejb, Martin K Petersen
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, linux-scsi, Vignesh Raghavendra, nsekhar

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

-- 
2.23.0


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

* [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
@ 2019-09-18 13:39 ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-09-18 13:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, jejb, Martin K Petersen
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, linux-scsi, Vignesh Raghavendra, nsekhar

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

-- 
2.23.0

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

* [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
  2019-09-18 13:39 ` Vignesh Raghavendra
@ 2019-09-18 13:39   ` Vignesh Raghavendra
  -1 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-09-18 13:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, jejb, Martin K Petersen
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, linux-scsi, Vignesh Raghavendra, nsekhar

Add binding documentation of TI wrapper for Cadence UFS Controller.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml

diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
new file mode 100644
index 000000000000..dabd7c795fbe
--- /dev/null
+++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
@@ -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 <vigneshr@ti.com>
+
+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>;
+    };
-- 
2.23.0


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

* [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
@ 2019-09-18 13:39   ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-09-18 13:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, jejb, Martin K Petersen
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, linux-scsi, Vignesh Raghavendra, nsekhar

Add binding documentation of TI wrapper for Cadence UFS Controller.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml

diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
new file mode 100644
index 000000000000..dabd7c795fbe
--- /dev/null
+++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
@@ -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 <vigneshr@ti.com>
+
+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>;
+    };
-- 
2.23.0

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

* [PATCH 2/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
  2019-09-18 13:39 ` Vignesh Raghavendra
@ 2019-09-18 13:39   ` Vignesh Raghavendra
  -1 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-09-18 13:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, jejb, Martin K Petersen
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, linux-scsi, Vignesh Raghavendra, nsekhar

TI'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.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 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

diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
index 0b845ab7c3bf..d14c2243e02a 100644
--- a/drivers/scsi/ufs/Kconfig
+++ b/drivers/scsi/ufs/Kconfig
@@ -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
diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile
index 2a9097939bcb..94c6c5d7334b 100644
--- a/drivers/scsi/ufs/Makefile
+++ b/drivers/scsi/ufs/Makefile
@@ -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
diff --git a/drivers/scsi/ufs/ti-j721e-ufs.c b/drivers/scsi/ufs/ti-j721e-ufs.c
new file mode 100644
index 000000000000..a653bf1902f3
--- /dev/null
+++ b/drivers/scsi/ufs/ti-j721e-ufs.c
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
+//
+
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+
+#define UFS_SS_CTRL		0x4
+#define UFS_SS_RST_N_PCS	BIT(0)
+#define UFS_SS_CLK_26MHZ	BIT(4)
+
+static int ti_j721e_ufs_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	unsigned long clk_rate;
+	void __iomem *regbase;
+	struct clk *clk;
+	u32 reg = 0;
+	int ret;
+
+	regbase = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(regbase))
+		return PTR_ERR(regbase);
+
+	/* Select MPHY refclk frequency */
+	clk = devm_clk_get(dev, NULL);
+	if (IS_ERR(clk)) {
+		dev_err(dev, "Cannot claim MPHY clock.\n");
+		return PTR_ERR(clk);
+	}
+	clk_rate = clk_get_rate(clk);
+	if (clk_rate == 26000000)
+		reg |= UFS_SS_CLK_26MHZ;
+	devm_clk_put(dev, clk);
+
+	pm_runtime_enable(dev);
+	ret = pm_runtime_get_sync(dev);
+	if (ret < 0) {
+		pm_runtime_put_noidle(dev);
+		return ret;
+	}
+
+	/*  Take UFS slave device out of reset */
+	reg |= UFS_SS_RST_N_PCS;
+	writel(reg, regbase + UFS_SS_CTRL);
+
+	ret = of_platform_populate(pdev->dev.of_node, NULL, NULL,
+				   dev);
+	if (ret) {
+		dev_err(dev, "failed to populate child nodes %d\n", ret);
+		pm_runtime_put_sync(dev);
+	}
+
+	return ret;
+}
+
+static int ti_j721e_ufs_remove(struct platform_device *pdev)
+{
+	of_platform_depopulate(&pdev->dev);
+	pm_runtime_put_sync(&pdev->dev);
+
+	return 0;
+}
+
+static const struct of_device_id ti_j721e_ufs_of_match[] = {
+	{
+		.compatible = "ti,j721e-ufs",
+	},
+	{ },
+};
+
+static struct platform_driver ti_j721e_ufs_driver = {
+	.probe	= ti_j721e_ufs_probe,
+	.remove	= ti_j721e_ufs_remove,
+	.driver	= {
+		.name   = "ti-j721e-ufs",
+		.of_match_table = ti_j721e_ufs_of_match,
+	},
+};
+module_platform_driver(ti_j721e_ufs_driver);
+
+MODULE_AUTHOR("Vignesh Raghavendra <vigneshr@ti.com>");
+MODULE_DESCRIPTION("TI UFS host controller glue driver");
+MODULE_LICENSE("GPL v2");
-- 
2.23.0


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

* [PATCH 2/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
@ 2019-09-18 13:39   ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-09-18 13:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, jejb, Martin K Petersen
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, linux-scsi, Vignesh Raghavendra, nsekhar

TI'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.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 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

diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
index 0b845ab7c3bf..d14c2243e02a 100644
--- a/drivers/scsi/ufs/Kconfig
+++ b/drivers/scsi/ufs/Kconfig
@@ -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
diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile
index 2a9097939bcb..94c6c5d7334b 100644
--- a/drivers/scsi/ufs/Makefile
+++ b/drivers/scsi/ufs/Makefile
@@ -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
diff --git a/drivers/scsi/ufs/ti-j721e-ufs.c b/drivers/scsi/ufs/ti-j721e-ufs.c
new file mode 100644
index 000000000000..a653bf1902f3
--- /dev/null
+++ b/drivers/scsi/ufs/ti-j721e-ufs.c
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
+//
+
+#include <linux/clk.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+
+#define UFS_SS_CTRL		0x4
+#define UFS_SS_RST_N_PCS	BIT(0)
+#define UFS_SS_CLK_26MHZ	BIT(4)
+
+static int ti_j721e_ufs_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	unsigned long clk_rate;
+	void __iomem *regbase;
+	struct clk *clk;
+	u32 reg = 0;
+	int ret;
+
+	regbase = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(regbase))
+		return PTR_ERR(regbase);
+
+	/* Select MPHY refclk frequency */
+	clk = devm_clk_get(dev, NULL);
+	if (IS_ERR(clk)) {
+		dev_err(dev, "Cannot claim MPHY clock.\n");
+		return PTR_ERR(clk);
+	}
+	clk_rate = clk_get_rate(clk);
+	if (clk_rate == 26000000)
+		reg |= UFS_SS_CLK_26MHZ;
+	devm_clk_put(dev, clk);
+
+	pm_runtime_enable(dev);
+	ret = pm_runtime_get_sync(dev);
+	if (ret < 0) {
+		pm_runtime_put_noidle(dev);
+		return ret;
+	}
+
+	/*  Take UFS slave device out of reset */
+	reg |= UFS_SS_RST_N_PCS;
+	writel(reg, regbase + UFS_SS_CTRL);
+
+	ret = of_platform_populate(pdev->dev.of_node, NULL, NULL,
+				   dev);
+	if (ret) {
+		dev_err(dev, "failed to populate child nodes %d\n", ret);
+		pm_runtime_put_sync(dev);
+	}
+
+	return ret;
+}
+
+static int ti_j721e_ufs_remove(struct platform_device *pdev)
+{
+	of_platform_depopulate(&pdev->dev);
+	pm_runtime_put_sync(&pdev->dev);
+
+	return 0;
+}
+
+static const struct of_device_id ti_j721e_ufs_of_match[] = {
+	{
+		.compatible = "ti,j721e-ufs",
+	},
+	{ },
+};
+
+static struct platform_driver ti_j721e_ufs_driver = {
+	.probe	= ti_j721e_ufs_probe,
+	.remove	= ti_j721e_ufs_remove,
+	.driver	= {
+		.name   = "ti-j721e-ufs",
+		.of_match_table = ti_j721e_ufs_of_match,
+	},
+};
+module_platform_driver(ti_j721e_ufs_driver);
+
+MODULE_AUTHOR("Vignesh Raghavendra <vigneshr@ti.com>");
+MODULE_DESCRIPTION("TI UFS host controller glue driver");
+MODULE_LICENSE("GPL v2");
-- 
2.23.0

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

* Re: [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
  2019-09-18 13:39 ` Vignesh Raghavendra
@ 2019-10-01  3:57   ` Martin K. Petersen
  -1 siblings, 0 replies; 14+ messages in thread
From: Martin K. Petersen @ 2019-10-01  3:57 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Rob Herring, Mark Rutland, jejb, Martin K Petersen, Alim Akhtar,
	Avri Altman, Pedro Sousa, Janek Kotas, devicetree, linux-kernel,
	linux-scsi, nsekhar


Vignesh,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
@ 2019-10-01  3:57   ` Martin K. Petersen
  0 siblings, 0 replies; 14+ messages in thread
From: Martin K. Petersen @ 2019-10-01  3:57 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Rob Herring, Mark Rutland, jejb, Martin K Petersen, Alim Akhtar,
	Avri Altman, Pedro Sousa, Janek Kotas, devicetree, linux-kernel,
	linux-scsi, nsekhar


Vignesh,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
  2019-10-01  3:57   ` Martin K. Petersen
@ 2019-10-01  8:08     ` Vignesh Raghavendra
  -1 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-10-01  8:08 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Rob Herring, Mark Rutland, jejb, Alim Akhtar, Avri Altman,
	Pedro Sousa, Janek Kotas, devicetree, linux-kernel, linux-scsi,
	nsekhar



On 01/10/19 9:27 AM, Martin K. Petersen wrote:
> 
> Vignesh,
> 
>> 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.

> Thanks!
> 

-- 
Regards
Vignesh

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

* Re: [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP
@ 2019-10-01  8:08     ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-10-01  8:08 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Rob Herring, Mark Rutland, jejb, Alim Akhtar, Avri Altman,
	Pedro Sousa, Janek Kotas, devicetree, linux-kernel, linux-scsi,
	nsekhar



On 01/10/19 9:27 AM, Martin K. Petersen wrote:
> 
> Vignesh,
> 
>> 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.

> Thanks!
> 

-- 
Regards
Vignesh

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

* Re: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
  2019-09-18 13:39   ` Vignesh Raghavendra
  (?)
@ 2019-10-01 12:08   ` Rob Herring
  2019-10-01 12:18       ` Vignesh Raghavendra
  -1 siblings, 1 reply; 14+ messages in thread
From: Rob Herring @ 2019-10-01 12:08 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Mark Rutland, jejb, Martin K Petersen, Alim Akhtar, Avri Altman,
	Pedro Sousa, Janek Kotas, devicetree, linux-kernel, linux-scsi,
	nsekhar

On Wed, Sep 18, 2019 at 07:09:20PM +0530, Vignesh Raghavendra wrote:
> Add binding documentation of TI wrapper for Cadence UFS Controller.
> 
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> ---
>  .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
> 
> diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
> new file mode 100644
> index 000000000000..dabd7c795fbe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
> @@ -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 <vigneshr@ti.com>
> +
> +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>;

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.

> +    };
> -- 
> 2.23.0
> 

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

* Re: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
  2019-10-01 12:08   ` Rob Herring
@ 2019-10-01 12:18       ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-10-01 12:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, jejb, Martin K Petersen, Alim Akhtar, Avri Altman,
	Pedro Sousa, Janek Kotas, devicetree, linux-kernel, linux-scsi,
	nsekhar



On 01/10/19 5:38 PM, Rob Herring wrote:
> On Wed, Sep 18, 2019 at 07:09:20PM +0530, Vignesh Raghavendra wrote:
>> Add binding documentation of TI wrapper for Cadence UFS Controller.
>>
>> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
>> ---
>>  .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++
>>  1 file changed, 45 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
>> new file mode 100644
>> index 000000000000..dabd7c795fbe
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
>> @@ -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 <vigneshr@ti.com>
>> +
>> +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>;
> 
> 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?

>> +    };
>> -- 
>> 2.23.0
>>

-- 
Regards
Vignesh

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

* Re: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
@ 2019-10-01 12:18       ` Vignesh Raghavendra
  0 siblings, 0 replies; 14+ messages in thread
From: Vignesh Raghavendra @ 2019-10-01 12:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, jejb, Martin K Petersen, Alim Akhtar, Avri Altman,
	Pedro Sousa, Janek Kotas, devicetree, linux-kernel, linux-scsi,
	nsekhar



On 01/10/19 5:38 PM, Rob Herring wrote:
> On Wed, Sep 18, 2019 at 07:09:20PM +0530, Vignesh Raghavendra wrote:
>> Add binding documentation of TI wrapper for Cadence UFS Controller.
>>
>> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
>> ---
>>  .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++
>>  1 file changed, 45 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
>> new file mode 100644
>> index 000000000000..dabd7c795fbe
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
>> @@ -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 <vigneshr@ti.com>
>> +
>> +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>;
> 
> 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?

>> +    };
>> -- 
>> 2.23.0
>>

-- 
Regards
Vignesh

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

* Re: [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper
  2019-10-01 12:18       ` Vignesh Raghavendra
  (?)
@ 2019-10-03 21:56       ` Rob Herring
  -1 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2019-10-03 21:56 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Mark Rutland, James E.J. Bottomley, Martin K Petersen,
	Alim Akhtar, Avri Altman, Pedro Sousa, Janek Kotas, devicetree,
	linux-kernel, SCSI, Sekhar Nori

On Tue, Oct 1, 2019 at 7:18 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
>
>
>
> On 01/10/19 5:38 PM, Rob Herring wrote:
> > On Wed, Sep 18, 2019 at 07:09:20PM +0530, Vignesh Raghavendra wrote:
> >> Add binding documentation of TI wrapper for Cadence UFS Controller.
> >>
> >> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> >> ---
> >>  .../devicetree/bindings/ufs/ti,j721e-ufs.yaml | 45 +++++++++++++++++++
> >>  1 file changed, 45 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
> >>
> >> diff --git a/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
> >> new file mode 100644
> >> index 000000000000..dabd7c795fbe
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/ufs/ti,j721e-ufs.yaml
> >> @@ -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 <vigneshr@ti.com>
> >> +
> >> +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>;
> >
> > 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?

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

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

end of thread, other threads:[~2019-10-03 21:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 13:39 [PATCH 0/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP Vignesh Raghavendra
2019-09-18 13:39 ` Vignesh Raghavendra
2019-09-18 13:39 ` [PATCH 1/2] dt-bindings: ufs: ti,j721e-ufs.yaml: Add binding for TI UFS wrapper Vignesh Raghavendra
2019-09-18 13:39   ` Vignesh Raghavendra
2019-10-01 12:08   ` Rob Herring
2019-10-01 12:18     ` Vignesh Raghavendra
2019-10-01 12:18       ` Vignesh Raghavendra
2019-10-03 21:56       ` Rob Herring
2019-09-18 13:39 ` [PATCH 2/2] scsi: ufs: Add driver for TI wrapper for Cadence UFS IP Vignesh Raghavendra
2019-09-18 13:39   ` Vignesh Raghavendra
2019-10-01  3:57 ` [PATCH 0/2] " Martin K. Petersen
2019-10-01  3:57   ` Martin K. Petersen
2019-10-01  8:08   ` Vignesh Raghavendra
2019-10-01  8:08     ` Vignesh Raghavendra

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.