From: Kenny Root <[email protected]>

Add documentation and example for memory-region in pmem.

Signed-off-by: Kenny Root <[email protected]>
Signed-off-by: Alistair Delva <[email protected]>
Cc: "Oliver O'Halloran" <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Vishal Verma <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Ira Weiny <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
 .../devicetree/bindings/pmem/pmem-region.txt  | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/pmem/pmem-region.txt 
b/Documentation/devicetree/bindings/pmem/pmem-region.txt
index 5cfa4f016a00..851ffa71967e 100644
--- a/Documentation/devicetree/bindings/pmem/pmem-region.txt
+++ b/Documentation/devicetree/bindings/pmem/pmem-region.txt
@@ -29,6 +29,18 @@ Required properties:
                in a separate device node. Having multiple address ranges in a
                node implies no special relationship between the two ranges.
 
+               This property may be replaced or supplemented with a
+               memory-region property. Only one of reg or memory-region
+               properties is required.
+
+       - memory-region:
+               Reference to the reserved memory node. The reserved memory
+               node should be defined as per the bindings in
+               reserved-memory.txt
+
+               This property may be replaced or supplemented with a reg
+               property. Only one of reg or memory-region is required.
+
 Optional properties:
        - Any relevant NUMA assocativity properties for the target platform.
 
@@ -63,3 +75,21 @@ Examples:
                volatile;
        };
 
+
+       /*
+        * This example uses a reserved-memory entry instead of
+        * specifying the memory region directly in the node.
+        */
+
+       reserved-memory {
+               pmem_1: pmem@5000 {
+                       no-map;
+                       reg = <0x00005000 0x00001000>;
+               };
+       };
+
+       pmem@1 {
+               compatible = "pmem-region";
+               memory-region = <&pmem_1>;
+       };
+
-- 
2.25.0.265.gbab2e86ba0-goog
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to