diff mbox series

[v1,3/7] dt-bindings: timer: gpt: Support 3rd clock for i.MX6DL

Message ID 20230601101451.357662-4-o.rempel@pengutronix.de (mailing list archive)
State Not Applicable, archived
Headers show
Series Add support for various features to i.MX6 bindings | expand

Commit Message

Oleksij Rempel June 1, 2023, 10:14 a.m. UTC
Add support for a 3rd clock, 'osc_per', for i.MX6DL to the 'fsl,imxgpt'
binding to resolve the following dtbs_check warning:
  imx6dl-alti6p.dtb: timer@2098000: clocks: [[2, 119], [2, 120], [2, 237]]
    is too long
  From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
  imx6dl-alti6p.dtb: timer@2098000: clock-names: ['ipg', 'per', 'osc_per']
    is too long
  From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 .../devicetree/bindings/timer/fsl,imxgpt.yaml | 22 ++++++++++++++-----
 1 file changed, 16 insertions(+), 6 deletions(-)

Comments

Conor Dooley June 1, 2023, 6:22 p.m. UTC | #1
On Thu, Jun 01, 2023 at 12:14:47PM +0200, Oleksij Rempel wrote:
> Add support for a 3rd clock, 'osc_per', for i.MX6DL to the 'fsl,imxgpt'
> binding to resolve the following dtbs_check warning:
>   imx6dl-alti6p.dtb: timer@2098000: clocks: [[2, 119], [2, 120], [2, 237]]
>     is too long
>   From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
>   imx6dl-alti6p.dtb: timer@2098000: clock-names: ['ipg', 'per', 'osc_per']
>     is too long
>   From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  .../devicetree/bindings/timer/fsl,imxgpt.yaml | 22 ++++++++++++++-----
>  1 file changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> index adf617b8f353..21ff51c3f38f 100644
> --- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> +++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> @@ -46,14 +46,24 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    items:
> -      - description: SoC GPT ipg clock
> -      - description: SoC GPT per clock
> +    anyOf:
> +      - items:
> +          - description: SoC GPT ipg clock
> +          - description: SoC GPT per clock
> +      - items:
> +          - description: SoC GPT ipg clock
> +          - description: SoC GPT per clock
> +          - description: SoC GPT osc_per clock
>  
>    clock-names:
> -    items:
> -      - const: ipg
> -      - const: per
> +    anyOf:
> +      - items:
> +          - const: ipg
> +          - const: per
> +      - items:
> +          - const: ipg
> +          - const: per
> +          - const: osc_per

Hmm, should we not do per-compatible enforcement here so that the extra
clock is only used on the appropriate platforms?

Cheers,
Conor.

>  
>  required:
>    - compatible
> -- 
> 2.39.2
>
Rob Herring (Arm) June 14, 2023, 7:03 p.m. UTC | #2
On Thu, Jun 01, 2023 at 12:14:47PM +0200, Oleksij Rempel wrote:
> Add support for a 3rd clock, 'osc_per', for i.MX6DL to the 'fsl,imxgpt'
> binding to resolve the following dtbs_check warning:
>   imx6dl-alti6p.dtb: timer@2098000: clocks: [[2, 119], [2, 120], [2, 237]]
>     is too long
>   From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
>   imx6dl-alti6p.dtb: timer@2098000: clock-names: ['ipg', 'per', 'osc_per']
>     is too long
>   From schema: Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  .../devicetree/bindings/timer/fsl,imxgpt.yaml | 22 ++++++++++++++-----
>  1 file changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> index adf617b8f353..21ff51c3f38f 100644
> --- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> +++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
> @@ -46,14 +46,24 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    items:
> -      - description: SoC GPT ipg clock
> -      - description: SoC GPT per clock
> +    anyOf:

No need for anyOf. Just add the 3rd entry and 'minItems: 2'.

> +      - items:
> +          - description: SoC GPT ipg clock
> +          - description: SoC GPT per clock
> +      - items:
> +          - description: SoC GPT ipg clock
> +          - description: SoC GPT per clock
> +          - description: SoC GPT osc_per clock
>  
>    clock-names:
> -    items:
> -      - const: ipg
> -      - const: per
> +    anyOf:
> +      - items:
> +          - const: ipg
> +          - const: per
> +      - items:
> +          - const: ipg
> +          - const: per
> +          - const: osc_per
>  
>  required:
>    - compatible
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
index adf617b8f353..21ff51c3f38f 100644
--- a/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
+++ b/Documentation/devicetree/bindings/timer/fsl,imxgpt.yaml
@@ -46,14 +46,24 @@  properties:
     maxItems: 1
 
   clocks:
-    items:
-      - description: SoC GPT ipg clock
-      - description: SoC GPT per clock
+    anyOf:
+      - items:
+          - description: SoC GPT ipg clock
+          - description: SoC GPT per clock
+      - items:
+          - description: SoC GPT ipg clock
+          - description: SoC GPT per clock
+          - description: SoC GPT osc_per clock
 
   clock-names:
-    items:
-      - const: ipg
-      - const: per
+    anyOf:
+      - items:
+          - const: ipg
+          - const: per
+      - items:
+          - const: ipg
+          - const: per
+          - const: osc_per
 
 required:
   - compatible