All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-05 15:22 ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-05 15:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, devicetree, grygorii.strashko, linux,
	Santosh Shilimkar, Arnd Bergmann, Grant Likely, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Shawn Guo, Kumar Gala

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..f0120c1 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  VIV - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+VIV - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb@2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+
+			dma-coherent;
+			dma-ranges;
+
+			dwc3@2690000 {
+				compatible = "synopsys,dwc3";
+				[...]
+			};
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5


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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-05 15:22 ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-05 15:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, devicetree, grygorii.strashko, linux,
	Santosh Shilimkar, Arnd Bergmann, Grant Likely, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Shawn Guo, Kumar Gala

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..f0120c1 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  VIV - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+VIV - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb@2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+
+			dma-coherent;
+			dma-ranges;
+
+			dwc3@2690000 {
+				compatible = "synopsys,dwc3";
+				[...]
+			};
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-05 15:22 ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-05 15:22 UTC (permalink / raw)
  To: linux-arm-kernel

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..f0120c1 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  VIV - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+VIV - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb at 2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+
+			dma-coherent;
+			dma-ranges;
+
+			dwc3 at 2690000 {
+				compatible = "synopsys,dwc3";
+				[...]
+			};
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09  2:06   ` Shawn Guo
  0 siblings, 0 replies; 38+ messages in thread
From: Shawn Guo @ 2014-06-09  2:06 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: linux-kernel, linux-arm-kernel, devicetree, grygorii.strashko,
	linux, Arnd Bergmann, Grant Likely, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala

On Thu, Jun 05, 2014 at 11:22:00AM -0400, Santosh Shilimkar wrote:
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
> 
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
> 
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Shawn Guo <shawn.guo@freescale.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Thanks for the documentation.  I think it's definitely useful for future
users of the binding.

Acked-by: Shawn Guo <shawn.guo@freescale.com>

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09  2:06   ` Shawn Guo
  0 siblings, 0 replies; 38+ messages in thread
From: Shawn Guo @ 2014-06-09  2:06 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, grygorii.strashko-l0cyMroinI0,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, Arnd Bergmann, Grant Likely,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala

On Thu, Jun 05, 2014 at 11:22:00AM -0400, Santosh Shilimkar wrote:
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
> 
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
> 
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
> 
> Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
> Cc: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>

Thanks for the documentation.  I think it's definitely useful for future
users of the binding.

Acked-by: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09  2:06   ` Shawn Guo
  0 siblings, 0 replies; 38+ messages in thread
From: Shawn Guo @ 2014-06-09  2:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 05, 2014 at 11:22:00AM -0400, Santosh Shilimkar wrote:
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
> 
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
> 
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Shawn Guo <shawn.guo@freescale.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Thanks for the documentation.  I think it's definitely useful for future
users of the binding.

Acked-by: Shawn Guo <shawn.guo@freescale.com>

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09  2:13   ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2014-06-09  2:13 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: linux-kernel, Mark Rutland, devicetree, grygorii.strashko,
	Russell King, Pawel Moll, Arnd Bergmann, Ian Campbell,
	Rob Herring, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Shawn Guo <shawn.guo@freescale.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..f0120c1 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>    VIII - Specifying device power management information (sleep property)
>
> +  VIV - Specifying dma bus information

"9" in Roman numeral is "IX"

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09  2:13   ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2014-06-09  2:13 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: linux-kernel, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA,
	grygorii.strashko-l0cyMroinI0, Russell King, Pawel Moll,
	Arnd Bergmann, Ian Campbell, Rob Herring, Shawn Guo, Kumar Gala,
	Grant Likely, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
<santosh.shilimkar-l0cyMroinI0@public.gmane.org> wrote:
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
> Cc: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
> ---
>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..f0120c1 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>    VIII - Specifying device power management information (sleep property)
>
> +  VIV - Specifying dma bus information

"9" in Roman numeral is "IX"
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09  2:13   ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2014-06-09  2:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Shawn Guo <shawn.guo@freescale.com>
> Cc: Kumar Gala <galak@codeaurora.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..f0120c1 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>    VIII - Specifying device power management information (sleep property)
>
> +  VIV - Specifying dma bus information

"9" in Roman numeral is "IX"

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09 13:59     ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-09 13:59 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-kernel, Mark Rutland, devicetree, grygorii.strashko,
	Russell King, Pawel Moll, Arnd Bergmann, Ian Campbell,
	Rob Herring, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> Recently we introduced the generic device tree infrastructure for couple of DMA
>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>> its useful for future users.
>>
>> The "dma-ranges" property is intended to be used for describing the
>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>
>> The "dma-coherent" property is intended to be used for identifying devices
>> supported coherent DMA operations.
>>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Grant Likely <grant.likely@linaro.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Pawel Moll <pawel.moll@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>> Cc: Shawn Guo <shawn.guo@freescale.com>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>
>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>> index 1f013bd..f0120c1 100644
>> --- a/Documentation/devicetree/booting-without-of.txt
>> +++ b/Documentation/devicetree/booting-without-of.txt
>> @@ -51,6 +51,8 @@ Table of Contents
>>
>>    VIII - Specifying device power management information (sleep property)
>>
>> +  VIV - Specifying dma bus information
> 
> "9" in Roman numeral is "IX"
> 
Yeah.. Not sure what I was thinking...

Regards,
Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09 13:59     ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-09 13:59 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-kernel, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA,
	grygorii.strashko-l0cyMroinI0, Russell King, Pawel Moll,
	Arnd Bergmann, Ian Campbell, Rob Herring, Shawn Guo, Kumar Gala,
	Grant Likely, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
> <santosh.shilimkar-l0cyMroinI0@public.gmane.org> wrote:
>> Recently we introduced the generic device tree infrastructure for couple of DMA
>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>> its useful for future users.
>>
>> The "dma-ranges" property is intended to be used for describing the
>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>
>> The "dma-coherent" property is intended to be used for identifying devices
>> supported coherent DMA operations.
>>
>> Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
>> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
>> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
>> Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
>> Cc: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
>> Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
>> ---
>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>
>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>> index 1f013bd..f0120c1 100644
>> --- a/Documentation/devicetree/booting-without-of.txt
>> +++ b/Documentation/devicetree/booting-without-of.txt
>> @@ -51,6 +51,8 @@ Table of Contents
>>
>>    VIII - Specifying device power management information (sleep property)
>>
>> +  VIV - Specifying dma bus information
> 
> "9" in Roman numeral is "IX"
> 
Yeah.. Not sure what I was thinking...

Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-09 13:59     ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-09 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> Recently we introduced the generic device tree infrastructure for couple of DMA
>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>> its useful for future users.
>>
>> The "dma-ranges" property is intended to be used for describing the
>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>
>> The "dma-coherent" property is intended to be used for identifying devices
>> supported coherent DMA operations.
>>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Grant Likely <grant.likely@linaro.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Pawel Moll <pawel.moll@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>> Cc: Shawn Guo <shawn.guo@freescale.com>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>
>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>> index 1f013bd..f0120c1 100644
>> --- a/Documentation/devicetree/booting-without-of.txt
>> +++ b/Documentation/devicetree/booting-without-of.txt
>> @@ -51,6 +51,8 @@ Table of Contents
>>
>>    VIII - Specifying device power management information (sleep property)
>>
>> +  VIV - Specifying dma bus information
> 
> "9" in Roman numeral is "IX"
> 
Yeah.. Not sure what I was thinking...

Regards,
Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
  2014-06-09 13:59     ` Santosh Shilimkar
  (?)
@ 2014-06-20 15:04       ` Santosh Shilimkar
  -1 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 15:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Fabio Estevam, linux-kernel, Mark Rutland, devicetree,
	grygorii.strashko, Russell King, Pawel Moll, Arnd Bergmann,
	Ian Campbell, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>> <santosh.shilimkar@ti.com> wrote:
>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>> its useful for future users.
>>>
>>> The "dma-ranges" property is intended to be used for describing the
>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>
>>> The "dma-coherent" property is intended to be used for identifying devices
>>> supported coherent DMA operations.
>>>
>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>> Cc: Grant Likely <grant.likely@linaro.org>
>>> Cc: Rob Herring <robh+dt@kernel.org>
>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>> Cc: Kumar Gala <galak@codeaurora.org>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> ---
>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>  1 file changed, 60 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>> index 1f013bd..f0120c1 100644
>>> --- a/Documentation/devicetree/booting-without-of.txt
>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>> @@ -51,6 +51,8 @@ Table of Contents
>>>
>>>    VIII - Specifying device power management information (sleep property)
>>>
>>> +  VIV - Specifying dma bus information
>>
>> "9" in Roman numeral is "IX"
>>
> Yeah.. Not sure what I was thinking...
> 
Updated patch end of the email with the typo fixed.

Rob,
Can you please pick this up if you are ok with the it.

Regards,
Santosh

>From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Fri, 20 Jun 2014 11:01:54 -0400
Subject: [PATCH] dt/documentation: add specification of dma bus information

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..0b0928c 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  IX - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+IX - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb@2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+
+			dma-coherent;
+			dma-ranges;
+
+			dwc3@2690000 {
+				compatible = "synopsys,dwc3";
+				[...]
+			};
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5


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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 15:04       ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 15:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Fabio Estevam, linux-kernel, Mark Rutland, devicetree,
	grygorii.strashko, Russell King, Pawel Moll, Arnd Bergmann,
	Ian Campbell, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>> <santosh.shilimkar@ti.com> wrote:
>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>> its useful for future users.
>>>
>>> The "dma-ranges" property is intended to be used for describing the
>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>
>>> The "dma-coherent" property is intended to be used for identifying devices
>>> supported coherent DMA operations.
>>>
>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>> Cc: Grant Likely <grant.likely@linaro.org>
>>> Cc: Rob Herring <robh+dt@kernel.org>
>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>> Cc: Kumar Gala <galak@codeaurora.org>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> ---
>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>  1 file changed, 60 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>> index 1f013bd..f0120c1 100644
>>> --- a/Documentation/devicetree/booting-without-of.txt
>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>> @@ -51,6 +51,8 @@ Table of Contents
>>>
>>>    VIII - Specifying device power management information (sleep property)
>>>
>>> +  VIV - Specifying dma bus information
>>
>> "9" in Roman numeral is "IX"
>>
> Yeah.. Not sure what I was thinking...
> 
Updated patch end of the email with the typo fixed.

Rob,
Can you please pick this up if you are ok with the it.

Regards,
Santosh

>From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Fri, 20 Jun 2014 11:01:54 -0400
Subject: [PATCH] dt/documentation: add specification of dma bus information

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..0b0928c 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  IX - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+IX - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb@2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+
+			dma-coherent;
+			dma-ranges;
+
+			dwc3@2690000 {
+				compatible = "synopsys,dwc3";
+				[...]
+			};
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 15:04       ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 15:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>> <santosh.shilimkar@ti.com> wrote:
>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>> its useful for future users.
>>>
>>> The "dma-ranges" property is intended to be used for describing the
>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>
>>> The "dma-coherent" property is intended to be used for identifying devices
>>> supported coherent DMA operations.
>>>
>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>> Cc: Grant Likely <grant.likely@linaro.org>
>>> Cc: Rob Herring <robh+dt@kernel.org>
>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>> Cc: Kumar Gala <galak@codeaurora.org>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> ---
>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>  1 file changed, 60 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>> index 1f013bd..f0120c1 100644
>>> --- a/Documentation/devicetree/booting-without-of.txt
>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>> @@ -51,6 +51,8 @@ Table of Contents
>>>
>>>    VIII - Specifying device power management information (sleep property)
>>>
>>> +  VIV - Specifying dma bus information
>>
>> "9" in Roman numeral is "IX"
>>
> Yeah.. Not sure what I was thinking...
> 
Updated patch end of the email with the typo fixed.

Rob,
Can you please pick this up if you are ok with the it.

Regards,
Santosh

>From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Fri, 20 Jun 2014 11:01:54 -0400
Subject: [PATCH] dt/documentation: add specification of dma bus information

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..0b0928c 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  IX - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+IX - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb at 2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+
+			dma-coherent;
+			dma-ranges;
+
+			dwc3 at 2690000 {
+				compatible = "synopsys,dwc3";
+				[...]
+			};
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
  2014-06-20 15:04       ` Santosh Shilimkar
  (?)
