diff mbox series

[6/7] dt-bindings: soc: imx: add missing iomuxc gpr binding

Message ID 20210715082536.1882077-7-aisheng.dong@nxp.com
State New
Headers show
Series dt-bindings: imx8mp: fix dt schema check errors | expand

Commit Message

Aisheng Dong July 15, 2021, 8:25 a.m. UTC
The General Purpose Registers IOMUXC_GPR are used to select operating
modes for general features in the SoC, usually not related to the IOMUX
itself.

This binding doc is generated based on the exist usage in dts
in order to fix dt schema check failures.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 .../devicetree/bindings/soc/imx/fsl,gpr.yaml  | 69 +++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

Comments

Rob Herring (Arm) July 15, 2021, 1:54 p.m. UTC | #1
On Thu, 15 Jul 2021 16:25:35 +0800, Dong Aisheng wrote:
> The General Purpose Registers IOMUXC_GPR are used to select operating
> modes for general features in the SoC, usually not related to the IOMUX
> itself.
> 
> This binding doc is generated based on the exist usage in dts
> in order to fix dt schema check failures.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  .../devicetree/bindings/soc/imx/fsl,gpr.yaml  | 69 +++++++++++++++++++
>  1 file changed, 69 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml
> 

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/linux-dt-review/Documentation/devicetree/bindings/mfd/syscon.example.dt.yaml: iomuxc-gpr@20e0000: compatible: 'oneOf' conditional failed, one must be fixed:
	['fsl,imx6q-iomuxc-gpr', 'syscon'] is too short
	'fsl,imx53-iomuxc-gpr' was expected
	'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx6sl-iomuxc-gpr', 'fsl,imx6sll-iomuxc-gpr', 'fsl,imx6sx-iomuxc-gpr', 'fsl,imx6ul-iomuxc-gpr', 'fsl,imx7d-iomuxc-gpr']
	'fsl,imx7d-iomuxc-gpr' was expected
	'fsl,imx8mq-iomuxc-gpr' was expected
	'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx8mm-iomuxc-gpr', 'fsl,imx8mn-iomuxc-gpr', 'fsl,imx8mp-iomuxc-gpr']
	'fsl,imx6q-iomuxc-gpr' was expected
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml
\ndoc reference errors (make refcheckdocs):
Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
MAINTAINERS: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt

See https://patchwork.ozlabs.org/patch/1505583

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.
Dong Aisheng July 16, 2021, 3:28 a.m. UTC | #2
Hi Rob,

On Thu, Jul 15, 2021 at 9:54 PM Rob Herring <robh@kernel.org> wrote:
>

> On Thu, 15 Jul 2021 16:25:35 +0800, Dong Aisheng wrote:

> > The General Purpose Registers IOMUXC_GPR are used to select operating

> > modes for general features in the SoC, usually not related to the IOMUX

> > itself.

> >

> > This binding doc is generated based on the exist usage in dts

> > in order to fix dt schema check failures.

> >

> > Cc: Rob Herring <robh+dt@kernel.org>

> > Cc: Shawn Guo <shawnguo@kernel.org>

> > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

> > ---

> >  .../devicetree/bindings/soc/imx/fsl,gpr.yaml  | 69 +++++++++++++++++++

> >  1 file changed, 69 insertions(+)

> >  create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

> >

>

> 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/linux-dt-review/Documentation/devicetree/bindings/mfd/syscon.example.dt.yaml: iomuxc-gpr@20e0000: compatible: 'oneOf' conditional failed, one must be fixed:

>         ['fsl,imx6q-iomuxc-gpr', 'syscon'] is too short

>         'fsl,imx53-iomuxc-gpr' was expected

>         'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx6sl-iomuxc-gpr', 'fsl,imx6sll-iomuxc-gpr', 'fsl,imx6sx-iomuxc-gpr', 'fsl,imx6ul-iomuxc-gpr', 'fsl,imx7d-iomuxc-gpr']

>         'fsl,imx7d-iomuxc-gpr' was expected

>         'fsl,imx8mq-iomuxc-gpr' was expected

>         'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx8mm-iomuxc-gpr', 'fsl,imx8mn-iomuxc-gpr', 'fsl,imx8mp-iomuxc-gpr']

>         'fsl,imx6q-iomuxc-gpr' was expected

>         From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

> \ndoc reference errors (make refcheckdocs):

> Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt

> MAINTAINERS: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt


