xref: /linux/Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1*bb30400aSInochi Amaoto# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*bb30400aSInochi Amaoto%YAML 1.2
3*bb30400aSInochi Amaoto---
4*bb30400aSInochi Amaoto$id: http://devicetree.org/schemas/net/spacemit,k3-dwmac.yaml#
5*bb30400aSInochi Amaoto$schema: http://devicetree.org/meta-schemas/core.yaml#
6*bb30400aSInochi Amaoto
7*bb30400aSInochi Amaototitle: Spacemit K3 DWMAC glue layer
8*bb30400aSInochi Amaoto
9*bb30400aSInochi Amaotomaintainers:
10*bb30400aSInochi Amaoto  - Inochi Amaoto <inochiama@gmail.com>
11*bb30400aSInochi Amaoto
12*bb30400aSInochi Amaotoselect:
13*bb30400aSInochi Amaoto  properties:
14*bb30400aSInochi Amaoto    compatible:
15*bb30400aSInochi Amaoto      contains:
16*bb30400aSInochi Amaoto        const: spacemit,k3-dwmac
17*bb30400aSInochi Amaoto  required:
18*bb30400aSInochi Amaoto    - compatible
19*bb30400aSInochi Amaoto
20*bb30400aSInochi Amaotoproperties:
21*bb30400aSInochi Amaoto  compatible:
22*bb30400aSInochi Amaoto    items:
23*bb30400aSInochi Amaoto      - const: spacemit,k3-dwmac
24*bb30400aSInochi Amaoto      - const: snps,dwmac-5.40a
25*bb30400aSInochi Amaoto
26*bb30400aSInochi Amaoto  reg:
27*bb30400aSInochi Amaoto    maxItems: 1
28*bb30400aSInochi Amaoto
29*bb30400aSInochi Amaoto  clocks:
30*bb30400aSInochi Amaoto    items:
31*bb30400aSInochi Amaoto      - description: GMAC application clock
32*bb30400aSInochi Amaoto      - description: PTP clock
33*bb30400aSInochi Amaoto      - description: TX clock
34*bb30400aSInochi Amaoto
35*bb30400aSInochi Amaoto  clock-names:
36*bb30400aSInochi Amaoto    items:
37*bb30400aSInochi Amaoto      - const: stmmaceth
38*bb30400aSInochi Amaoto      - const: ptp_ref
39*bb30400aSInochi Amaoto      - const: tx
40*bb30400aSInochi Amaoto
41*bb30400aSInochi Amaoto  interrupts:
42*bb30400aSInochi Amaoto    minItems: 1
43*bb30400aSInochi Amaoto    items:
44*bb30400aSInochi Amaoto      - description: MAC interrupt
45*bb30400aSInochi Amaoto      - description: MAC wake interrupt
46*bb30400aSInochi Amaoto
47*bb30400aSInochi Amaoto  interrupt-names:
48*bb30400aSInochi Amaoto    minItems: 1
49*bb30400aSInochi Amaoto    items:
50*bb30400aSInochi Amaoto      - const: macirq
51*bb30400aSInochi Amaoto      - const: eth_wake_irq
52*bb30400aSInochi Amaoto
53*bb30400aSInochi Amaoto  resets:
54*bb30400aSInochi Amaoto    maxItems: 1
55*bb30400aSInochi Amaoto
56*bb30400aSInochi Amaoto  reset-names:
57*bb30400aSInochi Amaoto    const: stmmaceth
58*bb30400aSInochi Amaoto
59*bb30400aSInochi Amaoto  spacemit,apmu:
60*bb30400aSInochi Amaoto    $ref: /schemas/types.yaml#/definitions/phandle-array
61*bb30400aSInochi Amaoto    items:
62*bb30400aSInochi Amaoto      - items:
63*bb30400aSInochi Amaoto          - description: phandle to the syscon node which control the glue register
64*bb30400aSInochi Amaoto          - description: offset of the control register
65*bb30400aSInochi Amaoto          - description: offset of the dline register
66*bb30400aSInochi Amaoto    description:
67*bb30400aSInochi Amaoto      A phandle to syscon with offset to control registers for this MAC
68*bb30400aSInochi Amaoto
69*bb30400aSInochi Amaotorequired:
70*bb30400aSInochi Amaoto  - compatible
71*bb30400aSInochi Amaoto  - reg
72*bb30400aSInochi Amaoto  - clocks
73*bb30400aSInochi Amaoto  - clock-names
74*bb30400aSInochi Amaoto  - interrupts
75*bb30400aSInochi Amaoto  - interrupt-names
76*bb30400aSInochi Amaoto  - resets
77*bb30400aSInochi Amaoto  - reset-names
78*bb30400aSInochi Amaoto  - spacemit,apmu
79*bb30400aSInochi Amaoto
80*bb30400aSInochi AmaotoallOf:
81*bb30400aSInochi Amaoto  - $ref: snps,dwmac.yaml#
82*bb30400aSInochi Amaoto
83*bb30400aSInochi AmaotounevaluatedProperties: false
84*bb30400aSInochi Amaoto
85*bb30400aSInochi Amaotoexamples:
86*bb30400aSInochi Amaoto  - |
87*bb30400aSInochi Amaoto    #include <dt-bindings/interrupt-controller/irq.h>
88*bb30400aSInochi Amaoto
89*bb30400aSInochi Amaoto    ethernet@cac80000 {
90*bb30400aSInochi Amaoto      compatible = "spacemit,k3-dwmac", "snps,dwmac-5.40a";
91*bb30400aSInochi Amaoto      reg = <0xcac80000 0x2000>;
92*bb30400aSInochi Amaoto      clocks = <&syscon_apmu 66>, <&syscon_apmu 68>,
93*bb30400aSInochi Amaoto               <&syscon_apmu 69>;
94*bb30400aSInochi Amaoto      clock-names = "stmmaceth", "ptp_ref", "tx";
95*bb30400aSInochi Amaoto      interrupts = <131 IRQ_TYPE_LEVEL_HIGH>, <276 IRQ_TYPE_LEVEL_HIGH>;
96*bb30400aSInochi Amaoto      interrupt-names = "macirq", "eth_wake_irq";
97*bb30400aSInochi Amaoto      phy-mode = "rgmii-id";
98*bb30400aSInochi Amaoto      phy-handle = <&phy0>;
99*bb30400aSInochi Amaoto      resets = <&syscon_apmu 67>;
100*bb30400aSInochi Amaoto      reset-names = "stmmaceth";
101*bb30400aSInochi Amaoto      spacemit,apmu = <&syscon_apmu 0x384 0x38c>;
102*bb30400aSInochi Amaoto    };
103