@ 2014-06-20 15:50         ` Rob Herring
  -1 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-06-20 15:50 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Rob Herring, Fabio Estevam, linux-kernel, Mark Rutland,
	devicetree, Grygorii Strashko, Russell King, Pawel Moll,
	Arnd Bergmann, Ian Campbell, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Fri, Jun 20, 2014 at 10:04 AM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
>> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>>> <santosh.shilimkar@ti.com> wrote:
>>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>>> its useful for future users.
>>>>
>>>> The "dma-ranges" property is intended to be used for describing the
>>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>>
>>>> The "dma-coherent" property is intended to be used for identifying devices
>>>> supported coherent DMA operations.
>>>>
>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>> Cc: Grant Likely <grant.likely@linaro.org>
>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>>> Cc: Kumar Gala <galak@codeaurora.org>
>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>> ---
>>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>>  1 file changed, 60 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>>> index 1f013bd..f0120c1 100644
>>>> --- a/Documentation/devicetree/booting-without-of.txt
>>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>>> @@ -51,6 +51,8 @@ Table of Contents
>>>>
>>>>    VIII - Specifying device power management information (sleep property)
>>>>
>>>> +  VIV - Specifying dma bus information
>>>
>>> "9" in Roman numeral is "IX"
>>>
>> Yeah.. Not sure what I was thinking...
>>
> Updated patch end of the email with the typo fixed.
>
> Rob,
> Can you please pick this up if you are ok with the it.
>
> Regards,
> Santosh
>
> From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Fri, 20 Jun 2014 11:01:54 -0400
> Subject: [PATCH] dt/documentation: add specification of dma bus information
>
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Acked-by: Shawn Guo <shawn.guo@freescale.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..0b0928c 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>    VIII - Specifying device power management information (sleep property)
>
> +  IX - Specifying dma bus information
> +
>    Appendix A - Sample SOC node for MPC8540
>
>
> @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
>  (similar to an interrupt nexus, except that defining a standardized
>  sleep-map should wait until its necessity is demonstrated).
>
> +IX - Specifying dma bus information
> +
> +Some devices may have DMA memory range shifted relatively to the beginning of
> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
> +worked in LPAE mode with 4G memory has:
> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
> +and DMA range is aliased into first 2G of RAM in HW.
> +
> +In such cases, DMA addresses translation should be performed between CPU phys
> +and DMA addresses. The "dma-ranges" property is intended to be used
> +for describing the configuration of such system in DT.
> +
> +In addition, each DMA master device on the DMA bus may or may not support
> +coherent DMA operations. The "dma-coherent" property is intended to be used
> +for identifying devices supported coherent DMA operations in DT.
> +
> +* DMA Bus master
> +Optional property:
> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
> +       (child-bus-address, parent-bus-address, length). Each triplet specified
> +       describes a contiguous DMA address range.
> +       The dma-ranges property is used to describe the direct memory access (DMA)
> +       structure of a memory-mapped bus whose device tree parent can be accessed
> +       from DMA operations originating from the bus. It provides a means of
> +       defining a mapping or translation between the physical address space of
> +       the bus and the physical address space of the parent of the bus.
> +       (for more information see ePAPR specification)
> +
> +* DMA Bus child
> +Optional property:
> +- dma-ranges: <empty> value. if present - It means that DMA addresses
> +       translation has to be enabled for this device.
> +- dma-coherent: Present if dma operations are coherent
> +
> +Example:
> +soc {
> +               compatible = "ti,keystone","simple-bus";
> +               ranges = <0x0 0x0 0x0 0xc0000000>;
> +               dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
> +
> +               [...]
> +
> +               usb: usb@2680000 {
> +                       compatible = "ti,keystone-dwc3";
> +
> +                       [...]
> +
> +                       dma-coherent;
> +                       dma-ranges;
> +
> +                       dwc3@2690000 {
> +                               compatible = "synopsys,dwc3";
> +                               [...]
> +                       };

This example is a bit strange. I don't understand the relationship
between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
to see a simple example here.

dma-ranges is a property of the parent which you show, but
dma-coherent originally was a property of the bus master itself. While
we need to support that, are we changing that? We need to be clear on
where the property belongs even if the kernel is more lax.

Rob

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 15:50         ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-06-20 15:50 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Rob Herring, Fabio Estevam, linux-kernel, Mark Rutland,
	devicetree, Grygorii Strashko, Russell King, Pawel Moll,
	Arnd Bergmann, Ian Campbell, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Fri, Jun 20, 2014 at 10:04 AM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
>> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>>> <santosh.shilimkar@ti.com> wrote:
>>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>>> its useful for future users.
>>>>
>>>> The "dma-ranges" property is intended to be used for describing the
>>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>>
>>>> The "dma-coherent" property is intended to be used for identifying devices
>>>> supported coherent DMA operations.
>>>>
>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>> Cc: Grant Likely <grant.likely@linaro.org>
>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>>> Cc: Kumar Gala <galak@codeaurora.org>
>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>> ---
>>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>>  1 file changed, 60 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>>> index 1f013bd..f0120c1 100644
>>>> --- a/Documentation/devicetree/booting-without-of.txt
>>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>>> @@ -51,6 +51,8 @@ Table of Contents
>>>>
>>>>    VIII - Specifying device power management information (sleep property)
>>>>
>>>> +  VIV - Specifying dma bus information
>>>
>>> "9" in Roman numeral is "IX"
>>>
>> Yeah.. Not sure what I was thinking...
>>
> Updated patch end of the email with the typo fixed.
>
> Rob,
> Can you please pick this up if you are ok with the it.
>
> Regards,
> Santosh
>
> From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Fri, 20 Jun 2014 11:01:54 -0400
> Subject: [PATCH] dt/documentation: add specification of dma bus information
>
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Acked-by: Shawn Guo <shawn.guo@freescale.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..0b0928c 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>    VIII - Specifying device power management information (sleep property)
>
> +  IX - Specifying dma bus information
> +
>    Appendix A - Sample SOC node for MPC8540
>
>
> @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
>  (similar to an interrupt nexus, except that defining a standardized
>  sleep-map should wait until its necessity is demonstrated).
>
> +IX - Specifying dma bus information
> +
> +Some devices may have DMA memory range shifted relatively to the beginning of
> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
> +worked in LPAE mode with 4G memory has:
> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
> +and DMA range is aliased into first 2G of RAM in HW.
> +
> +In such cases, DMA addresses translation should be performed between CPU phys
> +and DMA addresses. The "dma-ranges" property is intended to be used
> +for describing the configuration of such system in DT.
> +
> +In addition, each DMA master device on the DMA bus may or may not support
> +coherent DMA operations. The "dma-coherent" property is intended to be used
> +for identifying devices supported coherent DMA operations in DT.
> +
> +* DMA Bus master
> +Optional property:
> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
> +       (child-bus-address, parent-bus-address, length). Each triplet specified
> +       describes a contiguous DMA address range.
> +       The dma-ranges property is used to describe the direct memory access (DMA)
> +       structure of a memory-mapped bus whose device tree parent can be accessed
> +       from DMA operations originating from the bus. It provides a means of
> +       defining a mapping or translation between the physical address space of
> +       the bus and the physical address space of the parent of the bus.
> +       (for more information see ePAPR specification)
> +
> +* DMA Bus child
> +Optional property:
> +- dma-ranges: <empty> value. if present - It means that DMA addresses
> +       translation has to be enabled for this device.
> +- dma-coherent: Present if dma operations are coherent
> +
> +Example:
> +soc {
> +               compatible = "ti,keystone","simple-bus";
> +               ranges = <0x0 0x0 0x0 0xc0000000>;
> +               dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
> +
> +               [...]
> +
> +               usb: usb@2680000 {
> +                       compatible = "ti,keystone-dwc3";
> +
> +                       [...]
> +
> +                       dma-coherent;
> +                       dma-ranges;
> +
> +                       dwc3@2690000 {
> +                               compatible = "synopsys,dwc3";
> +                               [...]
> +                       };

This example is a bit strange. I don't understand the relationship
between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
to see a simple example here.

dma-ranges is a property of the parent which you show, but
dma-coherent originally was a property of the bus master itself. While
we need to support that, are we changing that? We need to be clear on
where the property belongs even if the kernel is more lax.

Rob

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 15:50         ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-06-20 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 20, 2014 at 10:04 AM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
>> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>>> <santosh.shilimkar@ti.com> wrote:
>>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>>> its useful for future users.
>>>>
>>>> The "dma-ranges" property is intended to be used for describing the
>>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>>
>>>> The "dma-coherent" property is intended to be used for identifying devices
>>>> supported coherent DMA operations.
>>>>
>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>> Cc: Grant Likely <grant.likely@linaro.org>
>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>>> Cc: Kumar Gala <galak@codeaurora.org>
>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>> ---
>>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>>  1 file changed, 60 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>>> index 1f013bd..f0120c1 100644
>>>> --- a/Documentation/devicetree/booting-without-of.txt
>>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>>> @@ -51,6 +51,8 @@ Table of Contents
>>>>
>>>>    VIII - Specifying device power management information (sleep property)
>>>>
>>>> +  VIV - Specifying dma bus information
>>>
>>> "9" in Roman numeral is "IX"
>>>
>> Yeah.. Not sure what I was thinking...
>>
> Updated patch end of the email with the typo fixed.
>
> Rob,
> Can you please pick this up if you are ok with the it.
>
> Regards,
> Santosh
>
> From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Fri, 20 Jun 2014 11:01:54 -0400
> Subject: [PATCH] dt/documentation: add specification of dma bus information
>
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Acked-by: Shawn Guo <shawn.guo@freescale.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..0b0928c 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>    VIII - Specifying device power management information (sleep property)
>
> +  IX - Specifying dma bus information
> +
>    Appendix A - Sample SOC node for MPC8540
>
>
> @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
>  (similar to an interrupt nexus, except that defining a standardized
>  sleep-map should wait until its necessity is demonstrated).
>
> +IX - Specifying dma bus information
> +
> +Some devices may have DMA memory range shifted relatively to the beginning of
> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
> +worked in LPAE mode with 4G memory has:
> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
> +and DMA range is aliased into first 2G of RAM in HW.
> +
> +In such cases, DMA addresses translation should be performed between CPU phys
> +and DMA addresses. The "dma-ranges" property is intended to be used
> +for describing the configuration of such system in DT.
> +
> +In addition, each DMA master device on the DMA bus may or may not support
> +coherent DMA operations. The "dma-coherent" property is intended to be used
> +for identifying devices supported coherent DMA operations in DT.
> +
> +* DMA Bus master
> +Optional property:
> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
> +       (child-bus-address, parent-bus-address, length). Each triplet specified
> +       describes a contiguous DMA address range.
> +       The dma-ranges property is used to describe the direct memory access (DMA)
> +       structure of a memory-mapped bus whose device tree parent can be accessed
> +       from DMA operations originating from the bus. It provides a means of
> +       defining a mapping or translation between the physical address space of
> +       the bus and the physical address space of the parent of the bus.
> +       (for more information see ePAPR specification)
> +
> +* DMA Bus child
> +Optional property:
> +- dma-ranges: <empty> value. if present - It means that DMA addresses
> +       translation has to be enabled for this device.
> +- dma-coherent: Present if dma operations are coherent
> +
> +Example:
> +soc {
> +               compatible = "ti,keystone","simple-bus";
> +               ranges = <0x0 0x0 0x0 0xc0000000>;
> +               dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
> +
> +               [...]
> +
> +               usb: usb at 2680000 {
> +                       compatible = "ti,keystone-dwc3";
> +
> +                       [...]
> +
> +                       dma-coherent;
> +                       dma-ranges;
> +
> +                       dwc3 at 2690000 {
> +                               compatible = "synopsys,dwc3";
> +                               [...]
> +                       };

This example is a bit strange. I don't understand the relationship
between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
to see a simple example here.

dma-ranges is a property of the parent which you show, but
dma-coherent originally was a property of the bus master itself. While
we need to support that, are we changing that? We need to be clear on
where the property belongs even if the kernel is more lax.

Rob

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
  2014-06-20 15:50         ` Rob Herring
  (?)
