[PATCH 2/9] dt-bindings: Arm: Extend FF-A binding to support in-kernel usage of partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since the FF-A v1.0 specification doesn't list the UUID of all the
partitions in the discovery API, we need to specify the UUID of the
partitions that need to be accessed by drivers within the kernel.

This extends the binding to provide the list of partitions that kernel
drivers may need to access and are not part of the partitions managed
by the hypervisor.

Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
---
 .../devicetree/bindings/arm/arm,ffa.yaml      | 34 +++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

Hi,

I am sure this is incomplete, but I couldn't figure out how to make all
the child properties optional if it is not managed by hypervisor.

Moreover, if we don't like the idea of adding UUID of all the partitions
that in-kernel drivers may need to communicate to, one alternative I can
think of is to allow the creation of FFA device from the FFA driver
itself.

Regards,
Sudeep

diff --git a/Documentation/devicetree/bindings/arm/arm,ffa.yaml b/Documentation/devicetree/bindings/arm/arm,ffa.yaml
index 668a5995fcab..d5c6d71c99de 100644
--- a/Documentation/devicetree/bindings/arm/arm,ffa.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,ffa.yaml
@@ -23,11 +23,12 @@ description: |

 properties:
   $nodename:
-    const: ffa_hyp
+    pattern: "^(ffa|ffa_hyp)$"

   compatible:
     oneOf:
       - const: arm,ffa-1.0-hypervisor
+      - const: arm,ffa-1.0

   memory-region:
     $ref: '/schemas/types.yaml#/definitions/phandle'
@@ -83,10 +84,26 @@ description: |

           [3] Documentation/devicetree/bindings/reserved-memory/arm,ffa-memory.yaml

+required:
+  - compatible
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: arm,ffa-1.0-hypervisor
+    then:
+      required:
+	- memory-region
+
 additionalProperties: false

 examples:
-  - |
+  - |+
+
+    // Case 1: Partitions managed by hypervisor
+
     ffa_hyp {
         compatible = "arm,ffa-1.0-hypervisor";
         memory-region = <&ffa_hyp_reserved>;
@@ -100,3 +117,16 @@ additionalProperties: false
             memory-region = <&ffa_reserved0 &ffa_reserved1>;
         };
     };
+
+  - |+
+
+    // Case 2: Partitions needing in-kernel usage
+
+    ffa {
+        compatible = "arm,ffa-1.0";
+
+        ffa_partition1 {
+            compatible = "arm,ffa-1.0-partition";
+            uuid = "589fc454-4502-4e66-9347-97b61e27cf73";
+        };
+   };
--
2.17.1




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux