Skip to contentSkip to conversation

dt-bindings: arm: socfpga: Add Altera SOCFPGA SDRAM EDAS

PATCH Superseded Alessandro Zanni 2 participants 3 messages Jul 31, 2024 – Aug 1, 2024 Device tree bindings

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: arm: socfpga: Add Altera SOCFPGA SDRAM EDAS

Added new yaml file that substitues the old txt file.

---
 .../arm/altera/socfpga-sdram-edac.txt         | 15 ------
 .../arm/altera/socfpga-sdram-edac.yaml        | 46 +++++++++++++++++++
 2 files changed, 46 insertions(+), 15 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt
 create mode 100644 Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt deleted +0 -15
deleted file mode 100644
index f5ad0ff69fae..000000000000
@@ -1,15 +0,0 @@
-Altera SOCFPGA SDRAM Error Detection & Correction [EDAC]
-The EDAC accesses a range of registers in the SDRAM controller.
-
-Required properties:
-- compatible : should contain "altr,sdram-edac" or "altr,sdram-edac-a10"
-- altr,sdr-syscon : phandle of the sdr module
-- interrupts : Should contain the SDRAM ECC IRQ in the
-	appropriate format for the IRQ controller.
-
-Example:
-	sdramedac {
-		compatible = "altr,sdram-edac";
-		altr,sdr-syscon = <&sdr>;
-		interrupts = <0 39 4>;
-	};
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.43.0
#1 lore raw

On 01/08/2024 01:02, Alessandro Zanni wrote:

Thank you for your patch. There is something to discuss/improve.

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml

Quoted 5 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +0 -0
new file mode 100644
index 000000000000..78fbe31e4a2b

Filename like compatible, so altr,sdram-edac.yaml

Fix the placement - arm is only for top-level sutff. This goes to memory-controllers or edac

Quoted 8 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +7 -0
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/altera/socfpga-sdram-edac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera SOCFPGA SDRAM Error Detection & Correction [EDAC]

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml line 17

Quoted 10 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +10 -0
+
+maintainers:
+  - Dinh Nguyen <[email protected]>
+
+description:
+  The EDAC accesses a range of registers in the SDRAM controller.
+
+properties:
+  compatible:
+    oneOf:

Drop oneOf

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml line 18

Quoted 1 line
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +1 -0
+      - items:

Drop items, just use enum

Quoted 12 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +12 -0
+          - enum:
+              - altr,sdram-edac
+              - altr,sdram-edac-a10
+
+  altr,sdr-syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: 
+      Phandle of the sdr module
+
+  interrupts:
+    maxItems: 1
+

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml line 40

Quoted 10 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +10 -0
+required:
+  - compatible
+  - altr,sdr-syscon
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    sdramedac {

Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

e.g. memory-controller

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml line 43

Quoted 3 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +3 -0
+      compatible = "altr,sdram-edac";
+      altr,sdr-syscon = <&sdr>;
+      interrupts = <0 39 4>;

Use proper defines.

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml line 46

Quoted 3 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +3 -0
+    };
+
+...

Best regards,
Krzysztof

#2 lore raw
Quoted 13 lines · Krzysztof Kozlowski

On 01/08/2024 01:02, Alessandro Zanni wrote:

Thank you for your patch. There is something to discuss/improve.

Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml

Quoted 5 lines
Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.yaml new file +0 -0
new file mode 100644
index 000000000000..78fbe31e4a2b

Filename like compatible, so altr,sdram-edac.yaml

Quoted 3 lines

Fix the placement - arm is only for top-level sutff. This goes to memory-controllers or edac

So this was a v2? Then version your patches correctly and add appropriate and detailed changelog under ---.

See submitting patches.

Best regards,
Krzysztof