@ 2014-06-20 17:17           ` Santosh Shilimkar
  -1 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 17:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rob Herring, Fabio Estevam, linux-kernel, Mark Rutland,
	devicetree, Grygorii Strashko, Russell King, Pawel Moll,
	Arnd Bergmann, Ian Campbell, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Friday 20 June 2014 11:50 AM, Rob Herring wrote:
> On Fri, Jun 20, 2014 at 10:04 AM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
>>> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>>>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>>>> <santosh.shilimkar@ti.com> wrote:
>>>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>>>> its useful for future users.
>>>>>
>>>>> The "dma-ranges" property is intended to be used for describing the
>>>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>>>
>>>>> The "dma-coherent" property is intended to be used for identifying devices
>>>>> supported coherent DMA operations.
>>>>>
>>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>>> Cc: Grant Likely <grant.likely@linaro.org>
>>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>>>> Cc: Kumar Gala <galak@codeaurora.org>
>>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>>> ---
>>>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>>>  1 file changed, 60 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>>>> index 1f013bd..f0120c1 100644
>>>>> --- a/Documentation/devicetree/booting-without-of.txt
>>>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>>>> @@ -51,6 +51,8 @@ Table of Contents
>>>>>
>>>>>    VIII - Specifying device power management information (sleep property)
>>>>>
>>>>> +  VIV - Specifying dma bus information
>>>>
>>>> "9" in Roman numeral is "IX"
>>>>
>>> Yeah.. Not sure what I was thinking...
>>>
>> Updated patch end of the email with the typo fixed.
>>
>> Rob,
>> Can you please pick this up if you are ok with the it.
>>
>> Regards,
>> Santosh
>>
>> From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
>> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Date: Fri, 20 Jun 2014 11:01:54 -0400
>> Subject: [PATCH] dt/documentation: add specification of dma bus information
>>
>> Recently we introduced the generic device tree infrastructure for couple of DMA
>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>> its useful for future users.
>>
>> The "dma-ranges" property is intended to be used for describing the
>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>
>> The "dma-coherent" property is intended to be used for identifying devices
>> supported coherent DMA operations.
>>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Grant Likely <grant.likely@linaro.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Pawel Moll <pawel.moll@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Acked-by: Shawn Guo <shawn.guo@freescale.com>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>
>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>> index 1f013bd..0b0928c 100644
>> --- a/Documentation/devicetree/booting-without-of.txt
>> +++ b/Documentation/devicetree/booting-without-of.txt
>> @@ -51,6 +51,8 @@ Table of Contents
>>
>>    VIII - Specifying device power management information (sleep property)
>>
>> +  IX - Specifying dma bus information
>> +
>>    Appendix A - Sample SOC node for MPC8540
>>
>>
>> @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
>>  (similar to an interrupt nexus, except that defining a standardized
>>  sleep-map should wait until its necessity is demonstrated).
>>
>> +IX - Specifying dma bus information
>> +
>> +Some devices may have DMA memory range shifted relatively to the beginning of
>> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
>> +worked in LPAE mode with 4G memory has:
>> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
>> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
>> +and DMA range is aliased into first 2G of RAM in HW.
>> +
>> +In such cases, DMA addresses translation should be performed between CPU phys
>> +and DMA addresses. The "dma-ranges" property is intended to be used
>> +for describing the configuration of such system in DT.
>> +
>> +In addition, each DMA master device on the DMA bus may or may not support
>> +coherent DMA operations. The "dma-coherent" property is intended to be used
>> +for identifying devices supported coherent DMA operations in DT.
>> +
>> +* DMA Bus master
>> +Optional property:
>> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
>> +       (child-bus-address, parent-bus-address, length). Each triplet specified
>> +       describes a contiguous DMA address range.
>> +       The dma-ranges property is used to describe the direct memory access (DMA)
>> +       structure of a memory-mapped bus whose device tree parent can be accessed
>> +       from DMA operations originating from the bus. It provides a means of
>> +       defining a mapping or translation between the physical address space of
>> +       the bus and the physical address space of the parent of the bus.
>> +       (for more information see ePAPR specification)
>> +
>> +* DMA Bus child
>> +Optional property:
>> +- dma-ranges: <empty> value. if present - It means that DMA addresses
>> +       translation has to be enabled for this device.
>> +- dma-coherent: Present if dma operations are coherent
>> +
>> +Example:
>> +soc {
>> +               compatible = "ti,keystone","simple-bus";
>> +               ranges = <0x0 0x0 0x0 0xc0000000>;
>> +               dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
>> +
>> +               [...]
>> +
>> +               usb: usb@2680000 {
>> +                       compatible = "ti,keystone-dwc3";
>> +
>> +                       [...]
>> +
>> +                       dma-coherent;
>> +                       dma-ranges;
>> +
>> +                       dwc3@2690000 {
>> +                               compatible = "synopsys,dwc3";
>> +                               [...]
>> +                       };
> 
> This example is a bit strange. I don't understand the relationship
> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
> to see a simple example here.
> 
OK. Will do.

> dma-ranges is a property of the parent which you show, but
> dma-coherent originally was a property of the bus master itself. While
> we need to support that, are we changing that? We need to be clear on
> where the property belongs even if the kernel is more lax.
> 
I don't think we are changing it fundamentally but may be I missing
your point. The dma-coherent as is now a per-device property.
USB is one of the bus master supports coherency and hence showed
up in above example.

Regards,
Santosh




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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 17:17           ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 17:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Rob Herring, Fabio Estevam, linux-kernel, Mark Rutland,
	devicetree, Grygorii Strashko, Russell King, Pawel Moll,
	Arnd Bergmann, Ian Campbell, Shawn Guo, Kumar Gala, Grant Likely,
	linux-arm-kernel

On Friday 20 June 2014 11:50 AM, Rob Herring wrote:
> On Fri, Jun 20, 2014 at 10:04 AM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
>>> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>>>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>>>> <santosh.shilimkar@ti.com> wrote:
>>>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>>>> its useful for future users.
>>>>>
>>>>> The "dma-ranges" property is intended to be used for describing the
>>>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>>>
>>>>> The "dma-coherent" property is intended to be used for identifying devices
>>>>> supported coherent DMA operations.
>>>>>
>>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>>> Cc: Grant Likely <grant.likely@linaro.org>
>>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>>>> Cc: Kumar Gala <galak@codeaurora.org>
>>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>>> ---
>>>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>>>  1 file changed, 60 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>>>> index 1f013bd..f0120c1 100644
>>>>> --- a/Documentation/devicetree/booting-without-of.txt
>>>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>>>> @@ -51,6 +51,8 @@ Table of Contents
>>>>>
>>>>>    VIII - Specifying device power management information (sleep property)
>>>>>
>>>>> +  VIV - Specifying dma bus information
>>>>
>>>> "9" in Roman numeral is "IX"
>>>>
>>> Yeah.. Not sure what I was thinking...
>>>
>> Updated patch end of the email with the typo fixed.
>>
>> Rob,
>> Can you please pick this up if you are ok with the it.
>>
>> Regards,
>> Santosh
>>
>> From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
>> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Date: Fri, 20 Jun 2014 11:01:54 -0400
>> Subject: [PATCH] dt/documentation: add specification of dma bus information
>>
>> Recently we introduced the generic device tree infrastructure for couple of DMA
>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>> its useful for future users.
>>
>> The "dma-ranges" property is intended to be used for describing the
>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>
>> The "dma-coherent" property is intended to be used for identifying devices
>> supported coherent DMA operations.
>>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Grant Likely <grant.likely@linaro.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Pawel Moll <pawel.moll@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Acked-by: Shawn Guo <shawn.guo@freescale.com>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>
>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>> index 1f013bd..0b0928c 100644
>> --- a/Documentation/devicetree/booting-without-of.txt
>> +++ b/Documentation/devicetree/booting-without-of.txt
>> @@ -51,6 +51,8 @@ Table of Contents
>>
>>    VIII - Specifying device power management information (sleep property)
>>
>> +  IX - Specifying dma bus information
>> +
>>    Appendix A - Sample SOC node for MPC8540
>>
>>
>> @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
>>  (similar to an interrupt nexus, except that defining a standardized
>>  sleep-map should wait until its necessity is demonstrated).
>>
>> +IX - Specifying dma bus information
>> +
>> +Some devices may have DMA memory range shifted relatively to the beginning of
>> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
>> +worked in LPAE mode with 4G memory has:
>> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
>> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
>> +and DMA range is aliased into first 2G of RAM in HW.
>> +
>> +In such cases, DMA addresses translation should be performed between CPU phys
>> +and DMA addresses. The "dma-ranges" property is intended to be used
>> +for describing the configuration of such system in DT.
>> +
>> +In addition, each DMA master device on the DMA bus may or may not support
>> +coherent DMA operations. The "dma-coherent" property is intended to be used
>> +for identifying devices supported coherent DMA operations in DT.
>> +
>> +* DMA Bus master
>> +Optional property:
>> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
>> +       (child-bus-address, parent-bus-address, length). Each triplet specified
>> +       describes a contiguous DMA address range.
>> +       The dma-ranges property is used to describe the direct memory access (DMA)
>> +       structure of a memory-mapped bus whose device tree parent can be accessed
>> +       from DMA operations originating from the bus. It provides a means of
>> +       defining a mapping or translation between the physical address space of
>> +       the bus and the physical address space of the parent of the bus.
>> +       (for more information see ePAPR specification)
>> +
>> +* DMA Bus child
>> +Optional property:
>> +- dma-ranges: <empty> value. if present - It means that DMA addresses
>> +       translation has to be enabled for this device.
>> +- dma-coherent: Present if dma operations are coherent
>> +
>> +Example:
>> +soc {
>> +               compatible = "ti,keystone","simple-bus";
>> +               ranges = <0x0 0x0 0x0 0xc0000000>;
>> +               dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
>> +
>> +               [...]
>> +
>> +               usb: usb@2680000 {
>> +                       compatible = "ti,keystone-dwc3";
>> +
>> +                       [...]
>> +
>> +                       dma-coherent;
>> +                       dma-ranges;
>> +
>> +                       dwc3@2690000 {
>> +                               compatible = "synopsys,dwc3";
>> +                               [...]
>> +                       };
> 
> This example is a bit strange. I don't understand the relationship
> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
> to see a simple example here.
> 
OK. Will do.

> dma-ranges is a property of the parent which you show, but
> dma-coherent originally was a property of the bus master itself. While
> we need to support that, are we changing that? We need to be clear on
> where the property belongs even if the kernel is more lax.
> 
I don't think we are changing it fundamentally but may be I missing
your point. The dma-coherent as is now a per-device property.
USB is one of the bus master supports coherency and hence showed
up in above example.

Regards,
Santosh

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 17:17           ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 17:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 20 June 2014 11:50 AM, Rob Herring wrote:
> On Fri, Jun 20, 2014 at 10:04 AM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> On Monday 09 June 2014 09:59 AM, Santosh Shilimkar wrote:
>>> On Sunday 08 June 2014 10:13 PM, Fabio Estevam wrote:
>>>> On Thu, Jun 5, 2014 at 12:22 PM, Santosh Shilimkar
>>>> <santosh.shilimkar@ti.com> wrote:
>>>>> Recently we introduced the generic device tree infrastructure for couple of DMA
>>>>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>>>>> its useful for future users.
>>>>>
>>>>> The "dma-ranges" property is intended to be used for describing the
>>>>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>>>>
>>>>> The "dma-coherent" property is intended to be used for identifying devices
>>>>> supported coherent DMA operations.
>>>>>
>>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>>> Cc: Grant Likely <grant.likely@linaro.org>
>>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>>> Cc: Pawel Moll <pawel.moll@arm.com>
>>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>>>>> Cc: Shawn Guo <shawn.guo@freescale.com>
>>>>> Cc: Kumar Gala <galak@codeaurora.org>
>>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>>> ---
>>>>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>>>>  1 file changed, 60 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>>>>> index 1f013bd..f0120c1 100644
>>>>> --- a/Documentation/devicetree/booting-without-of.txt
>>>>> +++ b/Documentation/devicetree/booting-without-of.txt
>>>>> @@ -51,6 +51,8 @@ Table of Contents
>>>>>
>>>>>    VIII - Specifying device power management information (sleep property)
>>>>>
>>>>> +  VIV - Specifying dma bus information
>>>>
>>>> "9" in Roman numeral is "IX"
>>>>
>>> Yeah.. Not sure what I was thinking...
>>>
>> Updated patch end of the email with the typo fixed.
>>
>> Rob,
>> Can you please pick this up if you are ok with the it.
>>
>> Regards,
>> Santosh
>>
>> From b72e949a194d766fe029fe6bb5939467f2fbe9b9 Mon Sep 17 00:00:00 2001
>> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Date: Fri, 20 Jun 2014 11:01:54 -0400
>> Subject: [PATCH] dt/documentation: add specification of dma bus information
>>
>> Recently we introduced the generic device tree infrastructure for couple of DMA
>> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
>> its useful for future users.
>>
>> The "dma-ranges" property is intended to be used for describing the
>> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>>
>> The "dma-coherent" property is intended to be used for identifying devices
>> supported coherent DMA operations.
>>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Grant Likely <grant.likely@linaro.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Pawel Moll <pawel.moll@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
>> Cc: Kumar Gala <galak@codeaurora.org>
>> Acked-by: Shawn Guo <shawn.guo@freescale.com>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>>  Documentation/devicetree/booting-without-of.txt |   60 +++++++++++++++++++++++
>>  1 file changed, 60 insertions(+)
>>
>> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
>> index 1f013bd..0b0928c 100644
>> --- a/Documentation/devicetree/booting-without-of.txt
>> +++ b/Documentation/devicetree/booting-without-of.txt
>> @@ -51,6 +51,8 @@ Table of Contents
>>
>>    VIII - Specifying device power management information (sleep property)
>>
>> +  IX - Specifying dma bus information
>> +
>>    Appendix A - Sample SOC node for MPC8540
>>
>>
>> @@ -1332,6 +1334,64 @@ reasonably grouped in this manner, then create a virtual sleep controller
>>  (similar to an interrupt nexus, except that defining a standardized
>>  sleep-map should wait until its necessity is demonstrated).
>>
>> +IX - Specifying dma bus information
>> +
>> +Some devices may have DMA memory range shifted relatively to the beginning of
>> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
>> +worked in LPAE mode with 4G memory has:
>> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
>> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
>> +and DMA range is aliased into first 2G of RAM in HW.
>> +
>> +In such cases, DMA addresses translation should be performed between CPU phys
>> +and DMA addresses. The "dma-ranges" property is intended to be used
>> +for describing the configuration of such system in DT.
>> +
>> +In addition, each DMA master device on the DMA bus may or may not support
>> +coherent DMA operations. The "dma-coherent" property is intended to be used
>> +for identifying devices supported coherent DMA operations in DT.
>> +
>> +* DMA Bus master
>> +Optional property:
>> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
>> +       (child-bus-address, parent-bus-address, length). Each triplet specified
>> +       describes a contiguous DMA address range.
>> +       The dma-ranges property is used to describe the direct memory access (DMA)
>> +       structure of a memory-mapped bus whose device tree parent can be accessed
>> +       from DMA operations originating from the bus. It provides a means of
>> +       defining a mapping or translation between the physical address space of
>> +       the bus and the physical address space of the parent of the bus.
>> +       (for more information see ePAPR specification)
>> +
>> +* DMA Bus child
>> +Optional property:
>> +- dma-ranges: <empty> value. if present - It means that DMA addresses
>> +       translation has to be enabled for this device.
>> +- dma-coherent: Present if dma operations are coherent
>> +
>> +Example:
>> +soc {
>> +               compatible = "ti,keystone","simple-bus";
>> +               ranges = <0x0 0x0 0x0 0xc0000000>;
>> +               dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
>> +
>> +               [...]
>> +
>> +               usb: usb at 2680000 {
>> +                       compatible = "ti,keystone-dwc3";
>> +
>> +                       [...]
>> +
>> +                       dma-coherent;
>> +                       dma-ranges;
>> +
>> +                       dwc3 at 2690000 {
>> +                               compatible = "synopsys,dwc3";
>> +                               [...]
>> +                       };
> 
> This example is a bit strange. I don't understand the relationship
> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
> to see a simple example here.
> 
OK. Will do.

> dma-ranges is a property of the parent which you show, but
> dma-coherent originally was a property of the bus master itself. While
> we need to support that, are we changing that? We need to be clear on
> where the property belongs even if the kernel is more lax.
> 
I don't think we are changing it fundamentally but may be I missing
your point. The dma-coherent as is now a per-device property.
USB is one of the bus master supports coherency and hence showed
up in above example.

Regards,
Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
  2014-06-20 17:17           ` Santosh Shilimkar
