[PATCH 2/3] dt-bindings: iommu: renesas,ipmmu-vmsa: Make 'power-domains' conditionally required

From: Rob Herring
Date: Tue Feb 02 2021 - 15:56:59 EST


Fixing the compatible string typos results in an error in the example:

Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.example.dt.yaml:
iommu@fe951000: 'power-domains' is a required property

Based on the dts files, a 'power-domains' property only exists on Gen 3
which can be conditioned on !renesas,ipmmu-vmsa.

Cc: Joerg Roedel <joro@xxxxxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Cc: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
---
.../bindings/iommu/renesas,ipmmu-vmsa.yaml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml
index 349633108bbd..dda44976acc1 100644
--- a/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml
+++ b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml
@@ -76,7 +76,6 @@ required:
- compatible
- reg
- '#iommu-cells'
- - power-domains

oneOf:
- required:
@@ -86,6 +85,17 @@ oneOf:

additionalProperties: false

+allOf:
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ const: renesas,ipmmu-vmsa
+ then:
+ required:
+ - power-domains
+
examples:
- |
#include <dt-bindings/clock/r8a7791-cpg-mssr.h>
--
2.27.0