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

title: Lantiq Xway ETOP Ethernet driver

maintainers:
  - John Crispin <john@phrozen.org>

properties:
  $nodename:
    pattern: "^ethernet@[0-9a-f]+$"

  compatible:
    const: lantiq,etop-xway

  reg:
    maxItems: 1

  interrupts:
    items:
      - description: TX interrupt
      - description: RX interrupt

  interrupt-names:
    items:
      - const: tx
      - const: rx

  lantiq,tx-burst-length:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      TX programmable burst length.
    enum: [2, 4, 8]

  lantiq,rx-burst-length:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      RX programmable burst length.
    enum: [2, 4, 8]

  phy-mode: true

required:
  - compatible
  - reg
  - interrupt-parent
  - interrupts
  - interrupt-names
  - lantiq,tx-burst-length
  - lantiq,rx-burst-length
  - phy-mode

additionalProperties: false

examples:
  - |
    ethernet@e180000 {
        compatible = "lantiq,etop-xway";
        reg = <0xe180000 0x40000>;
        interrupt-parent = <&icu0>;
        interrupts = <73>, <78>;
        interrupt-names = "tx", "rx";
        lantiq,tx-burst-length = <8>;
        lantiq,rx-burst-length = <8>;
        phy-mode = "rmii";
    };
