summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml
blob: 678eccf044f975eb0bed16e7052532e5f19502db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/spacemit,k3-dwmac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Spacemit K3 DWMAC glue layer

maintainers:
  - Inochi Amaoto <inochiama@gmail.com>

select:
  properties:
    compatible:
      contains:
        const: spacemit,k3-dwmac
  required:
    - compatible

properties:
  compatible:
    items:
      - const: spacemit,k3-dwmac
      - const: snps,dwmac-5.40a

  reg:
    maxItems: 1

  clocks:
    items:
      - description: GMAC application clock
      - description: PTP clock
      - description: TX clock

  clock-names:
    items:
      - const: stmmaceth
      - const: ptp_ref
      - const: tx

  interrupts:
    minItems: 1
    items:
      - description: MAC interrupt
      - description: MAC wake interrupt

  interrupt-names:
    minItems: 1
    items:
      - const: macirq
      - const: eth_wake_irq

  resets:
    maxItems: 1

  reset-names:
    const: stmmaceth

  spacemit,apmu:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: phandle to the syscon node which control the glue register
          - description: offset of the control register
          - description: offset of the dline register
    description:
      A phandle to syscon with offset to control registers for this MAC

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts
  - interrupt-names
  - resets
  - reset-names
  - spacemit,apmu

allOf:
  - $ref: snps,dwmac.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    ethernet@cac80000 {
      compatible = "spacemit,k3-dwmac", "snps,dwmac-5.40a";
      reg = <0xcac80000 0x2000>;
      clocks = <&syscon_apmu 66>, <&syscon_apmu 68>,
               <&syscon_apmu 69>;
      clock-names = "stmmaceth", "ptp_ref", "tx";
      interrupts = <131 IRQ_TYPE_LEVEL_HIGH>, <276 IRQ_TYPE_LEVEL_HIGH>;
      interrupt-names = "macirq", "eth_wake_irq";
      phy-mode = "rgmii-id";
      phy-handle = <&phy0>;
      resets = <&syscon_apmu 67>;
      reset-names = "stmmaceth";
      spacemit,apmu = <&syscon_apmu 0x384 0x38c>;
    };