# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/apm,xgene-mdio-rgmii.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: APM X-Gene SoC MDIO

maintainers:
  - Iyappan Subramanian <iyappan@os.amperecomputing.com>
  - Keyur Chudgar <keyur@os.amperecomputing.com>
  - Quan Nguyen <quan@os.amperecomputing.com>

allOf:
  - $ref: mdio.yaml#

properties:
  compatible:
    enum:
      - apm,xgene-mdio-rgmii
      - apm,xgene-mdio-xfi

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

unevaluatedProperties: false

required:
  - compatible
  - reg
  - clocks

examples:
  - |
    mdio@17020000 {
        compatible = "apm,xgene-mdio-rgmii";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x17020000 0xd100>;
        clocks = <&menetclk 0>;

        phy@3 {
            reg = <0x3>;
        };
        phy@4 {
            reg = <0x4>;
        };
        phy@5 {
            reg = <0x5>;
        };
    };