The example in syscon.yaml is invalid and needs change as follows.
However, should I do it in a separate patch cause they're changes for
two irrelevant binding
files or merge into this one ?

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml
b/Documentation/devicetree/bindings/mfd/syscon.yaml
index f14ae6da0068..11eae4c5848e 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -90,7 +90,7 @@ examples:

   - |
     gpr: iomuxc-gpr@20e0000 {
-        compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
+        compatible = "fsl,imx6q-iomuxc-gpr", "syscon", "mfd";
         reg = <0x020e0000 0x38>;
         hwlocks = <&hwlock1 1>;
     };

Regards
Aisheng


>

> See https://patchwork.ozlabs.org/patch/1505583

>

> This check can fail if there are any dependencies. The base for a patch

> series is generally the most recent rc1.

>

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

>
Rob Herring (Arm) July 28, 2021, 5:30 p.m. UTC | #3
On Thu, Jul 15, 2021 at 9:30 PM Dong Aisheng <dongas86@gmail.com> wrote:
>

> Hi Rob,

>

> On Thu, Jul 15, 2021 at 9:54 PM Rob Herring <robh@kernel.org> wrote:

> >

> > On Thu, 15 Jul 2021 16:25:35 +0800, Dong Aisheng wrote:

> > > The General Purpose Registers IOMUXC_GPR are used to select operating

> > > modes for general features in the SoC, usually not related to the IOMUX

> > > itself.

> > >

> > > This binding doc is generated based on the exist usage in dts

> > > in order to fix dt schema check failures.

> > >

> > > Cc: Rob Herring <robh+dt@kernel.org>

> > > Cc: Shawn Guo <shawnguo@kernel.org>

> > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

> > > ---

> > >  .../devicetree/bindings/soc/imx/fsl,gpr.yaml  | 69 +++++++++++++++++++

> > >  1 file changed, 69 insertions(+)

> > >  create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

> > >

> >

> > 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/linux-dt-review/Documentation/devicetree/bindings/mfd/syscon.example.dt.yaml: iomuxc-gpr@20e0000: compatible: 'oneOf' conditional failed, one must be fixed:

> >         ['fsl,imx6q-iomuxc-gpr', 'syscon'] is too short

> >         'fsl,imx53-iomuxc-gpr' was expected

> >         'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx6sl-iomuxc-gpr', 'fsl,imx6sll-iomuxc-gpr', 'fsl,imx6sx-iomuxc-gpr', 'fsl,imx6ul-iomuxc-gpr', 'fsl,imx7d-iomuxc-gpr']

> >         'fsl,imx7d-iomuxc-gpr' was expected

> >         'fsl,imx8mq-iomuxc-gpr' was expected

> >         'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx8mm-iomuxc-gpr', 'fsl,imx8mn-iomuxc-gpr', 'fsl,imx8mp-iomuxc-gpr']

> >         'fsl,imx6q-iomuxc-gpr' was expected

> >         From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

> > \ndoc reference errors (make refcheckdocs):

> > Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt

> > MAINTAINERS: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt

>

> The example in syscon.yaml is invalid and needs change as follows.

> However, should I do it in a separate patch cause they're changes for

> two irrelevant binding

> files or merge into this one ?


Separate patch.

> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml

> b/Documentation/devicetree/bindings/mfd/syscon.yaml

> index f14ae6da0068..11eae4c5848e 100644

> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml

> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml

> @@ -90,7 +90,7 @@ examples:

>

>    - |

>      gpr: iomuxc-gpr@20e0000 {

> -        compatible = "fsl,imx6q-iomuxc-gpr", "syscon";

> +        compatible = "fsl,imx6q-iomuxc-gpr", "syscon", "mfd";


I assume you mean 'simple-mfd'?

Adding that means this example doesn't really even match the
syscon.yaml, so I'd just drop the example.
Dong Aisheng Aug. 2, 2021, 11:36 a.m. UTC | #4
On Thu, Jul 29, 2021 at 1:30 AM Rob Herring <robh@kernel.org> wrote:
>

> On Thu, Jul 15, 2021 at 9:30 PM Dong Aisheng <dongas86@gmail.com> wrote:

> >

> > Hi Rob,

> >

> > On Thu, Jul 15, 2021 at 9:54 PM Rob Herring <robh@kernel.org> wrote:

> > >

> > > On Thu, 15 Jul 2021 16:25:35 +0800, Dong Aisheng wrote:

> > > > The General Purpose Registers IOMUXC_GPR are used to select operating

> > > > modes for general features in the SoC, usually not related to the IOMUX

> > > > itself.

> > > >

> > > > This binding doc is generated based on the exist usage in dts

> > > > in order to fix dt schema check failures.

> > > >

> > > > Cc: Rob Herring <robh+dt@kernel.org>

> > > > Cc: Shawn Guo <shawnguo@kernel.org>

> > > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

> > > > ---

> > > >  .../devicetree/bindings/soc/imx/fsl,gpr.yaml  | 69 +++++++++++++++++++

> > > >  1 file changed, 69 insertions(+)

> > > >  create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

> > > >

> > >

> > > 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/linux-dt-review/Documentation/devicetree/bindings/mfd/syscon.example.dt.yaml: iomuxc-gpr@20e0000: compatible: 'oneOf' conditional failed, one must be fixed:

> > >         ['fsl,imx6q-iomuxc-gpr', 'syscon'] is too short

> > >         'fsl,imx53-iomuxc-gpr' was expected

> > >         'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx6sl-iomuxc-gpr', 'fsl,imx6sll-iomuxc-gpr', 'fsl,imx6sx-iomuxc-gpr', 'fsl,imx6ul-iomuxc-gpr', 'fsl,imx7d-iomuxc-gpr']

