[PATCH v3 06/19] dt-bindings: memory: introduce DDR4

Clément Le Goffic posted 19 patches 2 months, 2 weeks ago
There is a newer version of this series
[PATCH v3 06/19] dt-bindings: memory: introduce DDR4
Posted by Clément Le Goffic 2 months, 2 weeks ago
Introduce JEDEC compliant DDR bindings, that use new memory-props binding.

Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
---
 .../memory-controllers/ddr/jedec,ddr4.yaml         | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,ddr4.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,ddr4.yaml
new file mode 100644
index 000000000000..117af9ac599b
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,ddr4.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,ddr4.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: DDR3 SDRAM compliant to JEDEC JESD79-4D
+
+maintainers:
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+allOf:
+  - $ref: jedec,memory-props.yaml#
+
+properties:
+  compatible:
+    items:
+      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{4}$"
+      - const: jedec,ddr4
+
+required:
+  - compatible
+  - density
+  - io-width
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    ddr {
+        compatible = "ddr4-ff,000f", "jedec,ddr4";
+        density = <8192>;
+        io-width = <8>;
+    };

-- 
2.43.0

Re: [PATCH v3 06/19] dt-bindings: memory: introduce DDR4
Posted by Julius Werner 2 months, 2 weeks ago
> +      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{4}$"

This pattern doesn't really make sense when DDR4 doesn't have the same
manufacturer ID / revision ID format as LPDDR. You could either only
leave the fallback constant for now, or define a new auto-generated
format that matches what DDR4 SPD provides (which I believe, if I read
Wikipedia right, is a two byte manufacturer ID and then an up to 20
character ASCII part number string -- so it could be
`^ddr4-[0-9a-f{2},[0-9A-Za-z]{1,20}$`).
Re: [PATCH v3 06/19] dt-bindings: memory: introduce DDR4
Posted by Clement LE GOFFIC 2 months, 2 weeks ago
Hi Julius,

On 7/22/25 23:57, Julius Werner wrote:
>> +      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{4}$"
> 
> This pattern doesn't really make sense when DDR4 doesn't have the same
> manufacturer ID / revision ID format as LPDDR. You could either only
> leave the fallback constant for now, or define a new auto-generated
> format that matches what DDR4 SPD provides (which I believe, if I read
> Wikipedia right, is a two byte manufacturer ID and then an up to 20
> character ASCII part number string -- so it could be
> `^ddr4-[0-9a-f{2},[0-9A-Za-z]{1,20}$`).

Oh ok I didn't catch that it should be from the SPD.
I'll propose something.

Best regards,
Clément