dt-bindings: net: xilinx_gmii2rgmii: Convert to json schema
Subsystems (4)
PATCH v2 1/1 dt-bindings: net: xilinx_gmii2rgmii: Convert to json schema
Convert the Xilinx GMII to RGMII Converter device tree binding documentation to json schema.
This converter is usually used as gem <---> gmii2rgmii <---> external phy and, it's phy-handle should point to the phandle of the external phy.
---
Changes v2:
1. Changed description for the property "reg".
2. Added a reference to the description of "phy-handle" property.
--- .../bindings/net/xilinx_gmii2rgmii.txt | 35 ------------ .../bindings/net/xlnx,gmii-to-rgmii.yaml | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt create mode 100644 Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt deleted +0 -35
@@ -1,35 +0,0 @@ -XILINX GMIITORGMII Converter Driver Device Tree Bindings --------------------------------------------------------- - -The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media -Independent Interface (RGMII) core provides the RGMII between RGMII-compliant -Ethernet physical media devices (PHY) and the Gigabit Ethernet controller. -This core can be used in all three modes of operation(10/100/1000 Mb/s). -The Management Data Input/Output (MDIO) interface is used to configure the -Speed of operation. This core can switch dynamically between the three -Different speed modes by configuring the conveter register through mdio write. - -This converter sits between the ethernet MAC and the external phy. -MAC <==> GMII2RGMII <==> RGMII_PHY - -For more details about mdio please refer phy.txt file in the same directory. - -Required properties: -- compatible : Should be "xlnx,gmii-to-rgmii-1.0" -- reg : The ID number for the phy, usually a small integer -- phy-handle : Should point to the external phy device. - See ethernet.txt file in the same directory. - -Example: - mdio { - #address-cells = <1>; - #size-cells = <0>; - phy: ethernet-phy@0 { - ...... - }; - gmiitorgmii: gmiitorgmii@8 { - compatible = "xlnx,gmii-to-rgmii-1.0"; - reg = <8>; - phy-handle = <&phy>; - }; - };
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.36.1
Quoted 10 lines · Pranavi Somisetty
Convert the Xilinx GMII to RGMII Converter device tree binding documentation to json schema.
This converter is usually used as gem <---> gmii2rgmii <---> external phy and, it's phy-handle should point to the phandle of the external phy.Signed-off-by Pranavi Somisetty <[email protected]>---
Changes v2:
1. Changed description for the property "reg".
2. Added a reference to the description of "phy-handle" property.
Seems fine to me, one /minor/ nit that I don't expect to be addressed.
Thanks,
Conor.
Quoted 9 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +3
-0+examples: + - | + mdio {
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 53
Quoted 10 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +10
-0+ #address-cells = <1>; + #size-cells = <0>; + phy: ethernet-phy@0 { + reg = <0>; + }; + gmiitorgmii@8 { + compatible = "xlnx,gmii-to-rgmii-1.0"; + reg = <8>; + phy-handle = <&phy>; + };
Ideally, add a blank line before child nodes.
Quoted 4 lines
+ };
Signature · 1 line
2.36.1
Rob Herring
maintainerQuoted 86 lines · Pranavi Somisetty
Convert the Xilinx GMII to RGMII Converter device tree binding documentation to json schema.
This converter is usually used as gem <---> gmii2rgmii <---> external phy and, it's phy-handle should point to the phandle of the external phy.Signed-off-by Pranavi Somisetty <[email protected]>---
Changes v2:
1. Changed description for the property "reg".
2. Added a reference to the description of "phy-handle" property.--- .../bindings/net/xilinx_gmii2rgmii.txt | 35 ------------ .../bindings/net/xlnx,gmii-to-rgmii.yaml | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt create mode 100644 Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yamlDocumentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt deleted +0
-35@@ -1,35 +0,0 @@ -XILINX GMIITORGMII Converter Driver Device Tree Bindings --------------------------------------------------------- - -The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media -Independent Interface (RGMII) core provides the RGMII between RGMII-compliant -Ethernet physical media devices (PHY) and the Gigabit Ethernet controller. -This core can be used in all three modes of operation(10/100/1000 Mb/s). -The Management Data Input/Output (MDIO) interface is used to configure the -Speed of operation. This core can switch dynamically between the three -Different speed modes by configuring the conveter register through mdio write. - -This converter sits between the ethernet MAC and the external phy. -MAC <==> GMII2RGMII <==> RGMII_PHY - -For more details about mdio please refer phy.txt file in the same directory. - -Required properties: -- compatible : Should be "xlnx,gmii-to-rgmii-1.0" -- reg : The ID number for the phy, usually a small integer -- phy-handle : Should point to the external phy device. - See ethernet.txt file in the same directory. - -Example: - mdio { - #address-cells = <1>; - #size-cells = <0>; - phy: ethernet-phy@0 { - ...... - }; - gmiitorgmii: gmiitorgmii@8 { - compatible = "xlnx,gmii-to-rgmii-1.0"; - reg = <8>; - phy-handle = <&phy>; - }; - };Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +22
-0@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/xlnx,gmii-to-rgmii.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx GMII to RGMII Converter + +maintainers: + - Harini Katakam <[email protected]> + +description: + The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media + Independent Interface (RGMII) core provides the RGMII between RGMII-compliant + ethernet physical media devices (PHY) and the Gigabit Ethernet controller. + This core can be used in all three modes of operation(10/100/1000 Mb/s). + The Management Data Input/Output (MDIO) interface is used to configure the + speed of operation. This core can switch dynamically between the three + different speed modes by configuring the converter register through mdio write. + The core cannot function without an external phy connected to it. + +properties:
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 32
Quoted 10 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +10
-0+ compatible: + const: xlnx,gmii-to-rgmii-1.0 + + reg: + minimum: 0 + maximum: 31 + description: The ID number for the phy. + + phy-handle: + $ref: ethernet-controller.yaml#/properties/phy-handle
Don't reference individual properties like this. Instead add a $ref at the top level to just "ethernet-controller.yaml#". Since this is the only property you want from there, put a 'phy-handle: true' here and use additionalProperties instead of unevaluatedProperties below.
Quoted 25 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +22
-0+ +required: + - compatible + - reg + - phy-handle + +unevaluatedProperties: false + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + phy: ethernet-phy@0 { + reg = <0>; + }; + gmiitorgmii@8 { + compatible = "xlnx,gmii-to-rgmii-1.0"; + reg = <8>; + phy-handle = <&phy>; + }; + };Signature · 1 line
2.36.1
Quoted 123 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Wednesday, July 19, 2023 11:52 PM
To: Somisetty, Pranavi <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Simek, Michal <[email protected]>; Katakam, Harini <[email protected]>; git (AMD-Xilinx) <[email protected]>; Pandey, Radhey Shyam <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux-arm- [email protected]
Subject: Re: [PATCH v2] dt-bindings: net:xilinx_gmii2rgmii: Convert to json schemaQuoted 30 lines · Pranavi Somisetty
Convert the Xilinx GMII to RGMII Converter device tree binding documentation to json schema.
This converter is usually used as gem <---> gmii2rgmii <---> external phy and, it's phy-handle should point to the phandle of the external phy.Signed-off-by Pranavi Somisetty <[email protected]>---
Changes v2:
1. Changed description for the property "reg".
2. Added a reference to the description of "phy-handle" property.--- .../bindings/net/xilinx_gmii2rgmii.txt | 35 ------------ .../bindings/net/xlnx,gmii-to-rgmii.yaml | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt create mode 100644
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yamldiff --git
a/Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txtb/Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txtdeleted file mode 100644
index 038dda48b8e6..000000000000Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt deleted +0
-4@@ -1,35 +0,0 @@ -XILINX GMIITORGMII Converter Driver Device Tree Bindings --------------------------------------------------------- - -The Gigabit Media Independent Interface (GMII) to Reduced GigabitQuoted 2 lines
Media -Independent Interface (RGMII) core provides the RGMII between RGMII-compliant -Ethernet physical media devices (PHY) and the Gigabit
Ethernet controller.
Quoted 4 lines
Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt deleted +0
-2-This core can be used in all three modes of operation(10/100/1000 Mb/s). -The Management Data Input/Output (MDIO) interface is used toconfigure the -Speed of operation. This core can switch dynamically between the three -Different speed modes by configuring the conveter
register through mdio write.
Quoted 39 lines
Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt deleted +0
-25- -This converter sits between the ethernet MAC and the external phy. -MAC <==> GMII2RGMII <==> RGMII_PHY - -For more details about mdio please refer phy.txt file in the same directory. - -Required properties: -- compatible : Should be "xlnx,gmii-to-rgmii-1.0" -- reg : The ID number for the phy, usually a small integer -- phy-handle : Should point to the external phy device. - See ethernet.txt file in the same directory. - -Example: - mdio { - #address-cells = <1>; - #size-cells = <0>; - phy: ethernet-phy@0 { - ...... - }; - gmiitorgmii: gmiitorgmii@8 { - compatible = "xlnx,gmii-to-rgmii-1.0"; - reg = <8>; - phy-handle = <&phy>; - }; - };diff --git
a/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yamlb/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yamlnew file mode 100644
index 000000000000..9d22382a64baDocumentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +6
-0@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/xlnx,gmii-to-rgmii.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx GMII to RGMII ConverterDocumentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 16
Quoted 10 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +10
-0+ +maintainers: + - Harini Katakam <[email protected]> + +description: + The Gigabit Media Independent Interface (GMII) to Reduced Gigabit +Media + Independent Interface (RGMII) core provides the RGMII between +RGMII-compliant + ethernet physical media devices (PHY) and the Gigabit Ethernetcontroller.
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 17
Quoted 1 line
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +1
-0+ This core can be used in all three modes of operation(10/100/1000Mb/s).
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 22
Quoted 5 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +5
-0+ The Management Data Input/Output (MDIO) interface is used to +configure the + speed of operation. This core can switch dynamically between the +three + different speed modes by configuring the converter register throughmdio write.
Quoted 10 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +10
-0+ The core cannot function without an external phy connected to it. + +properties: + compatible: + const: xlnx,gmii-to-rgmii-1.0 + + reg: + minimum: 0 + maximum: 31 + description: The ID number for the phy.
Quoted 9 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 32
Quoted 3 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +3
-0+ + phy-handle: + $ref: ethernet-controller.yaml#/properties/phy-handleDon't reference individual properties like this. Instead add a $ref at the top level to just "ethernet-controller.yaml#". Since this is the only property you want from there, put a 'phy-handle: true' here and use additionalProperties instead of unevaluatedProperties below.
Adding a top level $ref to ethernet-controller, implies, DT for gmii2rgmii, follows the schema in ethernet-controller.yaml. This is incorrect since gmii2rgmii IP isn't an ethernet controller. I'm not sure how to reference ethernet-controller.yaml from this schema. Would it be okay to add a description to the phy-handle property instead of referencing the description in ethernet-controller.yaml?
Regards
Pranavi
Quoted 25 lines
Quoted 25 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +22
-1+ +required: + - compatible + - reg + - phy-handle + +unevaluatedProperties: false + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + phy: ethernet-phy@0 { + reg = <0>; + }; + gmiitorgmii@8 { + compatible = "xlnx,gmii-to-rgmii-1.0"; + reg = <8>; + phy-handle = <&phy>; + }; + }; --2.36.1
Quoted 33 lines
-----Original Message-----
From: Somisetty, Pranavi <[email protected]>
Sent: Monday, July 24, 2023 6:47 PM
To: Rob Herring <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Simek, Michal <[email protected]>; Katakam, Harini <[email protected]>; git (AMD-Xilinx) <[email protected]>; Pandey, Radhey Shyam <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux-arm- [email protected]
Subject: RE: [PATCH v2] dt-bindings: net:xilinx_gmii2rgmii: Convert to json schemaQuoted 7 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Wednesday, July 19, 2023 11:52 PM
To: Somisetty, Pranavi <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Simek, Michal <[email protected]>; Katakam, Harini <[email protected]>;git
Quoted 7 lines
(AMD-Xilinx) <[email protected]>; Pandey, Radhey Shyam <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux-arm- [email protected]
Subject: Re: [PATCH v2] dt-bindings: net:xilinx_gmii2rgmii: Convert to json schema
<snip>
Quoted 17 lines
Quoted 9 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml line 32
Quoted 3 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +3
-0+ + phy-handle: + $ref: ethernet-controller.yaml#/properties/phy-handleDon't reference individual properties like this. Instead add a $ref at the top level to just "ethernet-controller.yaml#". Since this is the only property you want from there, put a 'phy-handle: true' here and use additionalProperties instead of unevaluatedProperties below.
Adding a top level $ref to ethernet-controller, implies, DT for gmii2rgmii, follows the schema in
ethernet-controller.yaml. This is incorrect since gmii2rgmii IP isn't an ethernet controller.
I'm not sure how to referenceethernet-controller.yamlfrom this schema. Would it be okay to add a description to the phy-handle property instead of referencing the description inethernet-controller.yaml?
Quoted 2 lines
Regards
Pranavi
Just FYI, when I add a $ref pointing to ethernet-controller.yaml, this is the error I'm seeing: Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.example.dtb: gmiitorgmii@8: $nodename:0: 'gmiitorgmii@8' does not match '^ethernet(@.*)?$'
Regards,
Pranavi
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml new file +21
-1+required: + - compatible + - reg + - phy-handle + +unevaluatedProperties: false + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + phy: ethernet-phy@0 { + reg = <0>; + }; + gmiitorgmii@8 { + compatible = "xlnx,gmii-to-rgmii-1.0"; + reg = <8>; + phy-handle = <&phy>; + }; + }; --2.36.1