From 4b859450faa02aa48c0baf915b3faa090f2efb8e Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 27 Jun 2019 17:31:51 +0200 Subject: dt-bindings: net: sun7i-gmac: Convert the binding to a schemas Switch our Allwinner A20 GMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring --- .../bindings/net/allwinner,sun7i-a20-gmac.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml (limited to 'Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml') diff --git a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml new file mode 100644 index 000000000000..4b45798f0e68 --- /dev/null +++ b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/allwinner,sun7i-a20-gmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A20 GMAC Device Tree Bindings + +allOf: + - $ref: "snps,dwmac.yaml#" + +maintainers: + - Chen-Yu Tsai + - Maxime Ripard + +properties: + compatible: + const: allwinner,sun7i-a20-gmac + + interrupts: + maxItems: 1 + + interrupt-names: + const: macirq + + clocks: + items: + - description: GMAC main clock + - description: TX clock + + clock-names: + items: + - const: stmmaceth + - const: allwinner_gmac_tx + + phy-supply: + description: + PHY regulator + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - phy-connection-type + +examples: + - | + gmac: ethernet@1c50000 { + compatible = "allwinner,sun7i-a20-gmac"; + reg = <0x01c50000 0x10000>; + interrupts = <0 85 1>; + interrupt-names = "macirq"; + clocks = <&ahb_gates 49>, <&gmac_tx>; + clock-names = "stmmaceth", "allwinner_gmac_tx"; + phy-connection-type = "mii"; + }; + +# FIXME: We should set it, but it would report all the generic +# properties as additional properties. +# additionalProperties: false + +... -- cgit v1.2.3 From 67d0da99163f99eb39a931e79b128cbf0647dfdb Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 3 Jul 2019 11:55:12 +0200 Subject: dt-bindings: net: Use phy-mode instead of phy-connection-type When adding support for the DWMAC (and derivatives) bindings, phy-connection-type was required, even though the previous binding required the equivalent phy-mode. Let's fix this by using phy-mode as we should have. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml') diff --git a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml index 4b45798f0e68..06b1cc8bea14 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml +++ b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml @@ -44,7 +44,7 @@ required: - interrupt-names - clocks - clock-names - - phy-connection-type + - phy-mode examples: - | @@ -55,7 +55,7 @@ examples: interrupt-names = "macirq"; clocks = <&ahb_gates 49>, <&gmac_tx>; clock-names = "stmmaceth", "allwinner_gmac_tx"; - phy-connection-type = "mii"; + phy-mode = "mii"; }; # FIXME: We should set it, but it would report all the generic -- cgit v1.2.3