diff mbox series

[net-next,v4,01/13] dt-bindings: net: dsa: lantiq,gswip: convert to YAML schema

Message ID 20240611114027.3136405-2-ms@dev.tdt.de (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: lantiq_gswip: code improvements | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 856 this patch: 856
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 12 of 12 maintainers
netdev/build_clang success Errors and warnings before: 854 this patch: 854
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 861 this patch: 861
netdev/checkpatch warning WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Martin Schiller June 11, 2024, 11:40 a.m. UTC
Convert the lantiq,gswip bindings to YAML format.

Also add this new file to the MAINTAINERS file.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
---
 .../bindings/net/dsa/lantiq,gswip.yaml        | 195 ++++++++++++++++++
 .../bindings/net/dsa/lantiq-gswip.txt         | 146 -------------
 MAINTAINERS                                   |   1 +
 3 files changed, 196 insertions(+), 146 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
 delete mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt

Comments

Rob Herring (Arm) June 11, 2024, 12:51 p.m. UTC | #1
On Tue, 11 Jun 2024 13:40:15 +0200, Martin Schiller wrote:
> Convert the lantiq,gswip bindings to YAML format.
> 
> Also add this new file to the MAINTAINERS file.
> 
> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
> ---
>  .../bindings/net/dsa/lantiq,gswip.yaml        | 195 ++++++++++++++++++
>  .../bindings/net/dsa/lantiq-gswip.txt         | 146 -------------
>  MAINTAINERS                                   |   1 +
>  3 files changed, 196 insertions(+), 146 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>  delete mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.example.dtb: switch@e108000: ports:port@6: 'phy-mode' is a required property
	from schema $id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.example.dtb: switch@e108000: ports:port@6: 'oneOf' conditional failed, one must be fixed:
	'fixed-link' is a required property
	'phy-handle' is a required property
	'managed' is a required property
	from schema $id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.example.dtb: switch@e108000: Unevaluated properties are not allowed ('dsa,member', 'ports' were unexpected)
	from schema $id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240611114027.3136405-2-ms@dev.tdt.de

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.
Martin Schiller June 11, 2024, 1:17 p.m. UTC | #2
On 2024-06-11 14:51, Rob Herring (Arm) wrote:
> On Tue, 11 Jun 2024 13:40:15 +0200, Martin Schiller wrote:
>> Convert the lantiq,gswip bindings to YAML format.
>> 
>> Also add this new file to the MAINTAINERS file.
>> 
>> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
>> ---
>>  .../bindings/net/dsa/lantiq,gswip.yaml        | 195 
>> ++++++++++++++++++
>>  .../bindings/net/dsa/lantiq-gswip.txt         | 146 -------------
>>  MAINTAINERS                                   |   1 +
>>  3 files changed, 196 insertions(+), 146 deletions(-)
>>  create mode 100644 
>> Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>>  delete mode 100644 
>> Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
>> 
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.example.dtb:
> switch@e108000: ports:port@6: 'phy-mode' is a required property
> 	from schema $id: 
> http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.example.dtb:
> switch@e108000: ports:port@6: 'oneOf' conditional failed, one must be
> fixed:
> 	'fixed-link' is a required property
> 	'phy-handle' is a required property
> 	'managed' is a required property
> 	from schema $id: 
> http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.example.dtb:
> switch@e108000: Unevaluated properties are not allowed ('dsa,member',
> 'ports' were unexpected)
> 	from schema $id: 
> http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
> 
> doc reference errors (make refcheckdocs):
> 
> See
> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240611114027.3136405-2-ms@dev.tdt.de
> 
> 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.

I have already run 'make dt_binding_check' and got no errors. However, I
then moved the components that are now being criticized to a separate
patch. These are exactly the properties that the original patch would
have added in the example.

I have currently put the conversion to the YAML schema in a separate
patch before adding these properties to preserve the original patch.

Should I combine both changes into one patch instead?
Rob Herring (Arm) June 11, 2024, 1:27 p.m. UTC | #3
On Tue, Jun 11, 2024 at 01:40:15PM +0200, Martin Schiller wrote:
> Convert the lantiq,gswip bindings to YAML format.
> 
> Also add this new file to the MAINTAINERS file.
> 
> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
> ---
>  .../bindings/net/dsa/lantiq,gswip.yaml        | 195 ++++++++++++++++++
>  .../bindings/net/dsa/lantiq-gswip.txt         | 146 -------------
>  MAINTAINERS                                   |   1 +
>  3 files changed, 196 insertions(+), 146 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>  delete mode 100644 Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
> new file mode 100644
> index 000000000000..14ef48d6a0ee
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
> @@ -0,0 +1,195 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Lantiq GSWIP Ethernet switches
> +
> +allOf:
> +  - $ref: dsa.yaml#/$defs/ethernet-ports
> +
> +maintainers:
> +  - Hauke Mehrtens <hauke@hauke-m.de>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - lantiq,xrx200-gswip
> +      - lantiq,xrx300-gswip
> +      - lantiq,xrx330-gswip
> +
> +  reg:
> +    minItems: 3
> +    maxItems: 3

blank line

> +  reg-names:
> +    items:
> +      - const: switch
> +      - const: mdio
> +      - const: mii
> +
> +  mdio:
> +    $ref: /schemas/net/mdio.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      compatible:
> +        const: lantiq,xrx200-mdio
> +
> +    required:
> +      - compatible
> +
> +  gphy-fw:
> +    type: object
> +    properties:
> +      '#address-cells':
> +        const: 1

blank line

> +      '#size-cells':
> +        const: 0
> +
> +      compatible:
> +        allOf:

Don't need allOf.

> +          - items:
> +              - enum:
> +                  - lantiq,xrx200-gphy-fw
> +                  - lantiq,xrx300-gphy-fw
> +                  - lantiq,xrx330-gphy-fw
> +              - const: lantiq,gphy-fw
> +
> +      lantiq,rcu:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: phandle to the RCU syscon
> +
> +    patternProperties:
> +      "^gphy@[0-9a-f]+$":

"^gphy@[0-9a-f]{1,2]$"

> +        type: object
> +
> +        properties:
> +          reg:
> +            minimum: 0
> +            maximum: 255
> +            description:
> +              Offset of the GPHY firmware register in the RCU register range
> +
> +          resets:
> +            items:
> +              - description: GPHY reset line
> +
> +          reset-names:
> +            items:
> +              - const: gphy
> +
> +        required:
> +          - reg
> +
> +        additionalProperties: false

For indented cases, it is preferred to put this before 'properties'.

> +
> +    required:
> +      - compatible
> +      - lantiq,rcu
> +
> +    additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    switch@e108000 {
> +            compatible = "lantiq,xrx200-gswip";
> +            reg = <0xe108000 0x3100>,  /* switch */
> +                  <0xe10b100 0xd8>,    /* mdio */
> +                  <0xe10b1d8 0x130>;   /* mii */
> +            dsa,member = <0 0>;
> +
> +            ports {
> +                    #address-cells = <1>;
> +                    #size-cells = <0>;
> +
> +                    port@0 {
> +                            reg = <0>;
> +                            label = "lan3";
> +                            phy-mode = "rgmii";
> +                            phy-handle = <&phy0>;
> +                    };
> +
> +                    port@1 {
> +                            reg = <1>;
> +                            label = "lan4";
> +                            phy-mode = "rgmii";
> +                            phy-handle = <&phy1>;
> +                    };
> +
> +                    port@2 {
> +                            reg = <2>;
> +                            label = "lan2";
> +                            phy-mode = "internal";
> +                            phy-handle = <&phy11>;
> +                    };
> +
> +                    port@4 {
> +                            reg = <4>;
> +                            label = "lan1";
> +                            phy-mode = "internal";
> +                            phy-handle = <&phy13>;
> +                    };
> +
> +                    port@5 {
> +                            reg = <5>;
> +                            label = "wan";
> +                            phy-mode = "rgmii";
> +                            phy-handle = <&phy5>;
> +                    };
> +
> +                    port@6 {
> +                            reg = <0x6>;
> +                            ethernet = <&eth0>;
> +                    };
> +            };
> +
> +            mdio {
> +                    #address-cells = <1>;
> +                    #size-cells = <0>;
> +                    compatible = "lantiq,xrx200-mdio";
> +
> +                    phy0: ethernet-phy@0 {
> +                            reg = <0x0>;
> +                    };
> +                    phy1: ethernet-phy@1 {
> +                            reg = <0x1>;
> +                    };
> +                    phy5: ethernet-phy@5 {
> +                            reg = <0x5>;
> +                    };
> +                    phy11: ethernet-phy@11 {
> +                            reg = <0x11>;
> +                    };
> +                    phy13: ethernet-phy@13 {
> +                            reg = <0x13>;
> +                    };
> +            };
> +
> +            gphy-fw {
> +                    #address-cells = <1>;
> +                    #size-cells = <0>;
> +                    compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";
> +                    lantiq,rcu = <&rcu0>;
> +
> +                    gphy@20 {
> +                            reg = <0x20>;
> +
> +                            resets = <&reset0 31 30>;
> +                            reset-names = "gphy";
> +                    };
> +
> +                    gphy@68 {
> +                            reg = <0x68>;
> +
> +                            resets = <&reset0 29 28>;
> +                            reset-names = "gphy";
> +                    };
> +            };
> +    };
Martin Schiller June 11, 2024, 1:48 p.m. UTC | #4
On 2024-06-11 15:27, Rob Herring wrote:
> On Tue, Jun 11, 2024 at 01:40:15PM +0200, Martin Schiller wrote:
>> Convert the lantiq,gswip bindings to YAML format.
>> 
>> Also add this new file to the MAINTAINERS file.
>> 
>> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
>> ---
>>  .../bindings/net/dsa/lantiq,gswip.yaml        | 195 
>> ++++++++++++++++++
>>  .../bindings/net/dsa/lantiq-gswip.txt         | 146 -------------
>>  MAINTAINERS                                   |   1 +
>>  3 files changed, 196 insertions(+), 146 deletions(-)
>>  create mode 100644 
>> Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>>  delete mode 100644 
>> Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml 
>> b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>> new file mode 100644
>> index 000000000000..14ef48d6a0ee
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>> @@ -0,0 +1,195 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Lantiq GSWIP Ethernet switches
>> +
>> +allOf:
>> +  - $ref: dsa.yaml#/$defs/ethernet-ports
>> +
>> +maintainers:
>> +  - Hauke Mehrtens <hauke@hauke-m.de>
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - lantiq,xrx200-gswip
>> +      - lantiq,xrx300-gswip
>> +      - lantiq,xrx330-gswip
>> +
>> +  reg:
>> +    minItems: 3
>> +    maxItems: 3
> 
> blank line
> 
>> +  reg-names:
>> +    items:
>> +      - const: switch
>> +      - const: mdio
>> +      - const: mii
>> +
>> +  mdio:
>> +    $ref: /schemas/net/mdio.yaml#
>> +    unevaluatedProperties: false
>> +
>> +    properties:
>> +      compatible:
>> +        const: lantiq,xrx200-mdio
>> +
>> +    required:
>> +      - compatible
>> +
>> +  gphy-fw:
>> +    type: object
>> +    properties:
>> +      '#address-cells':
>> +        const: 1
> 
> blank line
> 
>> +      '#size-cells':
>> +        const: 0
>> +
>> +      compatible:
>> +        allOf:
> 
> Don't need allOf.
> 
>> +          - items:
>> +              - enum:
>> +                  - lantiq,xrx200-gphy-fw
>> +                  - lantiq,xrx300-gphy-fw
>> +                  - lantiq,xrx330-gphy-fw
>> +              - const: lantiq,gphy-fw
>> +
>> +      lantiq,rcu:
>> +        $ref: /schemas/types.yaml#/definitions/phandle
>> +        description: phandle to the RCU syscon
>> +
>> +    patternProperties:
>> +      "^gphy@[0-9a-f]+$":
> 
> "^gphy@[0-9a-f]{1,2]$"
> 
>> +        type: object
>> +
>> +        properties:
>> +          reg:
>> +            minimum: 0
>> +            maximum: 255
>> +            description:
>> +              Offset of the GPHY firmware register in the RCU 
>> register range
>> +
>> +          resets:
>> +            items:
>> +              - description: GPHY reset line
>> +
>> +          reset-names:
>> +            items:
>> +              - const: gphy
>> +
>> +        required:
>> +          - reg
>> +
>> +        additionalProperties: false
> 
> For indented cases, it is preferred to put this before 'properties'.
> 
>> +
>> +    required:
>> +      - compatible
>> +      - lantiq,rcu
>> +
>> +    additionalProperties: false
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    switch@e108000 {
>> +            compatible = "lantiq,xrx200-gswip";
>> +            reg = <0xe108000 0x3100>,  /* switch */
>> +                  <0xe10b100 0xd8>,    /* mdio */
>> +                  <0xe10b1d8 0x130>;   /* mii */
>> +            dsa,member = <0 0>;
>> +
>> +            ports {
>> +                    #address-cells = <1>;
>> +                    #size-cells = <0>;
>> +
>> +                    port@0 {
>> +                            reg = <0>;
>> +                            label = "lan3";
>> +                            phy-mode = "rgmii";
>> +                            phy-handle = <&phy0>;
>> +                    };
>> +
>> +                    port@1 {
>> +                            reg = <1>;
>> +                            label = "lan4";
>> +                            phy-mode = "rgmii";
>> +                            phy-handle = <&phy1>;
>> +                    };
>> +
>> +                    port@2 {
>> +                            reg = <2>;
>> +                            label = "lan2";
>> +                            phy-mode = "internal";
>> +                            phy-handle = <&phy11>;
>> +                    };
>> +
>> +                    port@4 {
>> +                            reg = <4>;
>> +                            label = "lan1";
>> +                            phy-mode = "internal";
>> +                            phy-handle = <&phy13>;
>> +                    };
>> +
>> +                    port@5 {
>> +                            reg = <5>;
>> +                            label = "wan";
>> +                            phy-mode = "rgmii";
>> +                            phy-handle = <&phy5>;
>> +                    };
>> +
>> +                    port@6 {
>> +                            reg = <0x6>;
>> +                            ethernet = <&eth0>;
>> +                    };
>> +            };
>> +
>> +            mdio {
>> +                    #address-cells = <1>;
>> +                    #size-cells = <0>;
>> +                    compatible = "lantiq,xrx200-mdio";
>> +
>> +                    phy0: ethernet-phy@0 {
>> +                            reg = <0x0>;
>> +                    };
>> +                    phy1: ethernet-phy@1 {
>> +                            reg = <0x1>;
>> +                    };
>> +                    phy5: ethernet-phy@5 {
>> +                            reg = <0x5>;
>> +                    };
>> +                    phy11: ethernet-phy@11 {
>> +                            reg = <0x11>;
>> +                    };
>> +                    phy13: ethernet-phy@13 {
>> +                            reg = <0x13>;
>> +                    };
>> +            };
>> +
>> +            gphy-fw {
>> +                    #address-cells = <1>;
>> +                    #size-cells = <0>;
>> +                    compatible = "lantiq,xrx200-gphy-fw", 
>> "lantiq,gphy-fw";
>> +                    lantiq,rcu = <&rcu0>;
>> +
>> +                    gphy@20 {
>> +                            reg = <0x20>;
>> +
>> +                            resets = <&reset0 31 30>;
>> +                            reset-names = "gphy";
>> +                    };
>> +
>> +                    gphy@68 {
>> +                            reg = <0x68>;
>> +
>> +                            resets = <&reset0 29 28>;
>> +                            reset-names = "gphy";
>> +                    };
>> +            };
>> +    };

OK, thanks for the review. I will send a v5 with these improvements
included and the two dt-bindings patches merged to satisfy the
'make dt_binding_check'.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
new file mode 100644
index 000000000000..14ef48d6a0ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
@@ -0,0 +1,195 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lantiq GSWIP Ethernet switches
+
+allOf:
+  - $ref: dsa.yaml#/$defs/ethernet-ports
+
+maintainers:
+  - Hauke Mehrtens <hauke@hauke-m.de>
+
+properties:
+  compatible:
+    enum:
+      - lantiq,xrx200-gswip
+      - lantiq,xrx300-gswip
+      - lantiq,xrx330-gswip
+
+  reg:
+    minItems: 3
+    maxItems: 3
+  reg-names:
+    items:
+      - const: switch
+      - const: mdio
+      - const: mii
+
+  mdio:
+    $ref: /schemas/net/mdio.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      compatible:
+        const: lantiq,xrx200-mdio
+
+    required:
+      - compatible
+
+  gphy-fw:
+    type: object
+    properties:
+      '#address-cells':
+        const: 1
+      '#size-cells':
+        const: 0
+
+      compatible:
+        allOf:
+          - items:
+              - enum:
+                  - lantiq,xrx200-gphy-fw
+                  - lantiq,xrx300-gphy-fw
+                  - lantiq,xrx330-gphy-fw
+              - const: lantiq,gphy-fw
+
+      lantiq,rcu:
+        $ref: /schemas/types.yaml#/definitions/phandle
+        description: phandle to the RCU syscon
+
+    patternProperties:
+      "^gphy@[0-9a-f]+$":
+        type: object
+
+        properties:
+          reg:
+            minimum: 0
+            maximum: 255
+            description:
+              Offset of the GPHY firmware register in the RCU register range
+
+          resets:
+            items:
+              - description: GPHY reset line
+
+          reset-names:
+            items:
+              - const: gphy
+
+        required:
+          - reg
+
+        additionalProperties: false
+
+    required:
+      - compatible
+      - lantiq,rcu
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    switch@e108000 {
+            compatible = "lantiq,xrx200-gswip";
+            reg = <0xe108000 0x3100>,  /* switch */
+                  <0xe10b100 0xd8>,    /* mdio */
+                  <0xe10b1d8 0x130>;   /* mii */
+            dsa,member = <0 0>;
+
+            ports {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+
+                    port@0 {
+                            reg = <0>;
+                            label = "lan3";
+                            phy-mode = "rgmii";
+                            phy-handle = <&phy0>;
+                    };
+
+                    port@1 {
+                            reg = <1>;
+                            label = "lan4";
+                            phy-mode = "rgmii";
+                            phy-handle = <&phy1>;
+                    };
+
+                    port@2 {
+                            reg = <2>;
+                            label = "lan2";
+                            phy-mode = "internal";
+                            phy-handle = <&phy11>;
+                    };
+
+                    port@4 {
+                            reg = <4>;
+                            label = "lan1";
+                            phy-mode = "internal";
+                            phy-handle = <&phy13>;
+                    };
+
+                    port@5 {
+                            reg = <5>;
+                            label = "wan";
+                            phy-mode = "rgmii";
+                            phy-handle = <&phy5>;
+                    };
+
+                    port@6 {
+                            reg = <0x6>;
+                            ethernet = <&eth0>;
+                    };
+            };
+
+            mdio {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+                    compatible = "lantiq,xrx200-mdio";
+
+                    phy0: ethernet-phy@0 {
+                            reg = <0x0>;
+                    };
+                    phy1: ethernet-phy@1 {
+                            reg = <0x1>;
+                    };
+                    phy5: ethernet-phy@5 {
+                            reg = <0x5>;
+                    };
+                    phy11: ethernet-phy@11 {
+                            reg = <0x11>;
+                    };
+                    phy13: ethernet-phy@13 {
+                            reg = <0x13>;
+                    };
+            };
+
+            gphy-fw {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+                    compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";
+                    lantiq,rcu = <&rcu0>;
+
+                    gphy@20 {
+                            reg = <0x20>;
+
+                            resets = <&reset0 31 30>;
+                            reset-names = "gphy";
+                    };
+
+                    gphy@68 {
+                            reg = <0x68>;
+
+                            resets = <&reset0 29 28>;
+                            reset-names = "gphy";
+                    };
+            };
+    };
diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt b/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
deleted file mode 100644
index 8bb1eff21cb1..000000000000
--- a/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
+++ /dev/null
@@ -1,146 +0,0 @@ 
-Lantiq GSWIP Ethernet switches
-==================================
-
-Required properties for GSWIP core:
-
-- compatible	: "lantiq,xrx200-gswip" for the embedded GSWIP in the
-		  xRX200 SoC
-		  "lantiq,xrx300-gswip" for the embedded GSWIP in the
-		  xRX300 SoC
-		  "lantiq,xrx330-gswip" for the embedded GSWIP in the
-		  xRX330 SoC
-- reg		: memory range of the GSWIP core registers
-		: memory range of the GSWIP MDIO registers
-		: memory range of the GSWIP MII registers
-
-See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of
-additional required and optional properties.
-
-
-Required properties for MDIO bus:
-- compatible	: "lantiq,xrx200-mdio" for the MDIO bus inside the GSWIP
-		  core of the xRX200 SoC and the PHYs connected to it.
-
-See Documentation/devicetree/bindings/net/mdio.txt for a list of additional
-required and optional properties.
-
-
-Required properties for GPHY firmware loading:
-- compatible	: "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw"
-		  "lantiq,xrx300-gphy-fw", "lantiq,gphy-fw"
-		  "lantiq,xrx330-gphy-fw", "lantiq,gphy-fw"
-		  for the loading of the firmware into the embedded
-		  GPHY core of the SoC.
-- lantiq,rcu	: reference to the rcu syscon
-
-The GPHY firmware loader has a list of GPHY entries, one for each
-embedded GPHY
-
-- reg		: Offset of the GPHY firmware register in the RCU
-		  register range
-- resets	: list of resets of the embedded GPHY
-- reset-names	: list of names of the resets
-
-Example:
-
-Ethernet switch on the VRX200 SoC:
-
-switch@e108000 {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	compatible = "lantiq,xrx200-gswip";
-	reg = <	0xe108000 0x3100	/* switch */
-		0xe10b100 0xd8		/* mdio */
-		0xe10b1d8 0x130		/* mii */
-		>;
-	dsa,member = <0 0>;
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@0 {
-			reg = <0>;
-			label = "lan3";
-			phy-mode = "rgmii";
-			phy-handle = <&phy0>;
-		};
-
-		port@1 {
-			reg = <1>;
-			label = "lan4";
-			phy-mode = "rgmii";
-			phy-handle = <&phy1>;
-		};
-
-		port@2 {
-			reg = <2>;
-			label = "lan2";
-			phy-mode = "internal";
-			phy-handle = <&phy11>;
-		};
-
-		port@4 {
-			reg = <4>;
-			label = "lan1";
-			phy-mode = "internal";
-			phy-handle = <&phy13>;
-		};
-
-		port@5 {
-			reg = <5>;
-			label = "wan";
-			phy-mode = "rgmii";
-			phy-handle = <&phy5>;
-		};
-
-		port@6 {
-			reg = <0x6>;
-			ethernet = <&eth0>;
-		};
-	};
-
-	mdio {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		compatible = "lantiq,xrx200-mdio";
-		reg = <0>;
-
-		phy0: ethernet-phy@0 {
-			reg = <0x0>;
-		};
-		phy1: ethernet-phy@1 {
-			reg = <0x1>;
-		};
-		phy5: ethernet-phy@5 {
-			reg = <0x5>;
-		};
-		phy11: ethernet-phy@11 {
-			reg = <0x11>;
-		};
-		phy13: ethernet-phy@13 {
-			reg = <0x13>;
-		};
-	};
-
-	gphy-fw {
-		compatible = "lantiq,xrx200-gphy-fw", "lantiq,gphy-fw";
-		lantiq,rcu = <&rcu0>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		gphy@20 {
-			reg = <0x20>;
-
-			resets = <&reset0 31 30>;
-			reset-names = "gphy";
-		};
-
-		gphy@68 {
-			reg = <0x68>;
-
-			resets = <&reset0 29 28>;
-			reset-names = "gphy";
-		};
-	};
-};
diff --git a/MAINTAINERS b/MAINTAINERS
index cd3277a98cfe..ca1050f6691b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12449,6 +12449,7 @@  LANTIQ / INTEL Ethernet drivers
 M:	Hauke Mehrtens <hauke@hauke-m.de>
 L:	netdev@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
 F:	drivers/net/dsa/lantiq_gswip.c
 F:	drivers/net/dsa/lantiq_pce.h
 F:	drivers/net/ethernet/lantiq_xrx200.c