[PATCH v5 06/20] dt-bindings: memory: introduce DDR4

Clément Le Goffic posted 20 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Clément Le Goffic 2 months, 1 week 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..f457066a2f8b
--- /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,sdram-props.yaml#
+
+properties:
+  compatible:
+    items:
+      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{1}$"
+      - const: jedec,ddr4
+
+required:
+  - compatible
+  - density
+  - io-width
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    ddr {
+        compatible = "ddr4-ff,f", "jedec,ddr4";
+        density = <8192>;
+        io-width = <8>;
+    };

-- 
2.43.0

Re: [PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Rob Herring 2 months, 1 week ago
On Mon, Jul 28, 2025 at 05:29:37PM +0200, Clément Le Goffic wrote:
> 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..f457066a2f8b
> --- /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,sdram-props.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{1}$"

Shouldn't this be 'jedec,ddr4-...'

> +      - const: jedec,ddr4
> +
> +required:
> +  - compatible
> +  - density
> +  - io-width
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    ddr {
> +        compatible = "ddr4-ff,f", "jedec,ddr4";
> +        density = <8192>;
> +        io-width = <8>;
> +    };
> 
> -- 
> 2.43.0
> 
Re: [PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Clément Le Goffic 1 month, 3 weeks ago
Hi Rob,

On 30/07/2025 23:11, Rob Herring wrote:
> On Mon, Jul 28, 2025 at 05:29:37PM +0200, Clément Le Goffic wrote:
>> 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..f457066a2f8b
>> --- /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,sdram-props.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    items:
>> +      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{1}$"
> 
> Shouldn't this be 'jedec,ddr4-...'

That's not the case for lpddr bindings, I wanted both lpddr and ddr 
bindings to be similar but this can change.

> 
>> +      - const: jedec,ddr4
>> +
>> +required:
>> +  - compatible
>> +  - density
>> +  - io-width
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    ddr {
>> +        compatible = "ddr4-ff,f", "jedec,ddr4";
>> +        density = <8192>;
>> +        io-width = <8>;
>> +    };
>>
>> -- 
>> 2.43.0
>>

Best regards,
Clément
Re: [PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 14/08/2025 16:42, Clément Le Goffic wrote:
> Hi Rob,
> 
> On 30/07/2025 23:11, Rob Herring wrote:
>> On Mon, Jul 28, 2025 at 05:29:37PM +0200, Clément Le Goffic wrote:
>>> 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..f457066a2f8b
>>> --- /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,sdram-props.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    items:
>>> +      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{1}$"
>>
>> Shouldn't this be 'jedec,ddr4-...'
> 
> That's not the case for lpddr bindings, I wanted both lpddr and ddr 
> bindings to be similar but this can change.

For LPDDR Julius introduced in commit 686fe63b2280 ("dt-bindings:
memory: Add numeric LPDDR compatible string variant") ddr4-VENDORID
pattern to distinguish individual manufacturers.

Jedec is not really the vendor here.

Is it the same case in DDR? You have a defined list of vendor IDs (also
1 byte)?

> 
>>
>>> +      - const: jedec,ddr4


Best regards,
Krzysztof
Re: [PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Clément Le Goffic 1 month, 2 weeks ago
Hi Krzysztof,

On 17/08/2025 09:19, Krzysztof Kozlowski wrote:
> On 14/08/2025 16:42, Clément Le Goffic wrote:
>> Hi Rob,
>>
>> On 30/07/2025 23:11, Rob Herring wrote:
>>> On Mon, Jul 28, 2025 at 05:29:37PM +0200, Clément Le Goffic wrote:
>>>> 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..f457066a2f8b
>>>> --- /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,sdram-props.yaml#
>>>> +
>>>> +properties:
>>>> +  compatible:
>>>> +    items:
>>>> +      - pattern: "^ddr4-[0-9a-f]{2},[0-9a-f]{1}$"
>>>
>>> Shouldn't this be 'jedec,ddr4-...'
>>
>> That's not the case for lpddr bindings, I wanted both lpddr and ddr
>> bindings to be similar but this can change.
> 
> For LPDDR Julius introduced in commit 686fe63b2280 ("dt-bindings:
> memory: Add numeric LPDDR compatible string variant") ddr4-VENDORID
> pattern to distinguish individual manufacturers.
> 
> Jedec is not really the vendor here.
> 
> Is it the same case in DDR? You have a defined list of vendor IDs (also
> 1 byte)?

There is no defined list of vendor IDs.
The way the compatible string is created is explained in
jedec,sdram-props.yaml file which is created in patch 5 of this series.

Best regards,
Clément
Re: [PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Julius Werner 2 months, 1 week ago
> +title: DDR3 SDRAM compliant to JEDEC JESD79-4D

Should this say DDR4?

> +examples:
> +  - |
> +    ddr {
> +        compatible = "ddr4-ff,f", "jedec,ddr4";

This is not a valid example for the way you're defining it now anymore.
Re: [PATCH v5 06/20] dt-bindings: memory: introduce DDR4
Posted by Clément Le Goffic 1 month, 3 weeks ago
Hi Julius,

On 30/07/2025 20:29, Julius Werner wrote:
>> +title: DDR3 SDRAM compliant to JEDEC JESD79-4D
> 
> Should this say DDR4?
Yes, absolutely.
> 
>> +examples:
>> +  - |
>> +    ddr {
>> +        compatible = "ddr4-ff,f", "jedec,ddr4";
> 
> This is not a valid example for the way you're defining it now anymore.
Yes will fix it.

Best regards,
Clément