Skip to contentSkip to conversation

dt-bindings: opp: operating-points-v2-ti-cpu: Describe opp-supported-hw

PATCH Superseded Dhruva Gole 2 participants 2 messages Sep 18, 2024

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 dt-bindings: opp: operating-points-v2-ti-cpu: Describe opp-supported-hw

It seems like we missed migrating the complete information from the old DT binding where we had described what the opp-supported-hw is supposed to describe. Hence, bring back the description from the previous binding to the current one along with a bit more context on what the values are supposed to be.

Fixes e576a9a8603f ("dt-bindings: cpufreq: Convert ti-cpufreq to json schema")

---

Changes in v4:
- Fix dt_binding_check errors on previous revision.
- As per Rob's suggestion, used a blank line in between description and the paragraph.
- Reworded the description a bit.
- Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Use the items: and then provide description for both required items.
This tries to address Rob's comments on previous revision.
- I've not use min/max Items as the 2 descriptions items implicitly
imply that number of bitfields needed are 2.
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Drop the patch where I updated Maintainers since it's already picked
by Viresh.
- Add more details of how to populate the property based on device
documents like TRM/ datasheet.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../opp/operating-points-v2-ti-cpu.yaml       | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +19 -1
index fd0c8d5c5f3e..7c07410638db 100644
@@ -45,7 +45,25 @@ patternProperties:
       clock-latency-ns: true
       opp-hz: true
       opp-microvolt: true
-      opp-supported-hw: true
+      opp-supported-hw:
+        items:
+          items:
+            - description:
+
+                The revision of the SoC the OPP is supported by.
+                This can be easily obtained from the datasheet of the
+                part being ordered/used. For eg. it will be 0x01 for SR1.0
+            - description:
+
+                The eFuse bits that indicate the particular OPP is available.
+                The device datasheet has a table talking about Device Speed Grades.
+                This table is to be sorted with only the unique elements of the
+                MAXIMUM OPERATING FREQUENCY starting from the first row
+                which tells the lowest OPP, to the highest. The corresponding bits
+                need to be set based on N elements of speed grade the device supports.
+                So, if there are 3 possible unique MAXIMUM OPERATING FREQUENCY
+                in the table, then BIT(0) | (1) | (2) will be set, which means
+                the value shall be 0x7.
       opp-suspend: true
       turbo-mode: true
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 40 lines · Dhruva Gole

It seems like we missed migrating the complete information from the old DT binding where we had described what the opp-supported-hw is supposed to describe. Hence, bring back the description from the previous binding to the current one along with a bit more context on what the values are supposed to be.

Fixes e576a9a8603f ("dt-bindings: cpufreq: Convert ti-cpufreq to json schema")

---

Changes in v4:
- Fix dt_binding_check errors on previous revision.
- As per Rob's suggestion, used a blank line in between description and the paragraph.
- Reworded the description a bit.
- Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Use the items: and then provide description for both required items.
This tries to address Rob's comments on previous revision.
- I've not use min/max Items as the 2 descriptions items implicitly
imply that number of bitfields needed are 2.
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Drop the patch where I updated Maintainers since it's already picked
by Viresh.
- Add more details of how to populate the property based on device
documents like TRM/ datasheet.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../opp/operating-points-v2-ti-cpu.yaml       | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +0 -0
index fd0c8d5c5f3e..7c07410638db 100644

Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml patternProperties: · line 52

Quoted 9 lines
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +5 -1
@@ -45,7 +45,25 @@ patternProperties:
       clock-latency-ns: true
       opp-hz: true
       opp-microvolt: true
-      opp-supported-hw: true
+      opp-supported-hw:
+        items:
+          items:
+            - description:
+

A blank line here wasn't my suggestion. Do you see it done like this anywhere else in the tree?

Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml patternProperties: · line 55

Quoted 3 lines
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +3 -0
+                The revision of the SoC the OPP is supported by.
+                This can be easily obtained from the datasheet of the
+                part being ordered/used. For eg. it will be 0x01 for SR1.0

/eg./example,/

Is this 1 paragraph or 2? Put a blank line in between paragraphs if 2.

Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml patternProperties: · line 62

Quoted 7 lines
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +7 -0
+            - description:
+
+                The eFuse bits that indicate the particular OPP is available.
+                The device datasheet has a table talking about Device Speed Grades.
+                This table is to be sorted with only the unique elements of the
+                MAXIMUM OPERATING FREQUENCY starting from the first row
+                which tells the lowest OPP, to the highest. The corresponding bits

Odd line wrapping. 'which' should fit on prior line. Wrap at 80.

Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml patternProperties: · line 66

Quoted 4 lines
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +4 -0
+                need to be set based on N elements of speed grade the device supports.
+                So, if there are 3 possible unique MAXIMUM OPERATING FREQUENCY
+                in the table, then BIT(0) | (1) | (2) will be set, which means
+                the value shall be 0x7.

Here you should have a blank line.

Quoted 6 lines
Documentation/devicetree/bindings/opp/operating-points-v2-ti-cpu.yaml +0 -0
       opp-suspend: true
       turbo-mode: true
 
Signature · 1 line
2.34.1