@ 2014-06-20 18:56             ` Arnd Bergmann
  -1 siblings, 0 replies; 38+ messages in thread
From: Arnd Bergmann @ 2014-06-20 18:56 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Santosh Shilimkar, Rob Herring, Mark Rutland, devicetree,
	Grygorii Strashko, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, Rob Herring, Kumar Gala, Grant Likely,
	Fabio Estevam, Shawn Guo

On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
> >> +                       dma-coherent;
> >> +                       dma-ranges;
> >> +
> >> +                       dwc3@2690000 {
> >> +                               compatible = "synopsys,dwc3";
> >> +                               [...]
> >> +                       };
> > 
> > This example is a bit strange. I don't understand the relationship
> > between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
> > to see a simple example here.


> > dma-ranges is a property of the parent which you show, but
> > dma-coherent originally was a property of the bus master itself. While
> > we need to support that, are we changing that? We need to be clear on
> > where the property belongs even if the kernel is more lax.
> > 
> I don't think we are changing it fundamentally but may be I missing
> your point. The dma-coherent as is now a per-device property.
> USB is one of the bus master supports coherency and hence showed
> up in above example.

I think it's enough if you just drop the "synopsys,dwc3" node and the
intermediate dma-ranges property from the example, leaving the
dma-coherent property in the "ti,keystone-dwc3" node.

	Arnd

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 18:56             ` Arnd Bergmann
  0 siblings, 0 replies; 38+ messages in thread
