From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
grygorii.strashko@ti.com, Russell King <linux@arm.linux.org.uk>,
Pawel Moll <pawel.moll@arm.com>, Arnd Bergmann <arnd@arndb.de>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Shawn Guo <shawn.guo@freescale.com>,
Kumar Gala <galak@codeaurora.org>,
Grant Likely <grant.likely@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] dt/documentation: add specification of dma bus information
Date: Fri, 20 Jun 2014 11:04:19 -0400 [thread overview]
Message-ID: <53A44D73.6080200@ti.com> (raw)
In-Reply-To: <5395BDA7.3060507@ti.com>
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
next prev parent reply other threads:[~2014-06-20 15:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 15:22 [PATCH] dt/documentation: add specification of dma bus information Santosh Shilimkar
[not found] ` <1401981720-6946-1-git-send-email-santosh.shilimkar-l0cyMroinI0@public.gmane.org>
2014-06-09 2:06 ` Shawn Guo
2014-06-09 2:13 ` Fabio Estevam
[not found] ` <CAOMZO5Ceg9RpC8Lgt0BwGTuaz-Z2614Die2PrbtT_j4QYjL_sA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-09 13:59 ` Santosh Shilimkar
2014-06-20 15:04 ` Santosh Shilimkar [this message]
2014-06-20 15:50 ` Rob Herring
2014-06-20 17:17 ` Santosh Shilimkar
2014-06-20 18:56 ` Arnd Bergmann
2014-06-20 19:02 ` Santosh Shilimkar
[not found] ` <53A48553.2080504-l0cyMroinI0@public.gmane.org>
2014-06-20 19:46 ` Rob Herring
2014-06-22 19:40 ` Santosh Shilimkar
[not found] ` <53A73110.60405-l0cyMroinI0@public.gmane.org>
2014-09-19 18:29 ` Grygorii Strashko
[not found] ` <541C7609.3000901-l0cyMroinI0@public.gmane.org>
2014-09-26 16:32 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A44D73.6080200@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=grygorii.strashko@ti.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=shawn.guo@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).