Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v4] dt-bindings: net: Convert mdio-gpio to yaml
@ 2021-05-03 18:41 Corentin Labbe
  2021-05-03 19:01 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 2+ messages in thread
From: Corentin Labbe @ 2021-05-03 18:41 UTC (permalink / raw)
  To: andrew, hkallweit1, linux, robh+dt
  Cc: devicetree, linux-kernel, netdev, Corentin Labbe

Converts net/mdio-gpio.txt to yaml

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
Changes since v1:
- fixes yamllint warning about indent
- added maxItems 3

Changes since v2:
- fixed example (gpios need 2 entries)

Changes since v3:
- fixed gpios description
- added additionalProperties/type: object

 .../devicetree/bindings/net/mdio-gpio.txt     | 27 ---------
 .../devicetree/bindings/net/mdio-gpio.yaml    | 58 +++++++++++++++++++
 2 files changed, 58 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/mdio-gpio.txt
 create mode 100644 Documentation/devicetree/bindings/net/mdio-gpio.yaml

diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt
deleted file mode 100644
index 4d91a36c5cf5..000000000000
--- a/Documentation/devicetree/bindings/net/mdio-gpio.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-MDIO on GPIOs
-
-Currently defined compatibles:
-- virtual,gpio-mdio
-- microchip,mdio-smi0
-
-MDC and MDIO lines connected to GPIO controllers are listed in the
-gpios property as described in section VIII.1 in the following order:
-
-MDC, MDIO.
-
-Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
-node.
-
-Example:
-
-aliases {
-	mdio-gpio0 = &mdio0;
-};
-
-mdio0: mdio {
-	compatible = "virtual,mdio-gpio";
-	#address-cells = <1>;
-	#size-cells = <0>;
-	gpios = <&qe_pio_a 11
-		 &qe_pio_c 6>;
-};
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.yaml b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
new file mode 100644
index 000000000000..236a8c4768e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/mdio-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MDIO on GPIOs
+
+maintainers:
+  - Andrew Lunn <andrew@lunn.ch>
+  - Florian Fainelli <f.fainelli@gmail.com>
+  - Heiner Kallweit <hkallweit1@gmail.com>
+
+allOf:
+  - $ref: "mdio.yaml#"
+
+properties:
+  compatible:
+    enum:
+      - virtual,mdio-gpio
+      - microchip,mdio-smi0
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  gpios:
+    minItems: 2
+    maxItems: 3
+    items:
+      - description: MDC
+      - description: MDIO
+      - description: MDO
+
+#Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
+#node.
+additionalProperties:
+  type: object
+
+examples:
+  - |
+    aliases {
+        mdio-gpio0 = &mdio0;
+    };
+
+    mdio0: mdio {
+      compatible = "virtual,mdio-gpio";
+      #address-cells = <1>;
+      #size-cells = <0>;
+      gpios = <&qe_pio_a 11>,
+              <&qe_pio_c 6>;
+      ethphy0: ethernet-phy@0 {
+        reg = <0>;
+      };
+    };
+...
-- 
2.26.3


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

* Re: [PATCH v4] dt-bindings: net: Convert mdio-gpio to yaml
  2021-05-03 18:41 [PATCH v4] dt-bindings: net: Convert mdio-gpio to yaml Corentin Labbe
@ 2021-05-03 19:01 ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux admin @ 2021-05-03 19:01 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: andrew, hkallweit1, robh+dt, devicetree, linux-kernel, netdev

On Mon, May 03, 2021 at 06:41:00PM +0000, Corentin Labbe wrote:
> Converts net/mdio-gpio.txt to yaml
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
> Changes since v1:
> - fixes yamllint warning about indent
> - added maxItems 3
> 
> Changes since v2:
> - fixed example (gpios need 2 entries)
> 
> Changes since v3:
> - fixed gpios description
> - added additionalProperties/type: object
> 
>  .../devicetree/bindings/net/mdio-gpio.txt     | 27 ---------
>  .../devicetree/bindings/net/mdio-gpio.yaml    | 58 +++++++++++++++++++
>  2 files changed, 58 insertions(+), 27 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/mdio-gpio.txt
>  create mode 100644 Documentation/devicetree/bindings/net/mdio-gpio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt
> deleted file mode 100644
> index 4d91a36c5cf5..000000000000
> --- a/Documentation/devicetree/bindings/net/mdio-gpio.txt
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -MDIO on GPIOs
> -
> -Currently defined compatibles:
> -- virtual,gpio-mdio
> -- microchip,mdio-smi0
> -
> -MDC and MDIO lines connected to GPIO controllers are listed in the
> -gpios property as described in section VIII.1 in the following order:
> -
> -MDC, MDIO.
> -
> -Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
> -node.
> -
> -Example:
> -
> -aliases {
> -	mdio-gpio0 = &mdio0;
> -};
> -
> -mdio0: mdio {
> -	compatible = "virtual,mdio-gpio";
> -	#address-cells = <1>;
> -	#size-cells = <0>;
> -	gpios = <&qe_pio_a 11
> -		 &qe_pio_c 6>;
> -};
> diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.yaml b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
> new file mode 100644
> index 000000000000..236a8c4768e2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/mdio-gpio.yaml
> @@ -0,0 +1,58 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/mdio-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MDIO on GPIOs
> +
> +maintainers:
> +  - Andrew Lunn <andrew@lunn.ch>
> +  - Florian Fainelli <f.fainelli@gmail.com>
> +  - Heiner Kallweit <hkallweit1@gmail.com>

I think your information is outdated here. As the original does not
contain this information, and maintainers no longer lists Florian,
I can only guess that this patch was created some time ago?

Please update this with the latest from MAINTAINERS, thanks.

> +
> +allOf:
> +  - $ref: "mdio.yaml#"
> +
> +properties:
> +  compatible:
> +    enum:
> +      - virtual,mdio-gpio
> +      - microchip,mdio-smi0
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +  gpios:
> +    minItems: 2
> +    maxItems: 3
> +    items:
> +      - description: MDC
> +      - description: MDIO
> +      - description: MDO
> +
> +#Note: Each gpio-mdio bus should have an alias correctly numbered in "aliases"
> +#node.
> +additionalProperties:
> +  type: object
> +
> +examples:
> +  - |
> +    aliases {
> +        mdio-gpio0 = &mdio0;
> +    };
> +
> +    mdio0: mdio {
> +      compatible = "virtual,mdio-gpio";
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +      gpios = <&qe_pio_a 11>,
> +              <&qe_pio_c 6>;
> +      ethphy0: ethernet-phy@0 {
> +        reg = <0>;
> +      };
> +    };
> +...
> -- 
> 2.26.3
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 18:41 [PATCH v4] dt-bindings: net: Convert mdio-gpio to yaml Corentin Labbe
2021-05-03 19:01 ` Russell King - ARM Linux admin

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git