diff mbox series

[v2,1/3] dt-bindings: hwmon: jedec,spd5118: Add bindings

Message ID 20240530223939.1027659-2-linux@roeck-us.net (mailing list archive)
State Changes Requested
Headers show
Series [v2,1/3] dt-bindings: hwmon: jedec,spd5118: Add bindings | expand

Commit Message

Guenter Roeck May 30, 2024, 10:39 p.m. UTC
Add device tree bindings for the SPD hub present in DDR5 modules.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Drop pec-enable property

 .../bindings/hwmon/jedec,spd5118.yaml         | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/jedec,spd5118.yaml

Comments

Krzysztof Kozlowski May 31, 2024, 8:15 a.m. UTC | #1
On 31/05/2024 00:39, Guenter Roeck wrote:
> Add device tree bindings for the SPD hub present in DDR5 modules.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

...

> +title: JEDEC JESD300-5B (SPD5118) compatible DDR5 SPD hub
> +
> +maintainers:
> +  - Guenter Roeck <linux@roeck-us.net>
> +
> +description: |
> +  JEDEC JESD300-5B.01 SPD5118 Hub and Serial Presence Detect
> +  https://www.jedec.org/standards-documents/docs/jesd300-5b01
> +
> +select:
> +  properties:
> +    compatible:
> +      const: jedec,spd5118

Why do you need the select? This s needed for cases with multiple
bindings using parts of compatible list. I don't see the case here so far.

Best regards,
Krzysztof
Guenter Roeck May 31, 2024, 1:09 p.m. UTC | #2
On 5/31/24 01:15, Krzysztof Kozlowski wrote:
> On 31/05/2024 00:39, Guenter Roeck wrote:
>> Add device tree bindings for the SPD hub present in DDR5 modules.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> 
> ...
> 
>> +title: JEDEC JESD300-5B (SPD5118) compatible DDR5 SPD hub
>> +
>> +maintainers:
>> +  - Guenter Roeck <linux@roeck-us.net>
>> +
>> +description: |
>> +  JEDEC JESD300-5B.01 SPD5118 Hub and Serial Presence Detect
>> +  https://www.jedec.org/standards-documents/docs/jesd300-5b01
>> +
>> +select:
>> +  properties:
>> +    compatible:
>> +      const: jedec,spd5118
> 
> Why do you need the select? This s needed for cases with multiple
> bindings using parts of compatible list. I don't see the case here so far.
> 

Sorry, I am not a devicetree expert, I don't really know what I am doing,
and just copied this from some other binding. I'll try to find a better
example. Actually, I'll just add the binding to trivial devices.

Thanks,
Guenter
Krzysztof Kozlowski May 31, 2024, 1:14 p.m. UTC | #3
On 31/05/2024 15:09, Guenter Roeck wrote:
> On 5/31/24 01:15, Krzysztof Kozlowski wrote:
>> On 31/05/2024 00:39, Guenter Roeck wrote:
>>> Add device tree bindings for the SPD hub present in DDR5 modules.
>>>
>>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>>
>> ...
>>
>>> +title: JEDEC JESD300-5B (SPD5118) compatible DDR5 SPD hub
>>> +
>>> +maintainers:
>>> +  - Guenter Roeck <linux@roeck-us.net>
>>> +
>>> +description: |
>>> +  JEDEC JESD300-5B.01 SPD5118 Hub and Serial Presence Detect
>>> +  https://www.jedec.org/standards-documents/docs/jesd300-5b01
>>> +
>>> +select:
>>> +  properties:
>>> +    compatible:
>>> +      const: jedec,spd5118
>>
>> Why do you need the select? This s needed for cases with multiple
>> bindings using parts of compatible list. I don't see the case here so far.
>>
> 
> Sorry, I am not a devicetree expert, I don't really know what I am doing,
> and just copied this from some other binding. I'll try to find a better
> example. Actually, I'll just add the binding to trivial devices.

Sounds good.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/jedec,spd5118.yaml b/Documentation/devicetree/bindings/hwmon/jedec,spd5118.yaml
new file mode 100644
index 000000000000..05c39f7083db
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/jedec,spd5118.yaml
@@ -0,0 +1,48 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/jedec,spd5118.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: JEDEC JESD300-5B (SPD5118) compatible DDR5 SPD hub
+
+maintainers:
+  - Guenter Roeck <linux@roeck-us.net>
+
+description: |
+  JEDEC JESD300-5B.01 SPD5118 Hub and Serial Presence Detect
+  https://www.jedec.org/standards-documents/docs/jesd300-5b01
+
+select:
+  properties:
+    compatible:
+      const: jedec,spd5118
+
+  required:
+    - compatible
+    - reg
+
+properties:
+  compatible:
+    const: jedec,spd5118
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        temp-sensor@51 {
+            compatible = "jedec,spd5118";
+            reg = <0x51>;
+        };
+    };