Adreno 505/506/510 have previously undocumented alwayson clock.
Document clocks for them and enforce their order.
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
.../devicetree/bindings/display/msm/gpu.yaml | 83 +++++++++++++++++++++-
1 file changed, 82 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
index 6ddc72fd85b04537ea270754a897b4e7eb269641..2bf562708f566018aff80b7b5e02f1dd7e0da26e 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
@@ -146,7 +146,19 @@ allOf:
properties:
compatible:
contains:
- pattern: '^qcom,adreno-[3-5][0-9][0-9]\.[0-9]+$'
+ enum:
+ - qcom,adreno-305.18
+ - qcom,adreno-306.0
+ - qcom,adreno-306.32
+ - qcom,adreno-320.2
+ - qcom,adreno-330.1
+ - qcom,adreno-330.2
+ - qcom,adreno-405.0
+ - qcom,adreno-508.0
+ - qcom,adreno-509.0
+ - qcom,adreno-512.0
+ - qcom,adreno-530.2
+ - qcom,adreno-540.1
then:
properties:
@@ -180,6 +192,75 @@ allOf:
- clocks
- clock-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,adreno-505.0
+ - qcom,adreno-506.0
+
+ then:
+ properties:
+ clocks:
+ minItems: 6
+ maxItems: 6
+
+ clock-names:
+ items:
+ - const: alt_mem_iface
+ description: GPU Alternative Memory Interface clock
+ - const: alwayson
+ description: GPU Always-On clock
+ - const: core
+ description: GPU Core clock
+ - const: iface
+ description: GPU Interface clock
+ - const: mem_iface
+ description: GPU Memory Interface clock
+ - const: rbbmtimer
+ description: GPU RBBM Timer for Adreno 5xx series
+ minItems: 6
+ maxItems: 6
+
+ required:
+ - clocks
+ - clock-names
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,adreno-510.0
+
+ then:
+ properties:
+ clocks:
+ minItems: 6
+ maxItems: 6
+
+ clock-names:
+ items:
+ - const: alwayson
+ description: GPU Always-On clock
+ - const: core
+ description: GPU Core clock
+ - const: iface
+ description: GPU Interface clock
+ - const: mem
+ description: GPU Memory clock
+ - const: mem_iface
+ description: GPU Memory Interface clock
+ - const: rbbmtimer
+ description: GPU RBBM Timer for Adreno 5xx series
+ minItems: 6
+ maxItems: 6
+
+ required:
+ - clocks
+ - clock-names
+
- if:
properties:
compatible:
--
2.49.0
On Mon, 21 Apr 2025 05:09:21 +0200, Barnabás Czémán wrote:
> Adreno 505/506/510 have previously undocumented alwayson clock.
> Document clocks for them and enforce their order.
>
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
> .../devicetree/bindings/display/msm/gpu.yaml | 83 +++++++++++++++++++++-
> 1 file changed, 82 insertions(+), 1 deletion(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/msm/gpu.yaml: allOf:1:then:properties:clock-names: {'items': [{'const': 'alt_mem_iface', 'description': 'GPU Alternative Memory Interface clock'}, {'const': 'alwayson', 'description': 'GPU Always-On clock'}, {'const': 'core', 'description': 'GPU Core clock'}, {'const': 'iface', 'description': 'GPU Interface clock'}, {'const': 'mem_iface', 'description': 'GPU Memory Interface clock'}, {'const': 'rbbmtimer', 'description': 'GPU RBBM Timer for Adreno 5xx series'}], 'minItems': 6, 'maxItems': 6} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/msm/gpu.yaml: allOf:1:then:properties:clock-names: 'oneOf' conditional failed, one must be fixed:
[{'const': 'alt_mem_iface', 'description': 'GPU Alternative Memory Interface clock'}, {'const': 'alwayson', 'description': 'GPU Always-On clock'}, {'const': 'core', 'description': 'GPU Core clock'}, {'const': 'iface', 'description': 'GPU Interface clock'}, {'const': 'mem_iface', 'description': 'GPU Memory Interface clock'}, {'const': 'rbbmtimer', 'description': 'GPU RBBM Timer for Adreno 5xx series'}] is too long
[{'const': 'alt_mem_iface', 'description': 'GPU Alternative Memory Interface clock'}, {'const': 'alwayson', 'description': 'GPU Always-On clock'}, {'const': 'core', 'description': 'GPU Core clock'}, {'const': 'iface', 'description': 'GPU Interface clock'}, {'const': 'mem_iface', 'description': 'GPU Memory Interface clock'}, {'const': 'rbbmtimer', 'description': 'GPU RBBM Timer for Adreno 5xx series'}] is too short
False schema does not allow 6
1 was expected
6 is greater than the maximum of 2
6 is greater than the maximum of 3
6 is greater than the maximum of 4
6 is greater than the maximum of 5
hint: "minItems" is only needed if less than the "items" list length
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/msm/gpu.yaml: allOf:2:then:properties:clock-names: {'items': [{'const': 'alwayson', 'description': 'GPU Always-On clock'}, {'const': 'core', 'description': 'GPU Core clock'}, {'const': 'iface', 'description': 'GPU Interface clock'}, {'const': 'mem', 'description': 'GPU Memory clock'}, {'const': 'mem_iface', 'description': 'GPU Memory Interface clock'}, {'const': 'rbbmtimer', 'description': 'GPU RBBM Timer for Adreno 5xx series'}], 'minItems': 6, 'maxItems': 6} should not be valid under {'required': ['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/msm/gpu.yaml: allOf:2:then:properties:clock-names: 'oneOf' conditional failed, one must be fixed:
[{'const': 'alwayson', 'description': 'GPU Always-On clock'}, {'const': 'core', 'description': 'GPU Core clock'}, {'const': 'iface', 'description': 'GPU Interface clock'}, {'const': 'mem', 'description': 'GPU Memory clock'}, {'const': 'mem_iface', 'description': 'GPU Memory Interface clock'}, {'const': 'rbbmtimer', 'description': 'GPU RBBM Timer for Adreno 5xx series'}] is too long
[{'const': 'alwayson', 'description': 'GPU Always-On clock'}, {'const': 'core', 'description': 'GPU Core clock'}, {'const': 'iface', 'description': 'GPU Interface clock'}, {'const': 'mem', 'description': 'GPU Memory clock'}, {'const': 'mem_iface', 'description': 'GPU Memory Interface clock'}, {'const': 'rbbmtimer', 'description': 'GPU RBBM Timer for Adreno 5xx series'}] is too short
False schema does not allow 6
1 was expected
6 is greater than the maximum of 2
6 is greater than the maximum of 3
6 is greater than the maximum of 4
6 is greater than the maximum of 5
hint: "minItems" is only needed if less than the "items" list length
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250421-a5xx-schema-v1-1-7d96b889322a@mainlining.org
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
© 2016 - 2025 Red Hat, Inc.