From: Arnd Bergmann @ 2014-06-20 18:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
> >> +                       dma-coherent;
> >> +                       dma-ranges;
> >> +
> >> +                       dwc3 at 2690000 {
> >> +                               compatible = "synopsys,dwc3";
> >> +                               [...]
> >> +                       };
> > 
> > This example is a bit strange. I don't understand the relationship
> > between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
> > to see a simple example here.


> > dma-ranges is a property of the parent which you show, but
> > dma-coherent originally was a property of the bus master itself. While
> > we need to support that, are we changing that? We need to be clear on
> > where the property belongs even if the kernel is more lax.
> > 
> I don't think we are changing it fundamentally but may be I missing
> your point. The dma-coherent as is now a per-device property.
> USB is one of the bus master supports coherency and hence showed
> up in above example.

I think it's enough if you just drop the "synopsys,dwc3" node and the
intermediate dma-ranges property from the example, leaving the
dma-coherent property in the "ti,keystone-dwc3" node.

	Arnd

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
  2014-06-20 18:56             ` Arnd Bergmann
  (?)
@ 2014-06-20 19:02               ` Santosh Shilimkar
  -1 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 19:02 UTC (permalink / raw)
  To: Arnd Bergmann, Rob Herring
  Cc: linux-arm-kernel, Mark Rutland, devicetree, Grygorii Strashko,
	Russell King, Pawel Moll, Ian Campbell, linux-kernel,
	Rob Herring, Kumar Gala, Grant Likely, Fabio Estevam, Shawn Guo

On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>> +                       dma-coherent;
>>>> +                       dma-ranges;
>>>> +
>>>> +                       dwc3@2690000 {
>>>> +                               compatible = "synopsys,dwc3";
>>>> +                               [...]
>>>> +                       };
>>>
>>> This example is a bit strange. I don't understand the relationship
>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>> to see a simple example here.
> 
> 
>>> dma-ranges is a property of the parent which you show, but
>>> dma-coherent originally was a property of the bus master itself. While
>>> we need to support that, are we changing that? We need to be clear on
>>> where the property belongs even if the kernel is more lax.
>>>
>> I don't think we are changing it fundamentally but may be I missing
>> your point. The dma-coherent as is now a per-device property.
>> USB is one of the bus master supports coherency and hence showed
>> up in above example.
> 
> I think it's enough if you just drop the "synopsys,dwc3" node and the
> intermediate dma-ranges property from the example, leaving the
> dma-coherent property in the "ti,keystone-dwc3" node.
> 
Thanks Arnd. That should avoid the confusion. Just to see if Rob is
fine by it, the example will look like below.

Example:
soc {
		compatible = "ti,keystone","simple-bus";
		ranges = <0x0 0x0 0x0 0xc0000000>;
		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;

		[...]

		usb: usb@2680000 {
			compatible = "ti,keystone-dwc3";

			[...]
			dma-coherent;
		};
};

Regards,
Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 19:02               ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 19:02 UTC (permalink / raw)
  To: Arnd Bergmann, Rob Herring
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Grygorii Strashko,
	Russell King, Pawel Moll, Ian Campbell, linux-kernel,
	Rob Herring, Kumar Gala, Grant Likely, Fabio Estevam, Shawn Guo

On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>> +                       dma-coherent;
>>>> +                       dma-ranges;
>>>> +
>>>> +                       dwc3@2690000 {
>>>> +                               compatible = "synopsys,dwc3";
>>>> +                               [...]
>>>> +                       };
>>>
>>> This example is a bit strange. I don't understand the relationship
>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>> to see a simple example here.
> 
> 
>>> dma-ranges is a property of the parent which you show, but
>>> dma-coherent originally was a property of the bus master itself. While
>>> we need to support that, are we changing that? We need to be clear on
>>> where the property belongs even if the kernel is more lax.
>>>
>> I don't think we are changing it fundamentally but may be I missing
>> your point. The dma-coherent as is now a per-device property.
>> USB is one of the bus master supports coherency and hence showed
>> up in above example.
> 
> I think it's enough if you just drop the "synopsys,dwc3" node and the
> intermediate dma-ranges property from the example, leaving the
> dma-coherent property in the "ti,keystone-dwc3" node.
> 
Thanks Arnd. That should avoid the confusion. Just to see if Rob is
fine by it, the example will look like below.

Example:
soc {
		compatible = "ti,keystone","simple-bus";
		ranges = <0x0 0x0 0x0 0xc0000000>;
		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;

		[...]

		usb: usb@2680000 {
			compatible = "ti,keystone-dwc3";

			[...]
			dma-coherent;
		};
};

Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 19:02               ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-20 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>> +                       dma-coherent;
>>>> +                       dma-ranges;
>>>> +
>>>> +                       dwc3 at 2690000 {
>>>> +                               compatible = "synopsys,dwc3";
>>>> +                               [...]
>>>> +                       };
>>>
>>> This example is a bit strange. I don't understand the relationship
>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>> to see a simple example here.
> 
> 
>>> dma-ranges is a property of the parent which you show, but
>>> dma-coherent originally was a property of the bus master itself. While
>>> we need to support that, are we changing that? We need to be clear on
>>> where the property belongs even if the kernel is more lax.
>>>
>> I don't think we are changing it fundamentally but may be I missing
>> your point. The dma-coherent as is now a per-device property.
>> USB is one of the bus master supports coherency and hence showed
>> up in above example.
> 
> I think it's enough if you just drop the "synopsys,dwc3" node and the
> intermediate dma-ranges property from the example, leaving the
> dma-coherent property in the "ti,keystone-dwc3" node.
> 
Thanks Arnd. That should avoid the confusion. Just to see if Rob is
fine by it, the example will look like below.

Example:
soc {
		compatible = "ti,keystone","simple-bus";
		ranges = <0x0 0x0 0x0 0xc0000000>;
		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;

		[...]

		usb: usb at 2680000 {
			compatible = "ti,keystone-dwc3";

			[...]
			dma-coherent;
		};
};

Regards,
Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 19:46                 ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-06-20 19:46 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Arnd Bergmann, linux-arm-kernel, Mark Rutland, devicetree,
	Grygorii Strashko, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, Rob Herring, Kumar Gala, Grant Likely,
	Fabio Estevam, Shawn Guo

On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>> +                       dma-coherent;
>>>>> +                       dma-ranges;
>>>>> +
>>>>> +                       dwc3@2690000 {
>>>>> +                               compatible = "synopsys,dwc3";
>>>>> +                               [...]
>>>>> +                       };
>>>>
>>>> This example is a bit strange. I don't understand the relationship
>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>> to see a simple example here.
>>
>>
>>>> dma-ranges is a property of the parent which you show, but
>>>> dma-coherent originally was a property of the bus master itself. While
>>>> we need to support that, are we changing that? We need to be clear on
>>>> where the property belongs even if the kernel is more lax.
>>>>
>>> I don't think we are changing it fundamentally but may be I missing
>>> your point. The dma-coherent as is now a per-device property.
>>> USB is one of the bus master supports coherency and hence showed
>>> up in above example.
>>
>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>> intermediate dma-ranges property from the example, leaving the
>> dma-coherent property in the "ti,keystone-dwc3" node.
>>
> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
> fine by it, the example will look like below.

Yes. Looks fine.

Rob

>
> Example:
> soc {
>                 compatible = "ti,keystone","simple-bus";
>                 ranges = <0x0 0x0 0x0 0xc0000000>;
>                 dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
>
>                 [...]
>
>                 usb: usb@2680000 {
>                         compatible = "ti,keystone-dwc3";
>
>                         [...]
>                         dma-coherent;
>                 };
> };
>
> Regards,
> Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 19:46                 ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-06-20 19:46 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Arnd Bergmann, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Grygorii Strashko, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, Rob Herring, Kumar Gala, Grant Likely,
	Fabio Estevam, Shawn Guo

On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
<santosh.shilimkar-l0cyMroinI0@public.gmane.org> wrote:
> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>> +                       dma-coherent;
>>>>> +                       dma-ranges;
>>>>> +
>>>>> +                       dwc3@2690000 {
>>>>> +                               compatible = "synopsys,dwc3";
>>>>> +                               [...]
>>>>> +                       };
>>>>
>>>> This example is a bit strange. I don't understand the relationship
>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>> to see a simple example here.
>>
>>
>>>> dma-ranges is a property of the parent which you show, but
>>>> dma-coherent originally was a property of the bus master itself. While
>>>> we need to support that, are we changing that? We need to be clear on
>>>> where the property belongs even if the kernel is more lax.
>>>>
>>> I don't think we are changing it fundamentally but may be I missing
>>> your point. The dma-coherent as is now a per-device property.
>>> USB is one of the bus master supports coherency and hence showed
>>> up in above example.
>>
>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>> intermediate dma-ranges property from the example, leaving the
>> dma-coherent property in the "ti,keystone-dwc3" node.
>>
> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
> fine by it, the example will look like below.

Yes. Looks fine.

Rob

>
> Example:
> soc {
>                 compatible = "ti,keystone","simple-bus";
>                 ranges = <0x0 0x0 0x0 0xc0000000>;
>                 dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
>
>                 [...]
>
>                 usb: usb@2680000 {
>                         compatible = "ti,keystone-dwc3";
>
>                         [...]
>                         dma-coherent;
>                 };
> };
>
> Regards,
> Santosh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-20 19:46                 ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-06-20 19:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>> +                       dma-coherent;
>>>>> +                       dma-ranges;
>>>>> +
>>>>> +                       dwc3 at 2690000 {
>>>>> +                               compatible = "synopsys,dwc3";
>>>>> +                               [...]
>>>>> +                       };
>>>>
>>>> This example is a bit strange. I don't understand the relationship
>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>> to see a simple example here.
>>
>>
>>>> dma-ranges is a property of the parent which you show, but
>>>> dma-coherent originally was a property of the bus master itself. While
>>>> we need to support that, are we changing that? We need to be clear on
>>>> where the property belongs even if the kernel is more lax.
>>>>
>>> I don't think we are changing it fundamentally but may be I missing
>>> your point. The dma-coherent as is now a per-device property.
>>> USB is one of the bus master supports coherency and hence showed
>>> up in above example.
>>
>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>> intermediate dma-ranges property from the example, leaving the
>> dma-coherent property in the "ti,keystone-dwc3" node.
>>
> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
> fine by it, the example will look like below.

