linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
@ 2023-05-08  7:18 Krzysztof Kozlowski
  2023-05-08  7:34 ` Hongxing Zhu
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-08  7:18 UTC (permalink / raw)
  To: Richard Zhu, Lucas Stach, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

assigned-clocks are a dependency of clocks, however the dtschema has
limitation and expects clocks to be present in the binding using
assigned-clocks, not in other referenced bindings.  The clocks were
defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml.  The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings:

  Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000:
    Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
  From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml

Fix this by moving clocks to each specific schema from the common one
and narrowing them to strictly match what is expected for given device.

Fixes: b10f82380eeb ("dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Patch for current cycle (v6.4-rc).   Please take directly as fixes or
let me know, so I will send it to Linus.
---
 .../bindings/pci/fsl,imx6q-pcie-common.yaml   | 13 +---
 .../bindings/pci/fsl,imx6q-pcie-ep.yaml       | 38 +++++++++
 .../bindings/pci/fsl,imx6q-pcie.yaml          | 77 +++++++++++++++++++
 3 files changed, 117 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
index 9bff8ecb653c..d91b639ae7ae 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
@@ -17,20 +17,11 @@ description:
 properties:
   clocks:
     minItems: 3
-    items:
-      - description: PCIe bridge clock.
-      - description: PCIe bus clock.
-      - description: PCIe PHY clock.
-      - description: Additional required clock entry for imx6sx-pcie,
-           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
+    maxItems: 4
 
   clock-names:
     minItems: 3
-    items:
-      - const: pcie
-      - const: pcie_bus
-      - enum: [ pcie_phy, pcie_aux ]
-      - enum: [ pcie_inbound_axi, pcie_aux ]
+    maxItems: 4
 
   num-lanes:
     const: 1
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
index f4a328ec1daa..ee155ed5f181 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
@@ -31,6 +31,19 @@ properties:
       - const: dbi
       - const: addr_space
 
+  clocks:
+    minItems: 3
+    items:
+      - description: PCIe bridge clock.
+      - description: PCIe bus clock.
+      - description: PCIe PHY clock.
+      - description: Additional required clock entry for imx6sx-pcie,
+           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
+
+  clock-names:
+    minItems: 3
+    maxItems: 4
+
   interrupts:
     items:
       - description: builtin eDMA interrupter.
@@ -49,6 +62,31 @@ required:
 allOf:
   - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
   - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
+  - if:
+      properties:
+        compatible:
+          enum:
+            - fsl,imx8mq-pcie-ep
+    then:
+      properties:
+        clocks:
+          minItems: 4
+        clock-names:
+          items:
+            - const: pcie
+            - const: pcie_bus
+            - const: pcie_phy
+            - const: pcie_aux
+    else:
+      properties:
+        clocks:
+          maxItems: 3
+        clock-names:
+          items:
+            - const: pcie
+            - const: pcie_bus
+            - const: pcie_aux
+
 
 unevaluatedProperties: false
 
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
index 2443641754d3..81bbb8728f0f 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
@@ -40,6 +40,19 @@ properties:
       - const: dbi
       - const: config
 
+  clocks:
+    minItems: 3
+    items:
+      - description: PCIe bridge clock.
+      - description: PCIe bus clock.
+      - description: PCIe PHY clock.
+      - description: Additional required clock entry for imx6sx-pcie,
+           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
+
+  clock-names:
+    minItems: 3
+    maxItems: 4
+
   interrupts:
     items:
       - description: builtin MSI controller.
@@ -77,6 +90,70 @@ required:
 allOf:
   - $ref: /schemas/pci/snps,dw-pcie.yaml#
   - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
+  - if:
+      properties:
+        compatible:
+          enum:
+            - fsl,imx6sx-pcie
+    then:
+      properties:
+        clocks:
+          minItems: 4
+        clock-names:
+          items:
+            - const: pcie
+            - const: pcie_bus
+            - const: pcie_phy
+            - const: pcie_inbound_axi
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - fsl,imx8mq-pcie
+    then:
+      properties:
+        clocks:
+          minItems: 4
+        clock-names:
+          items:
+            - const: pcie
+            - const: pcie_bus
+            - const: pcie_phy
+            - const: pcie_aux
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - fsl,imx6q-pcie
+            - fsl,imx6qp-pcie
+            - fsl,imx7d-pcie
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+        clock-names:
+          items:
+            - const: pcie
+            - const: pcie_bus
+            - const: pcie_phy
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - fsl,imx8mm-pcie
+            - fsl,imx8mp-pcie
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+        clock-names:
+          items:
+            - const: pcie
+            - const: pcie_bus
+            - const: pcie_aux
 
 unevaluatedProperties: false
 
-- 
2.34.1


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

* RE: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  7:18 [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning Krzysztof Kozlowski
@ 2023-05-08  7:34 ` Hongxing Zhu
  2023-05-08  8:23 ` Conor Dooley
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Hongxing Zhu @ 2023-05-08  7:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Lucas Stach, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczy��ski,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dl-linux-imx, linux-pci, linux-arm-kernel, devicetree,
	linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 7671 bytes --]

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 2023Äê5ÔÂ8ÈÕ 15:19
> To: Hongxing Zhu <hongxing.zhu@nxp.com>; Lucas Stach
> <l.stach@pengutronix.de>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo
> Pieralisi <lpieralisi@kernel.org>; Krzysztof Wilczy¨½ski <kw@linux.com>; Rob
> Herring <robh@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>;
> Shawn Guo <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>;
> Pengutronix Kernel Team <kernel@pengutronix.de>; Fabio Estevam
> <festevam@gmail.com>; dl-linux-imx <linux-imx@nxp.com>;
> linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Subject: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
> 
> assigned-clocks are a dependency of clocks, however the dtschema has limitation
> and expects clocks to be present in the binding using assigned-clocks, not in other
> referenced bindings.  The clocks were defined in common
> fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml.
> The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings:
> 
>   Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb:
> pcie-ep@33800000:
>     Unevaluated properties are not allowed ('assigned-clock-parents',
> 'assigned-clock-rates', 'assigned-clocks' were unexpected)
>   From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> 
> Fix this by moving clocks to each specific schema from the common one and
> narrowing them to strictly match what is expected for given device.
> 
> Fixes: b10f82380eeb ("dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>

Best Regards
Richard Zhu
> 
> ---
> 
> Patch for current cycle (v6.4-rc).   Please take directly as fixes or
> let me know, so I will send it to Linus.
> ---
>  .../bindings/pci/fsl,imx6q-pcie-common.yaml   | 13 +---
>  .../bindings/pci/fsl,imx6q-pcie-ep.yaml       | 38 +++++++++
>  .../bindings/pci/fsl,imx6q-pcie.yaml          | 77 +++++++++++++++++++
>  3 files changed, 117 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
> b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
> index 9bff8ecb653c..d91b639ae7ae 100644
> --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
> +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
> @@ -17,20 +17,11 @@ description:
>  properties:
>    clocks:
>      minItems: 3
> -    items:
> -      - description: PCIe bridge clock.
> -      - description: PCIe bus clock.
> -      - description: PCIe PHY clock.
> -      - description: Additional required clock entry for imx6sx-pcie,
> -           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
> +    maxItems: 4
> 
>    clock-names:
>      minItems: 3
> -    items:
> -      - const: pcie
> -      - const: pcie_bus
> -      - enum: [ pcie_phy, pcie_aux ]
> -      - enum: [ pcie_inbound_axi, pcie_aux ]
> +    maxItems: 4
> 
>    num-lanes:
>      const: 1
> diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> index f4a328ec1daa..ee155ed5f181 100644
> --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> @@ -31,6 +31,19 @@ properties:
>        - const: dbi
>        - const: addr_space
> 
> +  clocks:
> +    minItems: 3
> +    items:
> +      - description: PCIe bridge clock.
> +      - description: PCIe bus clock.
> +      - description: PCIe PHY clock.
> +      - description: Additional required clock entry for imx6sx-pcie,
> +           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
> +
> +  clock-names:
> +    minItems: 3
> +    maxItems: 4
> +
>    interrupts:
>      items:
>        - description: builtin eDMA interrupter.
> @@ -49,6 +62,31 @@ required:
>  allOf:
>    - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
>    - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx8mq-pcie-ep
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +            - const: pcie_aux
> +    else:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_aux
> +
> 
>  unevaluatedProperties: false
> 
> diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> index 2443641754d3..81bbb8728f0f 100644
> --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> @@ -40,6 +40,19 @@ properties:
>        - const: dbi
>        - const: config
> 
> +  clocks:
> +    minItems: 3
> +    items:
> +      - description: PCIe bridge clock.
> +      - description: PCIe bus clock.
> +      - description: PCIe PHY clock.
> +      - description: Additional required clock entry for imx6sx-pcie,
> +           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
> +
> +  clock-names:
> +    minItems: 3
> +    maxItems: 4
> +
>    interrupts:
>      items:
>        - description: builtin MSI controller.
> @@ -77,6 +90,70 @@ required:
>  allOf:
>    - $ref: /schemas/pci/snps,dw-pcie.yaml#
>    - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx6sx-pcie
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +            - const: pcie_inbound_axi
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx8mq-pcie
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +            - const: pcie_aux
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx6q-pcie
> +            - fsl,imx6qp-pcie
> +            - fsl,imx7d-pcie
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx8mm-pcie
> +            - fsl,imx8mp-pcie
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_aux
> 
>  unevaluatedProperties: false
> 
> --
> 2.34.1


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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  7:18 [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning Krzysztof Kozlowski
  2023-05-08  7:34 ` Hongxing Zhu