> > >         'fsl,imx7d-iomuxc-gpr' was expected

> > >         'fsl,imx8mq-iomuxc-gpr' was expected

> > >         'fsl,imx6q-iomuxc-gpr' is not one of ['fsl,imx8mm-iomuxc-gpr', 'fsl,imx8mn-iomuxc-gpr', 'fsl,imx8mp-iomuxc-gpr']

> > >         'fsl,imx6q-iomuxc-gpr' was expected

> > >         From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml

> > > \ndoc reference errors (make refcheckdocs):

> > > Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt

> > > MAINTAINERS: Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt

> >

> > The example in syscon.yaml is invalid and needs change as follows.

> > However, should I do it in a separate patch cause they're changes for

> > two irrelevant binding

> > files or merge into this one ?

>

> Separate patch.

>

> > diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml

> > b/Documentation/devicetree/bindings/mfd/syscon.yaml

> > index f14ae6da0068..11eae4c5848e 100644

> > --- a/Documentation/devicetree/bindings/mfd/syscon.yaml

> > +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml

> > @@ -90,7 +90,7 @@ examples:

> >

> >    - |

> >      gpr: iomuxc-gpr@20e0000 {

> > -        compatible = "fsl,imx6q-iomuxc-gpr", "syscon";

> > +        compatible = "fsl,imx6q-iomuxc-gpr", "syscon", "mfd";

>

> I assume you mean 'simple-mfd'?

>

> Adding that means this example doesn't really even match the

> syscon.yaml, so I'd just drop the example.


Will drop, thanks

Regards
Aisheng
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml
new file mode 100644
index 000000000000..832b6b7e7c33
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,gpr.yaml
@@ -0,0 +1,69 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/imx/fsl,gpr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale IOMUX GPR binding
+
+maintainers:
+  - Dong Aisheng <aisheng.dong@nxp.com>
+
+description: |
+  32-bit general purpose registers - several (GPR0 to GPRn) 32-bit
+  registers according to SoC requirements for any usage.
+
+  The General Purpose Registers IOMUXC_GPR are used to select operating
+  modes for general features in the SoC, usually not related to the IOMUX
+  itself.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: fsl,imx53-iomuxc-gpr
+          - const: syscon
+      - items:
+          - const: fsl,imx6q-iomuxc-gpr
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - enum:
+              - fsl,imx6sl-iomuxc-gpr
+              - fsl,imx6sll-iomuxc-gpr
+              - fsl,imx6sx-iomuxc-gpr
+              - fsl,imx6ul-iomuxc-gpr
+              - fsl,imx7d-iomuxc-gpr
+          - const: fsl,imx6q-iomuxc-gpr
+          - const: syscon
+      - items:
+          - const: fsl,imx7d-iomuxc-gpr
+          - const: fsl,imx6q-iomuxc-gpr
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: fsl,imx8mq-iomuxc-gpr
+          - const: fsl,imx6q-iomuxc-gpr
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - enum:
+              - fsl,imx8mm-iomuxc-gpr
+              - fsl,imx8mn-iomuxc-gpr
+              - fsl,imx8mp-iomuxc-gpr
+          - const: syscon
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: true
+
+examples:
+  - |
+    gpr: iomuxc-gpr@20e0000 {
+        compatible = "fsl,imx6q-iomuxc-gpr", "syscon", "simple-mfd";
+        reg = <0x20e0000 0x38>;
+    };