Skip to contentSkip to conversation

dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml

PATCH Applied Johan Jonker 2 participants 2 messages Apr 11, 2020 – Apr 20, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml

Current dts files with 'rockchip-pmu-sram' compatible nodes are now verified with sram.yaml, although the original text document still exists. Merge rockchip-pmu-sram.txt with sram.yaml by adding it as description with an example. Make #address-cells, #size-cells and ranges optional if there are no child nodes to prevent yaml warnings.

---
Changes v4:
Make some properties optional

Changes v3:
Document the compatible

Changed v2:
Merge with sram.yaml

---
 .../devicetree/bindings/sram/rockchip-pmu-sram.txt | 16 -------------
 Documentation/devicetree/bindings/sram/sram.yaml   | 26 +++++++++++++++++++---
 2 files changed, 23 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt
Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt deleted +0 -16
deleted file mode 100644
index 6b42fda30..000000000
@@ -1,16 +0,0 @@
-Rockchip SRAM for pmu:
-------------------------------
-
-The sram of pmu is used to store the function of resume from maskrom(the 1st
-level loader). This is a common use of the "pmu-sram" because it keeps power
-even in low power states in the system.
-
-Required node properties:
-- compatible : should be "rockchip,rk3288-pmu-sram"
-- reg : physical base address and the size of the registers window
-
-Example:
-	sram@ff720000 {
-		compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
-		reg = <0xff720000 0x1000>;
-	};
Documentation/devicetree/bindings/sram/sram.yaml +23 -3
index 7b83cc6c9..f474fee47 100644
@@ -29,6 +29,7 @@ properties:
       enum:
         - mmio-sram
         - atmel,sama5d2-securam
+        - rockchip,rk3288-pmu-sram
 
   reg:
     maxItems: 1
@@ -118,9 +119,18 @@ patternProperties:
 required:
   - compatible
   - reg
-  - "#address-cells"
-  - "#size-cells"
-  - ranges
+
+if:
+  properties:
+    compatible:
+      contains:
+        const: rockchip,rk3288-pmu-sram
+
+else:
+  required:
+    - "#address-cells"
+    - "#size-cells"
+    - ranges
 
 additionalProperties: false
 
@@ -224,6 +234,16 @@ examples:
     };
 
   - |
+    // Rockchip's rk3288 SoC uses the sram of pmu to store the function of
+    // resume from maskrom(the 1st level loader). This is a common use of
+    // the "pmu-sram" because it keeps power even in low power states
+    // in the system.
+    sram@ff720000 {
+      compatible = "rockchip,rk3288-pmu-sram", "mmio-sram";
+      reg = <0xff720000 0x1000>;
+    };
+
+  - |
     // Allwinner's A80 SoC uses part of the secure sram for hotplugging of the
     // primary core (cpu0). Once the core gets powered up it checks if a magic
     // value is set at a specific location. If it is then the BROM will jump
Signature · 1 line
2.11.0
maintainer Applied
#1 lore raw
Quoted 15 lines · Johan Jonker

Current dts files with 'rockchip-pmu-sram' compatible nodes are now verified with sram.yaml, although the original text document still exists. Merge rockchip-pmu-sram.txt with sram.yaml by adding it as description with an example. Make #address-cells, #size-cells and ranges optional if there are no child nodes to prevent yaml warnings.

---
Changes v4:
Make some properties optional

Changes v3:
Document the compatible

Quoted 8 lines

Changed v2:
Merge with sram.yaml

---
 .../devicetree/bindings/sram/rockchip-pmu-sram.txt | 16 -------------
 Documentation/devicetree/bindings/sram/sram.yaml   | 26 +++++++++++++++++++---
 2 files changed, 23 insertions(+), 19 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt

Applied, thanks.

Rob