devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements
@ 2025-03-13  9:08 Krzysztof Kozlowski
  2025-03-13  9:08 ` [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-13  9:08 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, Konrad Dybcio
  Cc: linux-pm, devicetree, linux-kernel, Krzysztof Kozlowski

Make the cpufreq-epss/hw schema a bit stricter for each variant.

Best regards,
Krzysztof

---
Krzysztof Kozlowski (3):
      dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names
      dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1
      dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650

 .../bindings/cpufreq/cpufreq-qcom-hw.yaml          | 33 +++++++++++++++++++---
 1 file changed, 29 insertions(+), 4 deletions(-)
---
base-commit: eea255893718268e1ab852fb52f70c613d109b99
change-id: 20250313-dt-bindings-cpufreq-qcom-epss-9ab649df8626

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names
  2025-03-13  9:08 [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Krzysztof Kozlowski
@ 2025-03-13  9:08 ` Krzysztof Kozlowski
  2025-03-14 23:26   ` Rob Herring (Arm)
  2025-03-13  9:08 ` [PATCH 2/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1 Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-13  9:08 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, Konrad Dybcio
  Cc: linux-pm, devicetree, linux-kernel, Krzysztof Kozlowski

When narrowing properties per variant, the 'interrupt-names' should have
the same constraints as 'interrupts'.  Add missing upper bound on the
property.

Fixes: e69003202434 ("dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290")
Fixes: 7ae24e054f75 ("dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
index e937eb7355e7fb74c0aeafb4cb9f5ed80d96e6c3..6633a70e322019bf2f1cfdce8f3225b307dfffb6 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
@@ -127,6 +127,7 @@ allOf:
 
         interrupt-names:
           minItems: 1
+          maxItems: 1
 
   - if:
       properties:
@@ -160,6 +161,7 @@ allOf:
 
         interrupt-names:
           minItems: 2
+          maxItems: 2
 
   - if:
       properties:
@@ -187,6 +189,7 @@ allOf:
 
         interrupt-names:
           minItems: 3
+          maxItems: 3
 
   - if:
       properties:
@@ -211,6 +214,7 @@ allOf:
 
         interrupt-names:
           minItems: 2
+          maxItems: 2
 
 
 examples:

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1
  2025-03-13  9:08 [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Krzysztof Kozlowski
  2025-03-13  9:08 ` [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names Krzysztof Kozlowski
@ 2025-03-13  9:08 ` Krzysztof Kozlowski
  2025-03-14 23:26   ` Rob Herring (Arm)
  2025-03-13  9:08 ` [PATCH 3/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650 Krzysztof Kozlowski
  2025-03-17  6:05 ` [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Viresh Kumar
  3 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-13  9:08 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, Konrad Dybcio
  Cc: linux-pm, devicetree, linux-kernel, Krzysztof Kozlowski

List cannot have 0 items, so 'minItems: 1' in each if:then: is
redundant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
index 6633a70e322019bf2f1cfdce8f3225b307dfffb6..5c53ceb265b6f0f98509ef1f45aa246e95a20a22 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
@@ -114,19 +114,15 @@ allOf:
     then:
       properties:
         reg:
-          minItems: 1
           maxItems: 1
 
         reg-names:
-          minItems: 1
           maxItems: 1
 
         interrupts:
-          minItems: 1
           maxItems: 1
 
         interrupt-names:
-          minItems: 1
           maxItems: 1
 
   - if:

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650
  2025-03-13  9:08 [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Krzysztof Kozlowski
  2025-03-13  9:08 ` [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names Krzysztof Kozlowski
  2025-03-13  9:08 ` [PATCH 2/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1 Krzysztof Kozlowski
@ 2025-03-13  9:08 ` Krzysztof Kozlowski
  2025-03-14 23:28   ` Rob Herring (Arm)
  2025-03-17  6:05 ` [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Viresh Kumar
  3 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-13  9:08 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, Konrad Dybcio
  Cc: linux-pm, devicetree, linux-kernel, Krzysztof Kozlowski

Add SDX75 and SA8775p compatibles to respective if:then: blocks to
narrow their properties and add a new section for SM8650 with four 'reg'
and 'interrupts' (top-level already allows four).

SA8755p DTS comes without interrupts, but only because they might not
be available for OS under given firmware.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/cpufreq/cpufreq-qcom-hw.yaml          | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
index 5c53ceb265b6f0f98509ef1f45aa246e95a20a22..e94baf77d785fa089f2448cf56bd29d52b7b3621 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
@@ -111,6 +111,7 @@ allOf:
             enum:
               - qcom,qcm2290-cpufreq-hw
               - qcom,sar2130p-cpufreq-epss
+              - qcom,sdx75-cpufreq-epss
     then:
       properties:
         reg:
@@ -132,6 +133,7 @@ allOf:
             enum:
               - qcom,qdu1000-cpufreq-epss
               - qcom,sa8255p-cpufreq-epss
+              - qcom,sa8775p-cpufreq-epss
               - qcom,sc7180-cpufreq-hw
               - qcom,sc8180x-cpufreq-hw
               - qcom,sc8280xp-cpufreq-epss
@@ -212,6 +214,29 @@ allOf:
           minItems: 2
           maxItems: 2
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sm8650-cpufreq-epss
+    then:
+      properties:
+        reg:
+          minItems: 4
+          maxItems: 4
+
+        reg-names:
+          minItems: 4
+          maxItems: 4
+
+        interrupts:
+          minItems: 4
+          maxItems: 4
+
+        interrupt-names:
+          minItems: 4
+          maxItems: 4
 
 examples:
   - |

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names
  2025-03-13  9:08 ` [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names Krzysztof Kozlowski
@ 2025-03-14 23:26   ` Rob Herring (Arm)
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-03-14 23:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-pm, Viresh Kumar, Krzysztof Kozlowski, linux-kernel,
	Konrad Dybcio, Conor Dooley, Rafael J. Wysocki,
	Manivannan Sadhasivam, devicetree


On Thu, 13 Mar 2025 10:08:20 +0100, Krzysztof Kozlowski wrote:
> When narrowing properties per variant, the 'interrupt-names' should have
> the same constraints as 'interrupts'.  Add missing upper bound on the
> property.
> 
> Fixes: e69003202434 ("dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290")
> Fixes: 7ae24e054f75 ("dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1
  2025-03-13  9:08 ` [PATCH 2/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1 Krzysztof Kozlowski
@ 2025-03-14 23:26   ` Rob Herring (Arm)
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-03-14 23:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: devicetree, Viresh Kumar, linux-kernel, Manivannan Sadhasivam,
	linux-pm, Rafael J. Wysocki, Conor Dooley, Krzysztof Kozlowski,
	Konrad Dybcio


On Thu, 13 Mar 2025 10:08:21 +0100, Krzysztof Kozlowski wrote:
> List cannot have 0 items, so 'minItems: 1' in each if:then: is
> redundant.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 4 ----
>  1 file changed, 4 deletions(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650
  2025-03-13  9:08 ` [PATCH 3/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650 Krzysztof Kozlowski
@ 2025-03-14 23:28   ` Rob Herring (Arm)
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2025-03-14 23:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, Konrad Dybcio, Manivannan Sadhasivam,
	Krzysztof Kozlowski, Viresh Kumar, linux-kernel,
	Rafael J. Wysocki, devicetree, linux-pm


On Thu, 13 Mar 2025 10:08:22 +0100, Krzysztof Kozlowski wrote:
> Add SDX75 and SA8775p compatibles to respective if:then: blocks to
> narrow their properties and add a new section for SM8650 with four 'reg'
> and 'interrupts' (top-level already allows four).
> 
> SA8755p DTS comes without interrupts, but only because they might not
> be available for OS under given firmware.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/cpufreq/cpufreq-qcom-hw.yaml          | 25 ++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements
  2025-03-13  9:08 [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2025-03-13  9:08 ` [PATCH 3/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650 Krzysztof Kozlowski
@ 2025-03-17  6:05 ` Viresh Kumar
  3 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2025-03-17  6:05 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rafael J. Wysocki, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Konrad Dybcio, linux-pm, devicetree,
	linux-kernel

On 13-03-25, 10:08, Krzysztof Kozlowski wrote:
> Make the cpufreq-epss/hw schema a bit stricter for each variant.
> 
> Best regards,
> Krzysztof
> 
> ---
> Krzysztof Kozlowski (3):
>       dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names
>       dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1
>       dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650
> 
>  .../bindings/cpufreq/cpufreq-qcom-hw.yaml          | 33 +++++++++++++++++++---
>  1 file changed, 29 insertions(+), 4 deletions(-)

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-03-17  6:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-13  9:08 [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Krzysztof Kozlowski
2025-03-13  9:08 ` [PATCH 1/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Add missing constraint for interrupt-names Krzysztof Kozlowski
2025-03-14 23:26   ` Rob Herring (Arm)
2025-03-13  9:08 ` [PATCH 2/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Drop redundant minItems:1 Krzysztof Kozlowski
2025-03-14 23:26   ` Rob Herring (Arm)
2025-03-13  9:08 ` [PATCH 3/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Narrow properties on SDX75, SA8775p and SM8650 Krzysztof Kozlowski
2025-03-14 23:28   ` Rob Herring (Arm)
2025-03-17  6:05 ` [PATCH 0/3] dt-bindings: cpufreq: cpufreq-qcom-hw: Few improvements Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).