Yes. Looks fine.

Rob

>
> Example:
> soc {
>                 compatible = "ti,keystone","simple-bus";
>                 ranges = <0x0 0x0 0x0 0xc0000000>;
>                 dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
>
>                 [...]
>
>                 usb: usb at 2680000 {
>                         compatible = "ti,keystone-dwc3";
>
>                         [...]
>                         dma-coherent;
>                 };
> };
>
> Regards,
> Santosh

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
  2014-06-20 19:46                 ` Rob Herring
  (?)
@ 2014-06-22 19:40                   ` Santosh Shilimkar
  -1 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-22 19:40 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, linux-arm-kernel, Mark Rutland, devicetree,
	Grygorii Strashko, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, Rob Herring, Kumar Gala, Grant Likely,
	Fabio Estevam, Shawn Guo

On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>> +                       dma-coherent;
>>>>>> +                       dma-ranges;
>>>>>> +
>>>>>> +                       dwc3@2690000 {
>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>> +                               [...]
>>>>>> +                       };
>>>>>
>>>>> This example is a bit strange. I don't understand the relationship
>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>> to see a simple example here.
>>>
>>>
>>>>> dma-ranges is a property of the parent which you show, but
>>>>> dma-coherent originally was a property of the bus master itself. While
>>>>> we need to support that, are we changing that? We need to be clear on
>>>>> where the property belongs even if the kernel is more lax.
>>>>>
>>>> I don't think we are changing it fundamentally but may be I missing
>>>> your point. The dma-coherent as is now a per-device property.
>>>> USB is one of the bus master supports coherency and hence showed
>>>> up in above example.
>>>
>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>> intermediate dma-ranges property from the example, leaving the
>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>
>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>> fine by it, the example will look like below.
> 
> Yes. Looks fine.
> 
Great. Updated version 2 below.

>From 7df26004fe11b7d3ef9592161205c69e1fb663be Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Fri, 20 Jun 2014 11:01:54 -0400
Subject: [PATCH v2] dt/documentation: add specification of dma bus information

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   53 +++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..7768518 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  IX - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,57 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+IX - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb@2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+			dma-coherent;
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5


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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-22 19:40                   ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-22 19:40 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, linux-arm-kernel, Mark Rutland, devicetree,
	Grygorii Strashko, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, Rob Herring, Kumar Gala, Grant Likely,
	Fabio Estevam, Shawn Guo

On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>> +                       dma-coherent;
>>>>>> +                       dma-ranges;
>>>>>> +
>>>>>> +                       dwc3@2690000 {
>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>> +                               [...]
>>>>>> +                       };
>>>>>
>>>>> This example is a bit strange. I don't understand the relationship
>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>> to see a simple example here.
>>>
>>>
>>>>> dma-ranges is a property of the parent which you show, but
>>>>> dma-coherent originally was a property of the bus master itself. While
>>>>> we need to support that, are we changing that? We need to be clear on
>>>>> where the property belongs even if the kernel is more lax.
>>>>>
>>>> I don't think we are changing it fundamentally but may be I missing
>>>> your point. The dma-coherent as is now a per-device property.
>>>> USB is one of the bus master supports coherency and hence showed
>>>> up in above example.
>>>
>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>> intermediate dma-ranges property from the example, leaving the
>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>
>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>> fine by it, the example will look like below.
> 
> Yes. Looks fine.
> 
Great. Updated version 2 below.

>From 7df26004fe11b7d3ef9592161205c69e1fb663be Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Fri, 20 Jun 2014 11:01:54 -0400
Subject: [PATCH v2] dt/documentation: add specification of dma bus information

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   53 +++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..7768518 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  IX - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,57 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+IX - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb@2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+			dma-coherent;
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-06-22 19:40                   ` Santosh Shilimkar
  0 siblings, 0 replies; 38+ messages in thread
From: Santosh Shilimkar @ 2014-06-22 19:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>> +                       dma-coherent;
>>>>>> +                       dma-ranges;
>>>>>> +
>>>>>> +                       dwc3 at 2690000 {
>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>> +                               [...]
>>>>>> +                       };
>>>>>
>>>>> This example is a bit strange. I don't understand the relationship
>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>> to see a simple example here.
>>>
>>>
>>>>> dma-ranges is a property of the parent which you show, but
>>>>> dma-coherent originally was a property of the bus master itself. While
>>>>> we need to support that, are we changing that? We need to be clear on
>>>>> where the property belongs even if the kernel is more lax.
>>>>>
>>>> I don't think we are changing it fundamentally but may be I missing
>>>> your point. The dma-coherent as is now a per-device property.
>>>> USB is one of the bus master supports coherency and hence showed
>>>> up in above example.
>>>
>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>> intermediate dma-ranges property from the example, leaving the
>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>
>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>> fine by it, the example will look like below.
> 
> Yes. Looks fine.
> 
Great. Updated version 2 below.

>From 7df26004fe11b7d3ef9592161205c69e1fb663be Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Fri, 20 Jun 2014 11:01:54 -0400
Subject: [PATCH v2] dt/documentation: add specification of dma bus information

Recently we introduced the generic device tree infrastructure for couple of DMA
bus parameter, dma-ranges and dma-coherent. Update the documentation so that
its useful for future users.

The "dma-ranges" property is intended to be used for describing the
configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.

The "dma-coherent" property is intended to be used for identifying devices
supported coherent DMA operations.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 Documentation/devicetree/booting-without-of.txt |   53 +++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index 1f013bd..7768518 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -51,6 +51,8 @@ Table of Contents
 
   VIII - Specifying device power management information (sleep property)
 
+  IX - Specifying dma bus information
+
   Appendix A - Sample SOC node for MPC8540
 
 
@@ -1332,6 +1334,57 @@ reasonably grouped in this manner, then create a virtual sleep controller
 (similar to an interrupt nexus, except that defining a standardized
 sleep-map should wait until its necessity is demonstrated).
 
+IX - Specifying dma bus information
+
+Some devices may have DMA memory range shifted relatively to the beginning of
+RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
+worked in LPAE mode with 4G memory has:
+- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
+- DMA range: [  0x8000 0000,   0xFFFF FFFF]
+and DMA range is aliased into first 2G of RAM in HW.
+
+In such cases, DMA addresses translation should be performed between CPU phys
+and DMA addresses. The "dma-ranges" property is intended to be used
+for describing the configuration of such system in DT.
+
+In addition, each DMA master device on the DMA bus may or may not support
+coherent DMA operations. The "dma-coherent" property is intended to be used
+for identifying devices supported coherent DMA operations in DT.
+
+* DMA Bus master
+Optional property:
+- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
+	(child-bus-address, parent-bus-address, length). Each triplet specified
+	describes a contiguous DMA address range.
+	The dma-ranges property is used to describe the direct memory access (DMA)
+	structure of a memory-mapped bus whose device tree parent can be accessed
+	from DMA operations originating from the bus. It provides a means of
+	defining a mapping or translation between the physical address space of
+	the bus and the physical address space of the parent of the bus.
+	(for more information see ePAPR specification)
+
+* DMA Bus child
+Optional property:
+- dma-ranges: <empty> value. if present - It means that DMA addresses
+	translation has to be enabled for this device.
+- dma-coherent: Present if dma operations are coherent
+
+Example:
+soc {
+		compatible = "ti,keystone","simple-bus";
+		ranges = <0x0 0x0 0x0 0xc0000000>;
+		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
+
+		[...]
+
+		usb: usb at 2680000 {
+			compatible = "ti,keystone-dwc3";
+
+			[...]
+			dma-coherent;
+		};
+};
+
 Appendix A - Sample SOC node for MPC8540
 ========================================
 
-- 
1.7.9.5

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-09-19 18:29                     ` Grygorii Strashko
  0 siblings, 0 replies; 38+ messages in thread
From: Grygorii Strashko @ 2014-09-19 18:29 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Herring
  Cc: Arnd Bergmann, linux-arm-kernel, Mark Rutland, devicetree,
	Russell King, Pawel Moll, Ian Campbell, linux-kernel,
	Rob Herring, Kumar Gala, Grant Likely, Fabio Estevam, Shawn Guo

Hi Rob,

On 06/22/2014 10:40 PM, Santosh Shilimkar wrote:
> On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
>> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
>> <santosh.shilimkar@ti.com> wrote:
>>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>>> +                       dma-coherent;
>>>>>>> +                       dma-ranges;
>>>>>>> +
>>>>>>> +                       dwc3@2690000 {
>>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>>> +                               [...]
>>>>>>> +                       };
>>>>>>
>>>>>> This example is a bit strange. I don't understand the relationship
>>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>>> to see a simple example here.
>>>>
>>>>
>>>>>> dma-ranges is a property of the parent which you show, but
>>>>>> dma-coherent originally was a property of the bus master itself. While
>>>>>> we need to support that, are we changing that? We need to be clear on
>>>>>> where the property belongs even if the kernel is more lax.
>>>>>>
>>>>> I don't think we are changing it fundamentally but may be I missing
>>>>> your point. The dma-coherent as is now a per-device property.
>>>>> USB is one of the bus master supports coherency and hence showed
>>>>> up in above example.
>>>>
>>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>>> intermediate dma-ranges property from the example, leaving the
>>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>>
>>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>>> fine by it, the example will look like below.
>>
>> Yes. Looks fine.
>>
> Great. Updated version 2 below.