@ 2023-05-08  8:23 ` Conor Dooley
  2023-05-08  9:22   ` Krzysztof Kozlowski
  2023-05-08  8:27 ` Rob Herring
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Conor Dooley @ 2023-05-08  8:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Richard Zhu, Lucas Stach, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel,
	devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3596 bytes --]

On Mon, May 08, 2023 at 09:18:37AM +0200, Krzysztof Kozlowski wrote:
> @@ -49,6 +62,31 @@ required:
>  allOf:
>    - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
>    - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx8mq-pcie-ep

How come this is enum rather than const (and same for the other
single-compatible ones below)?

Cheers,
Conor.

> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +            - const: pcie_aux
> +    else:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_aux
> +
>  
>  unevaluatedProperties: false
>  
> diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> index 2443641754d3..81bbb8728f0f 100644
> --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> @@ -40,6 +40,19 @@ properties:
>        - const: dbi
>        - const: config
>  
> +  clocks:
> +    minItems: 3
> +    items:
> +      - description: PCIe bridge clock.
> +      - description: PCIe bus clock.
> +      - description: PCIe PHY clock.
> +      - description: Additional required clock entry for imx6sx-pcie,
> +           imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep.
> +
> +  clock-names:
> +    minItems: 3
> +    maxItems: 4
> +
>    interrupts:
>      items:
>        - description: builtin MSI controller.
> @@ -77,6 +90,70 @@ required:
>  allOf:
>    - $ref: /schemas/pci/snps,dw-pcie.yaml#
>    - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx6sx-pcie
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +            - const: pcie_inbound_axi
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx8mq-pcie
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +            - const: pcie_aux
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx6q-pcie
> +            - fsl,imx6qp-pcie
> +            - fsl,imx7d-pcie
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_phy
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - fsl,imx8mm-pcie
> +            - fsl,imx8mp-pcie
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: pcie
> +            - const: pcie_bus
> +            - const: pcie_aux
>  
>  unevaluatedProperties: false
>  
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  7:18 [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning Krzysztof Kozlowski
  2023-05-08  7:34 ` Hongxing Zhu
  2023-05-08  8:23 ` Conor Dooley
@ 2023-05-08  8:27 ` Rob Herring
  2023-05-08 21:35 ` Bjorn Helgaas
  2023-05-09  6:02 ` Krzysztof Kozlowski
  4 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2023-05-08  8:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lucas Stach, Krzysztof Kozlowski, linux-kernel, Conor Dooley,
	Bjorn Helgaas, Shawn Guo, linux-arm-kernel, Richard Zhu,
	NXP Linux Team, devicetree, Fabio Estevam,
	Pengutronix Kernel Team, Sascha Hauer, Krzysztof Wilczyński,
	Lorenzo Pieralisi, linux-pci


