deleted file mode 100644
@@ -1,27 +0,0 @@
-* Allwinner GMAC ethernet controller
-
-This device is a platform glue layer for stmmac.
-Please see stmmac.txt for the other unchanged properties.
-
-Required properties:
- - compatible: Should be "allwinner,sun7i-a20-gmac"
- - clocks: Should contain the GMAC main clock, and tx clock
- The tx clock type should be "allwinner,sun7i-a20-gmac-clk"
- - clock-names: Should contain the clock names "stmmaceth",
- and "allwinner_gmac_tx"
-
-Optional properties:
-- phy-supply: phandle to a regulator if the PHY needs one
-
-Examples:
-
- gmac: ethernet@1c50000 {
- compatible = "allwinner,sun7i-a20-gmac";
- reg = <0x01c50000 0x10000>,
- <0x01c20164 0x4>;
- interrupts = <0 85 1>;
- interrupt-names = "macirq";
- clocks = <&ahb_gates 49>, <&gmac_tx>;
- clock-names = "stmmaceth", "allwinner_gmac_tx";
- phy-mode = "mii";
- };
@@ -14,6 +14,7 @@ maintainers:
properties:
compatible:
oneOf:
+ - const: allwinner,sun7i-a20-gmac
- const: snps,dwmac
- const: snps,dwmac-3.50a
- const: snps,dwmac-3.610
@@ -232,6 +233,7 @@ allOf:
properties:
compatible:
enum:
+ - allwinner,sun7i-a20-gmac
- snps,dwxgmac
- snps,dwxgmac-2.10
- st,spear600-gmac
@@ -273,6 +275,37 @@ allOf:
Enables the TSO feature otherwise it will be managed by
MAC HW capability register. Only for GMAC4 and newer.
+ - if:
+ properties:
+ compatible:
+ const: allwinner,sun7i-a20-gmac
+
+ then:
+ properties:
+ 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:
+ - clocks
+ - clock-names
+
examples:
- |
stmmac_axi_setup: stmmac-axi-config {
@@ -337,6 +370,18 @@ examples:
};
};
+ - |
+ gmac: ethernet@1c50000 {
+ compatible = "allwinner,sun7i-a20-gmac";
+ reg = <0x01c50000 0x10000>,
+ <0x01c20164 0x4>;
+ interrupts = <0 85 1>;
+ interrupt-names = "macirq";
+ clocks = <&ahb_gates 49>, <&gmac_tx>;
+ clock-names = "stmmaceth", "allwinner_gmac_tx";
+ phy-mode = "mii";
+ };
+
# FIXME: We should set it, but it would report all the generic
# properties as additional properties.
# additionalProperties: false
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. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> --- Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.txt | 27 --------------------------- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.txt