Skip to contentSkip to conversation

dt-bindings: memory: convert Broadcom DPFE to dtschema

PATCH Applied Krzysztof Kozlowski 3 participants 3 messages Aug 17, 2021 – Aug 18, 2021

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

PATCH 1/1 dt-bindings: memory: convert Broadcom DPFE to dtschema

Convert Broadcom DDR PHY Front End (DPFE) bindings to DT schema format using json-schema.

---
 .../memory-controllers/brcm,dpfe-cpu.txt      | 27 -----------
 .../memory-controllers/brcm,dpfe-cpu.yaml     | 48 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 49 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml
Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt deleted +0 -27
deleted file mode 100644
index 82d923ef413f..000000000000
@@ -1,27 +0,0 @@
-DDR PHY Front End (DPFE) for Broadcom STB
-=========================================
-
-DPFE and the DPFE firmware provide an interface for the host CPU to
-communicate with the DCPU, which resides inside the DDR PHY.
-
-There are three memory regions for interacting with the DCPU. These are
-specified in a single reg property.
-
-Required properties:
-  - compatible: must be "brcm,bcm7271-dpfe-cpu", "brcm,bcm7268-dpfe-cpu"
-    or "brcm,dpfe-cpu"
-  - reg: must reference three register ranges
-      - start address and length of the DCPU register space
-      - start address and length of the DCPU data memory space
-      - start address and length of the DCPU instruction memory space
-  - reg-names: must contain "dpfe-cpu", "dpfe-dmem", and "dpfe-imem";
-        they must be in the same order as the register declarations
-
-Example:
-	dpfe_cpu0: dpfe-cpu@f1132000 {
-		compatible = "brcm,bcm7271-dpfe-cpu", "brcm,dpfe-cpu";
-		reg =  <0xf1132000 0x180
-			0xf1134000 0x1000
-			0xf1138000 0x4000>;
-		reg-names = "dpfe-cpu", "dpfe-dmem", "dpfe-imem";
-	};
Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml new file +48 -0

48 lines not on this page · raw message

MAINTAINERS +1 -1
index 36aee8517ab0..be8e4af8ed64 100644
@@ -3855,7 +3855,7 @@ M:	Markus Mayer <[email protected]>
 M:	[email protected]
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
-F:	Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
+F:	Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml
 F:	drivers/memory/brcmstb_dpfe.c
 
 BROADCOM STB NAND FLASH DRIVER
Signature · 1 line
2.30.2
maintainer Acked-by on v1 1/1
#1 lore raw

Thanks for updating this.

Quoted 64 lines

+++ b/Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml

Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml new file +48 -0
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/brcm,dpfe-cpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DDR PHY Front End (DPFE) for Broadcom STB
+
+maintainers:
+  - Krzysztof Kozlowski <[email protected]>
+  - Markus Mayer <[email protected]>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm7271-dpfe-cpu
+          - brcm,bcm7268-dpfe-cpu
+      - const: brcm,dpfe-cpu
+
+  reg:
+    items:
+      - description: DCPU register space
+      - description: DCPU data memory space
+      - description: DCPU instruction memory space
+
+  reg-names:
+    items:
+      - const: dpfe-cpu
+      - const: dpfe-dmem
+      - const: dpfe-imem
+
+required:
+  - compatible
+  - reg
+  - reg-names
+
+additionalProperties: false
+
+examples:
+  - |
+    dpfe-cpu@f1132000 {
+        compatible = "brcm,bcm7271-dpfe-cpu", "brcm,dpfe-cpu";
+        reg = <0xf1132000 0x180>,
+              <0xf1134000 0x1000>,
+              <0xf1138000 0x4000>;
+        reg-names = "dpfe-cpu", "dpfe-dmem", "dpfe-imem";
+    };
MAINTAINERS +1 -2
index 36aee8517ab0..be8e4af8ed64 100644
@@ -3855,7 +3855,7 @@ M:        Markus Mayer <[email protected]>
 M:     [email protected]
 L:     [email protected] (moderated for non-subscribers)
 S:     Maintained
-F:     Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
+F:     Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml
 F:     drivers/memory/brcmstb_dpfe.c
 
 BROADCOM STB NAND FLASH DRIVER
--
Quoted 2 lines

2.30.2

Regards,
-Markus

maintainer Applied
#2 lore raw
In reply to Krzysztof Kozlowski
Quoted 12 lines · Krzysztof Kozlowski

Convert Broadcom DDR PHY Front End (DPFE) bindings to DT schema format using json-schema.

---
 .../memory-controllers/brcm,dpfe-cpu.txt      | 27 -----------
 .../memory-controllers/brcm,dpfe-cpu.yaml     | 48 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 49 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.yaml

Applied, thanks!