diff mbox series

[v2,17/19] dt-bindings: serial: fsl-lpuart: Fix compatible matching

Message ID 20200824162652.21047-17-krzk@kernel.org
State New
Headers show
Series [v2,01/19] dt-bindings: gpio: fsl-imx-gpio: Add i.MX 8 compatibles | expand

Commit Message

Krzysztof Kozlowski Aug. 24, 2020, 4:26 p.m. UTC
The i.MX 8QXP DTSes use two compatibles so update the binding to fix
dtbs_check warnings like:

  arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000:
    compatible: ['fsl,imx8qxp-lpuart', 'fsl,imx7ulp-lpuart'] is too long
    From schema: Documentation/devicetree/bindings/serial/fsl-lpuart.yaml

  arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000:
    compatible: Additional items are not allowed ('fsl,imx7ulp-lpuart' was unexpected)

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. New patch.
---
 .../devicetree/bindings/serial/fsl-lpuart.yaml | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

Comments

Rob Herring Aug. 25, 2020, 2:42 a.m. UTC | #1
On Mon, Aug 24, 2020 at 06:26:50PM +0200, Krzysztof Kozlowski wrote:
> The i.MX 8QXP DTSes use two compatibles so update the binding to fix
> dtbs_check warnings like:
> 
>   arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000:
>     compatible: ['fsl,imx8qxp-lpuart', 'fsl,imx7ulp-lpuart'] is too long
>     From schema: Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> 
>   arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000:
>     compatible: Additional items are not allowed ('fsl,imx7ulp-lpuart' was unexpected)
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Changes since v1:
> 1. New patch.
> ---
>  .../devicetree/bindings/serial/fsl-lpuart.yaml | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> index e82c2cf9fef7..8ee651f2ef0b 100644
> --- a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> +++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> @@ -14,13 +14,17 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - fsl,vf610-lpuart
> -      - fsl,ls1021a-lpuart
> -      - fsl,ls1028a-lpuart
> -      - fsl,imx7ulp-lpuart
> -      - fsl,imx8qxp-lpuart
> -      - fsl,imx8qm-lpuart
> +    oneOf:
> +      - enum:
> +          - fsl,vf610-lpuart
> +          - fsl,ls1021a-lpuart
> +          - fsl,ls1028a-lpuart
> +          - fsl,imx7ulp-lpuart
> +          - fsl,imx8qxp-lpuart

This should be dropped.

> +          - fsl,imx8qm-lpuart
> +      - items:
> +          - const: fsl,imx8qxp-lpuart
> +          - const: fsl,imx7ulp-lpuart
>  
>    reg:
>      maxItems: 1
> -- 
> 2.17.1
>
Krzysztof Kozlowski Aug. 25, 2020, 7:55 a.m. UTC | #2
On Mon, Aug 24, 2020 at 08:42:26PM -0600, Rob Herring wrote:
> On Mon, Aug 24, 2020 at 06:26:50PM +0200, Krzysztof Kozlowski wrote:
> > The i.MX 8QXP DTSes use two compatibles so update the binding to fix
> > dtbs_check warnings like:
> > 
> >   arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000:
> >     compatible: ['fsl,imx8qxp-lpuart', 'fsl,imx7ulp-lpuart'] is too long
> >     From schema: Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> > 
> >   arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000:
> >     compatible: Additional items are not allowed ('fsl,imx7ulp-lpuart' was unexpected)
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > 
> > ---
> > 
> > Changes since v1:
> > 1. New patch.
> > ---
> >  .../devicetree/bindings/serial/fsl-lpuart.yaml | 18 +++++++++++-------
> >  1 file changed, 11 insertions(+), 7 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> > index e82c2cf9fef7..8ee651f2ef0b 100644
> > --- a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> > +++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
> > @@ -14,13 +14,17 @@ allOf:
> >  
> >  properties:
> >    compatible:
> > -    enum:
> > -      - fsl,vf610-lpuart
> > -      - fsl,ls1021a-lpuart
> > -      - fsl,ls1028a-lpuart
> > -      - fsl,imx7ulp-lpuart
> > -      - fsl,imx8qxp-lpuart
> > -      - fsl,imx8qm-lpuart
> > +    oneOf:
> > +      - enum:
> > +          - fsl,vf610-lpuart
> > +          - fsl,ls1021a-lpuart
> > +          - fsl,ls1028a-lpuart
> > +          - fsl,imx7ulp-lpuart
> > +          - fsl,imx8qxp-lpuart
> 
> This should be dropped.

Right.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
index e82c2cf9fef7..8ee651f2ef0b 100644
--- a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
+++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml
@@ -14,13 +14,17 @@  allOf:
 
 properties:
   compatible:
-    enum:
-      - fsl,vf610-lpuart
-      - fsl,ls1021a-lpuart
-      - fsl,ls1028a-lpuart
-      - fsl,imx7ulp-lpuart
-      - fsl,imx8qxp-lpuart
-      - fsl,imx8qm-lpuart
+    oneOf:
+      - enum:
+          - fsl,vf610-lpuart
+          - fsl,ls1021a-lpuart
+          - fsl,ls1028a-lpuart
+          - fsl,imx7ulp-lpuart
+          - fsl,imx8qxp-lpuart
+          - fsl,imx8qm-lpuart
+      - items:
+          - const: fsl,imx8qxp-lpuart
+          - const: fsl,imx7ulp-lpuart
 
   reg:
     maxItems: 1