On Mon, 08 May 2023 09:18:37 +0200, Krzysztof Kozlowski wrote:
> assigned-clocks are a dependency of clocks, however the dtschema has
> limitation and expects clocks to be present in the binding using
> assigned-clocks, not in other referenced bindings.  The clocks were
> defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml.  The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings:
> 
>   Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000:
>     Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
>   From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> 
> Fix this by moving clocks to each specific schema from the common one
> and narrowing them to strictly match what is expected for given device.
> 
> Fixes: b10f82380eeb ("dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Patch for current cycle (v6.4-rc).   Please take directly as fixes or
> let me know, so I will send it to Linus.
> ---
>  .../bindings/pci/fsl,imx6q-pcie-common.yaml   | 13 +---
>  .../bindings/pci/fsl,imx6q-pcie-ep.yaml       | 38 +++++++++
>  .../bindings/pci/fsl,imx6q-pcie.yaml          | 77 +++++++++++++++++++
>  3 files changed, 117 insertions(+), 11 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml

doc reference errors (make refcheckdocs):
Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst
MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230508071837.68552-1-krzysztof.kozlowski@linaro.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.


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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  8:23 ` Conor Dooley
@ 2023-05-08  9:22   ` Krzysztof Kozlowski
  2023-05-08 16:25     ` Conor Dooley
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-08  9:22 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Richard Zhu, Lucas Stach, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel,
	devicetree, linux-kernel

On 08/05/2023 10:23, Conor Dooley wrote:
> On Mon, May 08, 2023 at 09:18:37AM +0200, Krzysztof Kozlowski wrote:
>> @@ -49,6 +62,31 @@ required:
>>  allOf:
>>    - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
>>    - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          enum:
>> +            - fsl,imx8mq-pcie-ep
> 
> How come this is enum rather than const (and same for the other
> single-compatible ones below)?

I assume the list might grow, so enum will spare one indentation change.

Best regards,
Krzysztof


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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  9:22   ` Krzysztof Kozlowski
@ 2023-05-08 16:25     ` Conor Dooley
  0 siblings, 0 replies; 9+ messages in thread
From: Conor Dooley @ 2023-05-08 16:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, Richard Zhu, Lucas Stach, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-pci, linux-arm-kernel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

On Mon, May 08, 2023 at 11:22:36AM +0200, Krzysztof Kozlowski wrote:
> On 08/05/2023 10:23, Conor Dooley wrote:
> > On Mon, May 08, 2023 at 09:18:37AM +0200, Krzysztof Kozlowski wrote:
> >> @@ -49,6 +62,31 @@ required:
> >>  allOf:
> >>    - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
> >>    - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml#
> >> +  - if:
> >> +      properties:
> >> +        compatible:
> >> +          enum:
> >> +            - fsl,imx8mq-pcie-ep
> > 
> > How come this is enum rather than const (and same for the other
> > single-compatible ones below)?
> 
> I assume the list might grow, so enum will spare one indentation change.

Figured it'd be either that or consistency across the entries.

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  7:18 [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-05-08  8:27 ` Rob Herring
@ 2023-05-08 21:35 ` Bjorn Helgaas
  2023-05-09  6:03   ` Krzysztof Kozlowski
  2023-05-09  6:02 ` Krzysztof Kozlowski
  4 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2023-05-08 21:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Richard Zhu, Lucas Stach, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel,
	devicetree, linux-kernel

On Mon, May 08, 2023 at 09:18:37AM +0200, Krzysztof Kozlowski wrote:
> assigned-clocks are a dependency of clocks, however the dtschema has
> limitation and expects clocks to be present in the binding using
> assigned-clocks, not in other referenced bindings.  The clocks were
> defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml.  The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings:

Weirdly long line here.  I think it's good to preserve longs lines in
warnings and error messages themselves, but in the normal text it
looks like an oversight.

>   Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000:
>     Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
>   From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml

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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08  7:18 [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-05-08 21:35 ` Bjorn Helgaas
@ 2023-05-09  6:02 ` Krzysztof Kozlowski
  4 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09  6:02 UTC (permalink / raw)
  To: Richard Zhu, Lucas Stach, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel,
	devicetree, linux-kernel, Krzysztof Kozlowski


On Mon, 08 May 2023 09:18:37 +0200, Krzysztof Kozlowski wrote:
> assigned-clocks are a dependency of clocks, however the dtschema has
> limitation and expects clocks to be present in the binding using
> assigned-clocks, not in other referenced bindings.  The clocks were
> defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml.  The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings:
> 
>   Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000:
>     Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
>   From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> 
> [...]

Applied, thanks!

[1/1] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
      https://git.kernel.org/krzk/linux-dt/c/8bbec86ce6d66fb33530c679f7bb3a123fc9e7da

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

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

* Re: [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning
  2023-05-08 21:35 ` Bjorn Helgaas
@ 2023-05-09  6:03   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-09  6:03 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Richard Zhu, Lucas Stach, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-pci, linux-arm-kernel,
	devicetree, linux-kernel

On 08/05/2023 23:35, Bjorn Helgaas wrote:
> On Mon, May 08, 2023 at 09:18:37AM +0200, Krzysztof Kozlowski wrote:
>> assigned-clocks are a dependency of clocks, however the dtschema has
>> limitation and expects clocks to be present in the binding using
>> assigned-clocks, not in other referenced bindings.  The clocks were
>> defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml.  The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings:
> 
> Weirdly long line here.  I think it's good to preserve longs lines in
> warnings and error messages themselves, but in the normal text it
> looks like an oversight.

Thanks, somehow I missed it. I fixed it and applied. Let me know if you
would prefer to take it.

Best regards,
Krzysztof


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08  7:18 [PATCH fixes] dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning Krzysztof Kozlowski
2023-05-08  7:34 ` Hongxing Zhu
2023-05-08  8:23 ` Conor Dooley
2023-05-08  9:22   ` Krzysztof Kozlowski
2023-05-08 16:25     ` Conor Dooley
2023-05-08  8:27 ` Rob Herring
2023-05-08 21:35 ` Bjorn Helgaas
2023-05-09  6:03   ` Krzysztof Kozlowski
2023-05-09  6:02 ` Krzysztof Kozlowski

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).