diff mbox series

[1/4] dt-bindings: gpu: mali-bifrost: Allow up to two clocks

Message ID 20211126151729.1026566-2-knaerzche@gmail.com (mailing list archive)
State New, archived
Headers show
Series add GPU for RK356x SoCs | expand

Commit Message

Alex Bee Nov. 26, 2021, 3:17 p.m. UTC
Commit b681af0bc1cc ("drm: panfrost: add optional bus_clock")
added an optional bus_clock to support Allwinner H6 T-720 GPU.
Increase the max clock items in the dt-binding to reflect this.

Bifrost GPU in Rockchip RK3568 SoCs also has a core and a bus clock
and it gets added here in a (very) similar way it was done for
allwinner,sun50i-h6-mali compatible in arm,mali-midgard binding.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
 .../bindings/gpu/arm,mali-bifrost.yaml        | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

Comments

Rob Herring Dec. 1, 2021, 11:31 p.m. UTC | #1
On Fri, Nov 26, 2021 at 04:17:26PM +0100, Alex Bee wrote:
> Commit b681af0bc1cc ("drm: panfrost: add optional bus_clock")
> added an optional bus_clock to support Allwinner H6 T-720 GPU.

That's midgard and this is bifrost... Driver changes are somewhat 
irrelevant.

> Increase the max clock items in the dt-binding to reflect this.
> 
> Bifrost GPU in Rockchip RK3568 SoCs also has a core and a bus clock
> and it gets added here in a (very) similar way it was done for
> allwinner,sun50i-h6-mali compatible in arm,mali-midgard binding.

I guess that one is insufficient.

> 
> Signed-off-by: Alex Bee <knaerzche@gmail.com>
> ---
>  .../bindings/gpu/arm,mali-bifrost.yaml        | 20 ++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> index 6f98dd55fb4c..2849a7a97d73 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> @@ -39,7 +39,14 @@ properties:
>        - const: gpu
>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
> +
> +  clock-names:
> +    minItems: 1
> +    items:
> +      - const: core
> +      - const: bus
>  
>    mali-supply: true
>  
> @@ -118,6 +125,17 @@ allOf:
>          power-domains:
>            maxItems: 1
>          sram-supply: false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: rockchip,rk3568-mali
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 2

           clock-names:
             minItems: 2

> +      required:
> +        - clock-names

       else:
         properties:
           clocks: 
             maxItems: 1

           clock-names: 
             maxItems: 1

>  
>  examples:
>    - |
> -- 
> 2.30.2
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
index 6f98dd55fb4c..2849a7a97d73 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
@@ -39,7 +39,14 @@  properties:
       - const: gpu
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: core
+      - const: bus
 
   mali-supply: true
 
@@ -118,6 +125,17 @@  allOf:
         power-domains:
           maxItems: 1
         sram-supply: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3568-mali
+    then:
+      properties:
+        clocks:
+          minItems: 2
+      required:
+        - clock-names
 
 examples:
   - |