Seems, this patch has not been merged accidentally :(
Is it possible for you to take it, or would you like me to re-send it?

>
>  From 7df26004fe11b7d3ef9592161205c69e1fb663be Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Fri, 20 Jun 2014 11:01:54 -0400
> Subject: [PATCH v2] dt/documentation: add specification of dma bus information
>
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Acked-by: Shawn Guo <shawn.guo@freescale.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>   Documentation/devicetree/booting-without-of.txt |   53 +++++++++++++++++++++++
>   1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..7768518 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>     VIII - Specifying device power management information (sleep property)
>
> +  IX - Specifying dma bus information
> +
>     Appendix A - Sample SOC node for MPC8540
>
>
> @@ -1332,6 +1334,57 @@ reasonably grouped in this manner, then create a virtual sleep controller
>   (similar to an interrupt nexus, except that defining a standardized
>   sleep-map should wait until its necessity is demonstrated).
>
> +IX - Specifying dma bus information
> +
> +Some devices may have DMA memory range shifted relatively to the beginning of
> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
> +worked in LPAE mode with 4G memory has:
> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
> +and DMA range is aliased into first 2G of RAM in HW.
> +
> +In such cases, DMA addresses translation should be performed between CPU phys
> +and DMA addresses. The "dma-ranges" property is intended to be used
> +for describing the configuration of such system in DT.
> +
> +In addition, each DMA master device on the DMA bus may or may not support
> +coherent DMA operations. The "dma-coherent" property is intended to be used
> +for identifying devices supported coherent DMA operations in DT.
> +
> +* DMA Bus master
> +Optional property:
> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
> +	(child-bus-address, parent-bus-address, length). Each triplet specified
> +	describes a contiguous DMA address range.
> +	The dma-ranges property is used to describe the direct memory access (DMA)
> +	structure of a memory-mapped bus whose device tree parent can be accessed
> +	from DMA operations originating from the bus. It provides a means of
> +	defining a mapping or translation between the physical address space of
> +	the bus and the physical address space of the parent of the bus.
> +	(for more information see ePAPR specification)
> +
> +* DMA Bus child
> +Optional property:
> +- dma-ranges: <empty> value. if present - It means that DMA addresses
> +	translation has to be enabled for this device.
> +- dma-coherent: Present if dma operations are coherent
> +
> +Example:
> +soc {
> +		compatible = "ti,keystone","simple-bus";
> +		ranges = <0x0 0x0 0x0 0xc0000000>;
> +		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
> +
> +		[...]
> +
> +		usb: usb@2680000 {
> +			compatible = "ti,keystone-dwc3";
> +
> +			[...]
> +			dma-coherent;
> +		};
> +};
> +
>   Appendix A - Sample SOC node for MPC8540
>   ========================================
>
>

Regards,
-grygorii

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-09-19 18:29                     ` Grygorii Strashko
  0 siblings, 0 replies; 38+ messages in thread
From: Grygorii Strashko @ 2014-09-19 18:29 UTC (permalink / raw)
  To: Santosh Shilimkar, Rob Herring
  Cc: Arnd Bergmann, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Russell King,
	Pawel Moll, Ian Campbell, linux-kernel, Rob Herring, Kumar Gala,
	Grant Likely, Fabio Estevam, Shawn Guo

Hi Rob,

On 06/22/2014 10:40 PM, Santosh Shilimkar wrote:
> On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
>> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
>> <santosh.shilimkar-l0cyMroinI0@public.gmane.org> wrote:
>>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>>> +                       dma-coherent;
>>>>>>> +                       dma-ranges;
>>>>>>> +
>>>>>>> +                       dwc3@2690000 {
>>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>>> +                               [...]
>>>>>>> +                       };
>>>>>>
>>>>>> This example is a bit strange. I don't understand the relationship
>>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>>> to see a simple example here.
>>>>
>>>>
>>>>>> dma-ranges is a property of the parent which you show, but
>>>>>> dma-coherent originally was a property of the bus master itself. While
>>>>>> we need to support that, are we changing that? We need to be clear on
>>>>>> where the property belongs even if the kernel is more lax.
>>>>>>
>>>>> I don't think we are changing it fundamentally but may be I missing
>>>>> your point. The dma-coherent as is now a per-device property.
>>>>> USB is one of the bus master supports coherency and hence showed
>>>>> up in above example.
>>>>
>>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>>> intermediate dma-ranges property from the example, leaving the
>>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>>
>>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>>> fine by it, the example will look like below.
>>
>> Yes. Looks fine.
>>
> Great. Updated version 2 below.

Seems, this patch has not been merged accidentally :(
Is it possible for you to take it, or would you like me to re-send it?

>
>  From 7df26004fe11b7d3ef9592161205c69e1fb663be Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
> Date: Fri, 20 Jun 2014 11:01:54 -0400
> Subject: [PATCH v2] dt/documentation: add specification of dma bus information
>
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
> Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Acked-by: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Signed-off-by: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
> ---
>   Documentation/devicetree/booting-without-of.txt |   53 +++++++++++++++++++++++
>   1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..7768518 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>     VIII - Specifying device power management information (sleep property)
>
> +  IX - Specifying dma bus information
> +
>     Appendix A - Sample SOC node for MPC8540
>
>
> @@ -1332,6 +1334,57 @@ reasonably grouped in this manner, then create a virtual sleep controller
>   (similar to an interrupt nexus, except that defining a standardized
>   sleep-map should wait until its necessity is demonstrated).
>
> +IX - Specifying dma bus information
> +
> +Some devices may have DMA memory range shifted relatively to the beginning of
> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
> +worked in LPAE mode with 4G memory has:
> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
> +and DMA range is aliased into first 2G of RAM in HW.
> +
> +In such cases, DMA addresses translation should be performed between CPU phys
> +and DMA addresses. The "dma-ranges" property is intended to be used
> +for describing the configuration of such system in DT.
> +
> +In addition, each DMA master device on the DMA bus may or may not support
> +coherent DMA operations. The "dma-coherent" property is intended to be used
> +for identifying devices supported coherent DMA operations in DT.
> +
> +* DMA Bus master
> +Optional property:
> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
> +	(child-bus-address, parent-bus-address, length). Each triplet specified
> +	describes a contiguous DMA address range.
> +	The dma-ranges property is used to describe the direct memory access (DMA)
> +	structure of a memory-mapped bus whose device tree parent can be accessed
> +	from DMA operations originating from the bus. It provides a means of
> +	defining a mapping or translation between the physical address space of
> +	the bus and the physical address space of the parent of the bus.
> +	(for more information see ePAPR specification)
> +
> +* DMA Bus child
> +Optional property:
> +- dma-ranges: <empty> value. if present - It means that DMA addresses
> +	translation has to be enabled for this device.
> +- dma-coherent: Present if dma operations are coherent
> +
> +Example:
> +soc {
> +		compatible = "ti,keystone","simple-bus";
> +		ranges = <0x0 0x0 0x0 0xc0000000>;
> +		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
> +
> +		[...]
> +
> +		usb: usb@2680000 {
> +			compatible = "ti,keystone-dwc3";
> +
> +			[...]
> +			dma-coherent;
> +		};
> +};
> +
>   Appendix A - Sample SOC node for MPC8540
>   ========================================
>
>

Regards,
-grygorii
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-09-19 18:29                     ` Grygorii Strashko
  0 siblings, 0 replies; 38+ messages in thread
From: Grygorii Strashko @ 2014-09-19 18:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Rob,

On 06/22/2014 10:40 PM, Santosh Shilimkar wrote:
> On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
>> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
>> <santosh.shilimkar@ti.com> wrote:
>>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>>> +                       dma-coherent;
>>>>>>> +                       dma-ranges;
>>>>>>> +
>>>>>>> +                       dwc3 at 2690000 {
>>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>>> +                               [...]
>>>>>>> +                       };
>>>>>>
>>>>>> This example is a bit strange. I don't understand the relationship
>>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>>> to see a simple example here.
>>>>
>>>>
>>>>>> dma-ranges is a property of the parent which you show, but
>>>>>> dma-coherent originally was a property of the bus master itself. While
>>>>>> we need to support that, are we changing that? We need to be clear on
>>>>>> where the property belongs even if the kernel is more lax.
>>>>>>
>>>>> I don't think we are changing it fundamentally but may be I missing
>>>>> your point. The dma-coherent as is now a per-device property.
>>>>> USB is one of the bus master supports coherency and hence showed
>>>>> up in above example.
>>>>
>>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>>> intermediate dma-ranges property from the example, leaving the
>>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>>
>>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>>> fine by it, the example will look like below.
>>
>> Yes. Looks fine.
>>
> Great. Updated version 2 below.

Seems, this patch has not been merged accidentally :(
Is it possible for you to take it, or would you like me to re-send it?

>
>  From 7df26004fe11b7d3ef9592161205c69e1fb663be Mon Sep 17 00:00:00 2001
> From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: Fri, 20 Jun 2014 11:01:54 -0400
> Subject: [PATCH v2] dt/documentation: add specification of dma bus information
>
> Recently we introduced the generic device tree infrastructure for couple of DMA
> bus parameter, dma-ranges and dma-coherent. Update the documentation so that
> its useful for future users.
>
> The "dma-ranges" property is intended to be used for describing the
> configuration of DMA bus RAM addresses and its offset w.r.t CPU addresses.
>
> The "dma-coherent" property is intended to be used for identifying devices
> supported coherent DMA operations.
>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
> Cc: Kumar Gala <galak@codeaurora.org>
> Acked-by: Shawn Guo <shawn.guo@freescale.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
>   Documentation/devicetree/booting-without-of.txt |   53 +++++++++++++++++++++++
>   1 file changed, 53 insertions(+)
>
> diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
> index 1f013bd..7768518 100644
> --- a/Documentation/devicetree/booting-without-of.txt
> +++ b/Documentation/devicetree/booting-without-of.txt
> @@ -51,6 +51,8 @@ Table of Contents
>
>     VIII - Specifying device power management information (sleep property)
>
> +  IX - Specifying dma bus information
> +
>     Appendix A - Sample SOC node for MPC8540
>
>
> @@ -1332,6 +1334,57 @@ reasonably grouped in this manner, then create a virtual sleep controller
>   (similar to an interrupt nexus, except that defining a standardized
>   sleep-map should wait until its necessity is demonstrated).
>
> +IX - Specifying dma bus information
> +
> +Some devices may have DMA memory range shifted relatively to the beginning of
> +RAM, or even placed outside of kernel RAM. For example, the Keystone 2 SoC
> +worked in LPAE mode with 4G memory has:
> +- RAM range: [0x8 0000 0000, 0x8 FFFF FFFF]
> +- DMA range: [  0x8000 0000,   0xFFFF FFFF]
> +and DMA range is aliased into first 2G of RAM in HW.
> +
> +In such cases, DMA addresses translation should be performed between CPU phys
> +and DMA addresses. The "dma-ranges" property is intended to be used
> +for describing the configuration of such system in DT.
> +
> +In addition, each DMA master device on the DMA bus may or may not support
> +coherent DMA operations. The "dma-coherent" property is intended to be used
> +for identifying devices supported coherent DMA operations in DT.
> +
> +* DMA Bus master
> +Optional property:
> +- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
> +	(child-bus-address, parent-bus-address, length). Each triplet specified
> +	describes a contiguous DMA address range.
> +	The dma-ranges property is used to describe the direct memory access (DMA)
> +	structure of a memory-mapped bus whose device tree parent can be accessed
> +	from DMA operations originating from the bus. It provides a means of
> +	defining a mapping or translation between the physical address space of
> +	the bus and the physical address space of the parent of the bus.
> +	(for more information see ePAPR specification)
> +
> +* DMA Bus child
> +Optional property:
> +- dma-ranges: <empty> value. if present - It means that DMA addresses
> +	translation has to be enabled for this device.
> +- dma-coherent: Present if dma operations are coherent
> +
> +Example:
> +soc {
> +		compatible = "ti,keystone","simple-bus";
> +		ranges = <0x0 0x0 0x0 0xc0000000>;
> +		dma-ranges = <0x80000000 0x8 0x00000000 0x80000000>;
> +
> +		[...]
> +
> +		usb: usb at 2680000 {
> +			compatible = "ti,keystone-dwc3";
> +
> +			[...]
> +			dma-coherent;
> +		};
> +};
> +
>   Appendix A - Sample SOC node for MPC8540
>   ========================================
>
>

Regards,
-grygorii

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-09-26 16:32                       ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-09-26 16:32 UTC (permalink / raw)
  To: Grygorii Strashko
  Cc: Santosh Shilimkar, Arnd Bergmann, linux-arm-kernel, Mark Rutland,
	devicetree, Russell King, Pawel Moll, Ian Campbell, linux-kernel,
	Rob Herring, Kumar Gala, Grant Likely, Fabio Estevam, Shawn Guo

On Fri, Sep 19, 2014 at 1:29 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> Hi Rob,
>
>
> On 06/22/2014 10:40 PM, Santosh Shilimkar wrote:
>>
>> On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
>>>
>>> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
>>> <santosh.shilimkar@ti.com> wrote:
>>>>
>>>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>>>>
>>>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>>>>
>>>>>>>> +                       dma-coherent;
>>>>>>>> +                       dma-ranges;
>>>>>>>> +
>>>>>>>> +                       dwc3@2690000 {
>>>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>>>> +                               [...]
>>>>>>>> +                       };
>>>>>>>
>>>>>>>
>>>>>>> This example is a bit strange. I don't understand the relationship
>>>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>>>> to see a simple example here.
>>>>>
>>>>>
>>>>>
>>>>>>> dma-ranges is a property of the parent which you show, but
>>>>>>> dma-coherent originally was a property of the bus master itself.
>>>>>>> While
>>>>>>> we need to support that, are we changing that? We need to be clear on
>>>>>>> where the property belongs even if the kernel is more lax.
>>>>>>>
>>>>>> I don't think we are changing it fundamentally but may be I missing
>>>>>> your point. The dma-coherent as is now a per-device property.
>>>>>> USB is one of the bus master supports coherency and hence showed
>>>>>> up in above example.
>>>>>
>>>>>
>>>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>>>> intermediate dma-ranges property from the example, leaving the
>>>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>>>
>>>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>>>> fine by it, the example will look like below.
>>>
>>>
>>> Yes. Looks fine.
>>>
>> Great. Updated version 2 below.
>
>
> Seems, this patch has not been merged accidentally :(
> Is it possible for you to take it, or would you like me to re-send it?

Applied. Sorry for the delay.

Rob

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

* Re: [PATCH] dt/documentation: add specification of dma bus information
@ 2014-09-26 16:32                       ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-09-26 16:32 UTC (permalink / raw)
  To: Grygorii Strashko
  Cc: Santosh Shilimkar, Arnd Bergmann,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Russell King, Pawel Moll,
	Ian Campbell, linux-kernel, Rob Herring, Kumar Gala,
	Grant Likely, Fabio Estevam, Shawn Guo

On Fri, Sep 19, 2014 at 1:29 PM, Grygorii Strashko
<grygorii.strashko-l0cyMroinI0@public.gmane.org> wrote:
> Hi Rob,
>
>
> On 06/22/2014 10:40 PM, Santosh Shilimkar wrote:
>>
>> On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
>>>
>>> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
>>> <santosh.shilimkar-l0cyMroinI0@public.gmane.org> wrote:
>>>>
>>>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>>>>
>>>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>>>>
>>>>>>>> +                       dma-coherent;
>>>>>>>> +                       dma-ranges;
>>>>>>>> +
>>>>>>>> +                       dwc3@2690000 {
>>>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>>>> +                               [...]
>>>>>>>> +                       };
>>>>>>>
>>>>>>>
>>>>>>> This example is a bit strange. I don't understand the relationship
>>>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>>>> to see a simple example here.
>>>>>
>>>>>
>>>>>
>>>>>>> dma-ranges is a property of the parent which you show, but
>>>>>>> dma-coherent originally was a property of the bus master itself.
>>>>>>> While
>>>>>>> we need to support that, are we changing that? We need to be clear on
>>>>>>> where the property belongs even if the kernel is more lax.
>>>>>>>
>>>>>> I don't think we are changing it fundamentally but may be I missing
>>>>>> your point. The dma-coherent as is now a per-device property.
>>>>>> USB is one of the bus master supports coherency and hence showed
>>>>>> up in above example.
>>>>>
>>>>>
>>>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>>>> intermediate dma-ranges property from the example, leaving the
>>>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>>>
>>>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>>>> fine by it, the example will look like below.
>>>
>>>
>>> Yes. Looks fine.
>>>
>> Great. Updated version 2 below.
>
>
> Seems, this patch has not been merged accidentally :(
> Is it possible for you to take it, or would you like me to re-send it?

Applied. Sorry for the delay.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] dt/documentation: add specification of dma bus information
@ 2014-09-26 16:32                       ` Rob Herring
  0 siblings, 0 replies; 38+ messages in thread
From: Rob Herring @ 2014-09-26 16:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 19, 2014 at 1:29 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> Hi Rob,
>
>
> On 06/22/2014 10:40 PM, Santosh Shilimkar wrote:
>>
>> On Friday 20 June 2014 03:46 PM, Rob Herring wrote:
>>>
>>> On Fri, Jun 20, 2014 at 2:02 PM, Santosh Shilimkar
>>> <santosh.shilimkar@ti.com> wrote:
>>>>
>>>> On Friday 20 June 2014 02:56 PM, Arnd Bergmann wrote:
>>>>>
>>>>> On Friday 20 June 2014 13:17:43 Santosh Shilimkar wrote:
>>>>>>>>
>>>>>>>> +                       dma-coherent;
>>>>>>>> +                       dma-ranges;
>>>>>>>> +
>>>>>>>> +                       dwc3 at 2690000 {
>>>>>>>> +                               compatible = "synopsys,dwc3";
>>>>>>>> +                               [...]
>>>>>>>> +                       };
>>>>>>>
>>>>>>>
>>>>>>> This example is a bit strange. I don't understand the relationship
>>>>>>> between keystone-dwc3 and synopsys,dwc3, nor do I want to. I'd prefer
>>>>>>> to see a simple example here.
>>>>>
>>>>>
>>>>>
>>>>>>> dma-ranges is a property of the parent which you show, but
>>>>>>> dma-coherent originally was a property of the bus master itself.
>>>>>>> While
>>>>>>> we need to support that, are we changing that? We need to be clear on
>>>>>>> where the property belongs even if the kernel is more lax.
>>>>>>>
>>>>>> I don't think we are changing it fundamentally but may be I missing
>>>>>> your point. The dma-coherent as is now a per-device property.
>>>>>> USB is one of the bus master supports coherency and hence showed
>>>>>> up in above example.
>>>>>
>>>>>
>>>>> I think it's enough if you just drop the "synopsys,dwc3" node and the
>>>>> intermediate dma-ranges property from the example, leaving the
>>>>> dma-coherent property in the "ti,keystone-dwc3" node.
>>>>>
>>>> Thanks Arnd. That should avoid the confusion. Just to see if Rob is
>>>> fine by it, the example will look like below.
>>>
>>>
>>> Yes. Looks fine.
>>>
>> Great. Updated version 2 below.
>
>
> Seems, this patch has not been merged accidentally :(
> Is it possible for you to take it, or would you like me to re-send it?

Applied. Sorry for the delay.

Rob

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

end of thread, other threads:[~2014-09-26 16:32 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05 15:22 [PATCH] dt/documentation: add specification of dma bus information Santosh Shilimkar
2014-06-05 15:22 ` Santosh Shilimkar
2014-06-05 15:22 ` Santosh Shilimkar
2014-06-09  2:06 ` Shawn Guo
2014-06-09  2:06   ` Shawn Guo
2014-06-09  2:06   ` Shawn Guo
2014-06-09  2:13 ` Fabio Estevam
2014-06-09  2:13   ` Fabio Estevam
2014-06-09  2:13   ` Fabio Estevam
2014-06-09 13:59   ` Santosh Shilimkar
2014-06-09 13:59     ` Santosh Shilimkar
2014-06-09 13:59     ` Santosh Shilimkar
2014-06-20 15:04     ` Santosh Shilimkar
2014-06-20 15:04       ` Santosh Shilimkar
2014-06-20 15:04       ` Santosh Shilimkar
2014-06-20 15:50       ` Rob Herring
2014-06-20 15:50         ` Rob Herring
2014-06-20 15:50         ` Rob Herring
2014-06-20 17:17         ` Santosh Shilimkar
2014-06-20 17:17           ` Santosh Shilimkar
2014-06-20 17:17           ` Santosh Shilimkar
2014-06-20 18:56           ` Arnd Bergmann
2014-06-20 18:56             ` Arnd Bergmann
2014-06-20 19:02             ` Santosh Shilimkar
2014-06-20 19:02               ` Santosh Shilimkar
2014-06-20 19:02               ` Santosh Shilimkar
2014-06-20 19:46               ` Rob Herring
2014-06-20 19:46                 ` Rob Herring
2014-06-20 19:46                 ` Rob Herring
2014-06-22 19:40                 ` Santosh Shilimkar
2014-06-22 19:40                   ` Santosh Shilimkar
2014-06-22 19:40                   ` Santosh Shilimkar
2014-09-19 18:29                   ` Grygorii Strashko
2014-09-19 18:29                     ` Grygorii Strashko
2014-09-19 18:29                     ` Grygorii Strashko
2014-09-26 16:32                     ` Rob Herring
2014-09-26 16:32                       ` Rob Herring
2014-09-26 16:32                       ` Rob Herring

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.