xref: /linux/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml (revision 6d359cf464f40baadf5e5595613c38a12f5829ef)
1*6d359cf4SMatthew Gerlach# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*6d359cf4SMatthew Gerlach%YAML 1.2
3*6d359cf4SMatthew Gerlach---
4*6d359cf4SMatthew Gerlach$id: http://devicetree.org/schemas/net/altr,socfpga-stmmac.yaml#
5*6d359cf4SMatthew Gerlach$schema: http://devicetree.org/meta-schemas/core.yaml#
6*6d359cf4SMatthew Gerlach
7*6d359cf4SMatthew Gerlachtitle: Altera SOCFPGA SoC DWMAC controller
8*6d359cf4SMatthew Gerlach
9*6d359cf4SMatthew Gerlachmaintainers:
10*6d359cf4SMatthew Gerlach  - Matthew Gerlach <matthew.gerlach@altera.com>
11*6d359cf4SMatthew Gerlach
12*6d359cf4SMatthew Gerlachdescription:
13*6d359cf4SMatthew Gerlach  This binding describes the Altera SOCFPGA SoC implementation of the
14*6d359cf4SMatthew Gerlach  Synopsys DWMAC for the Cyclone5, Arria5, Stratix10, and Agilex7 families
15*6d359cf4SMatthew Gerlach  of chips.
16*6d359cf4SMatthew Gerlach  # TODO: Determine how to handle the Arria10 reset-name, stmmaceth-ocp, that
17*6d359cf4SMatthew Gerlach  # does not validate against net/snps,dwmac.yaml.
18*6d359cf4SMatthew Gerlach
19*6d359cf4SMatthew Gerlachselect:
20*6d359cf4SMatthew Gerlach  properties:
21*6d359cf4SMatthew Gerlach    compatible:
22*6d359cf4SMatthew Gerlach      contains:
23*6d359cf4SMatthew Gerlach        enum:
24*6d359cf4SMatthew Gerlach          - altr,socfpga-stmmac
25*6d359cf4SMatthew Gerlach          - altr,socfpga-stmmac-a10-s10
26*6d359cf4SMatthew Gerlach
27*6d359cf4SMatthew Gerlach  required:
28*6d359cf4SMatthew Gerlach    - compatible
29*6d359cf4SMatthew Gerlach
30*6d359cf4SMatthew Gerlachproperties:
31*6d359cf4SMatthew Gerlach  compatible:
32*6d359cf4SMatthew Gerlach    oneOf:
33*6d359cf4SMatthew Gerlach      - items:
34*6d359cf4SMatthew Gerlach          - const: altr,socfpga-stmmac
35*6d359cf4SMatthew Gerlach          - const: snps,dwmac-3.70a
36*6d359cf4SMatthew Gerlach          - const: snps,dwmac
37*6d359cf4SMatthew Gerlach      - items:
38*6d359cf4SMatthew Gerlach          - const: altr,socfpga-stmmac-a10-s10
39*6d359cf4SMatthew Gerlach          - const: snps,dwmac-3.72a
40*6d359cf4SMatthew Gerlach          - const: snps,dwmac
41*6d359cf4SMatthew Gerlach      - items:
42*6d359cf4SMatthew Gerlach          - const: altr,socfpga-stmmac-a10-s10
43*6d359cf4SMatthew Gerlach          - const: snps,dwmac-3.74a
44*6d359cf4SMatthew Gerlach          - const: snps,dwmac
45*6d359cf4SMatthew Gerlach
46*6d359cf4SMatthew Gerlach  clocks:
47*6d359cf4SMatthew Gerlach    minItems: 1
48*6d359cf4SMatthew Gerlach    items:
49*6d359cf4SMatthew Gerlach      - description: GMAC main clock
50*6d359cf4SMatthew Gerlach      - description:
51*6d359cf4SMatthew Gerlach          PTP reference clock. This clock is used for programming the
52*6d359cf4SMatthew Gerlach          Timestamp Addend Register. If not passed then the system
53*6d359cf4SMatthew Gerlach          clock will be used and this is fine on some platforms.
54*6d359cf4SMatthew Gerlach
55*6d359cf4SMatthew Gerlach  clock-names:
56*6d359cf4SMatthew Gerlach    minItems: 1
57*6d359cf4SMatthew Gerlach    items:
58*6d359cf4SMatthew Gerlach      - const: stmmaceth
59*6d359cf4SMatthew Gerlach      - const: ptp_ref
60*6d359cf4SMatthew Gerlach
61*6d359cf4SMatthew Gerlach  iommus:
62*6d359cf4SMatthew Gerlach    maxItems: 2
63*6d359cf4SMatthew Gerlach
64*6d359cf4SMatthew Gerlach  phy-mode:
65*6d359cf4SMatthew Gerlach    enum:
66*6d359cf4SMatthew Gerlach      - gmii
67*6d359cf4SMatthew Gerlach      - mii
68*6d359cf4SMatthew Gerlach      - rgmii
69*6d359cf4SMatthew Gerlach      - rgmii-id
70*6d359cf4SMatthew Gerlach      - rgmii-rxid
71*6d359cf4SMatthew Gerlach      - rgmii-txid
72*6d359cf4SMatthew Gerlach      - sgmii
73*6d359cf4SMatthew Gerlach      - 1000base-x
74*6d359cf4SMatthew Gerlach
75*6d359cf4SMatthew Gerlach  rxc-skew-ps:
76*6d359cf4SMatthew Gerlach    description: Skew control of RXC pad
77*6d359cf4SMatthew Gerlach
78*6d359cf4SMatthew Gerlach  rxd0-skew-ps:
79*6d359cf4SMatthew Gerlach    description: Skew control of RX data 0 pad
80*6d359cf4SMatthew Gerlach
81*6d359cf4SMatthew Gerlach  rxd1-skew-ps:
82*6d359cf4SMatthew Gerlach    description: Skew control of RX data 1 pad
83*6d359cf4SMatthew Gerlach
84*6d359cf4SMatthew Gerlach  rxd2-skew-ps:
85*6d359cf4SMatthew Gerlach    description: Skew control of RX data 2 pad
86*6d359cf4SMatthew Gerlach
87*6d359cf4SMatthew Gerlach  rxd3-skew-ps:
88*6d359cf4SMatthew Gerlach    description: Skew control of RX data 3 pad
89*6d359cf4SMatthew Gerlach
90*6d359cf4SMatthew Gerlach  rxdv-skew-ps:
91*6d359cf4SMatthew Gerlach    description: Skew control of RX CTL pad
92*6d359cf4SMatthew Gerlach
93*6d359cf4SMatthew Gerlach  txc-skew-ps:
94*6d359cf4SMatthew Gerlach    description: Skew control of TXC pad
95*6d359cf4SMatthew Gerlach
96*6d359cf4SMatthew Gerlach  txen-skew-ps:
97*6d359cf4SMatthew Gerlach    description: Skew control of TXC pad
98*6d359cf4SMatthew Gerlach
99*6d359cf4SMatthew Gerlach  altr,emac-splitter:
100*6d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle
101*6d359cf4SMatthew Gerlach    description:
102*6d359cf4SMatthew Gerlach      Should be the phandle to the emac splitter soft IP node if DWMAC
103*6d359cf4SMatthew Gerlach      controller is connected an emac splitter.
104*6d359cf4SMatthew Gerlach
105*6d359cf4SMatthew Gerlach  altr,f2h_ptp_ref_clk:
106*6d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle
107*6d359cf4SMatthew Gerlach    description:
108*6d359cf4SMatthew Gerlach      Phandle to Precision Time Protocol reference clock. This clock is
109*6d359cf4SMatthew Gerlach      common to gmac instances and defaults to osc1.
110*6d359cf4SMatthew Gerlach
111*6d359cf4SMatthew Gerlach  altr,gmii-to-sgmii-converter:
112*6d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle
113*6d359cf4SMatthew Gerlach    description:
114*6d359cf4SMatthew Gerlach      Should be the phandle to the gmii to sgmii converter soft IP.
115*6d359cf4SMatthew Gerlach
116*6d359cf4SMatthew Gerlach  altr,sysmgr-syscon:
117*6d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle-array
118*6d359cf4SMatthew Gerlach    description:
119*6d359cf4SMatthew Gerlach      Should be the phandle to the system manager node that encompass
120*6d359cf4SMatthew Gerlach      the glue register, the register offset, and the register shift.
121*6d359cf4SMatthew Gerlach      On Cyclone5/Arria5, the register shift represents the PHY mode
122*6d359cf4SMatthew Gerlach      bits, while on the Arria10/Stratix10/Agilex platforms, the
123*6d359cf4SMatthew Gerlach      register shift represents bit for each emac to enable/disable
124*6d359cf4SMatthew Gerlach      signals from the FPGA fabric to the EMAC modules.
125*6d359cf4SMatthew Gerlach    items:
126*6d359cf4SMatthew Gerlach      - items:
127*6d359cf4SMatthew Gerlach          - description: phandle to the system manager node
128*6d359cf4SMatthew Gerlach          - description: offset of the control register
129*6d359cf4SMatthew Gerlach          - description: shift within the control register
130*6d359cf4SMatthew Gerlach
131*6d359cf4SMatthew GerlachpatternProperties:
132*6d359cf4SMatthew Gerlach  "^mdio[0-9]$":
133*6d359cf4SMatthew Gerlach    type: object
134*6d359cf4SMatthew Gerlach
135*6d359cf4SMatthew Gerlachrequired:
136*6d359cf4SMatthew Gerlach  - compatible
137*6d359cf4SMatthew Gerlach  - clocks
138*6d359cf4SMatthew Gerlach  - clock-names
139*6d359cf4SMatthew Gerlach  - altr,sysmgr-syscon
140*6d359cf4SMatthew Gerlach
141*6d359cf4SMatthew GerlachallOf:
142*6d359cf4SMatthew Gerlach  - $ref: snps,dwmac.yaml#
143*6d359cf4SMatthew Gerlach
144*6d359cf4SMatthew GerlachunevaluatedProperties: false
145*6d359cf4SMatthew Gerlach
146*6d359cf4SMatthew Gerlachexamples:
147*6d359cf4SMatthew Gerlach
148*6d359cf4SMatthew Gerlach  - |
149*6d359cf4SMatthew Gerlach    #include <dt-bindings/interrupt-controller/arm-gic.h>
150*6d359cf4SMatthew Gerlach    #include <dt-bindings/interrupt-controller/irq.h>
151*6d359cf4SMatthew Gerlach    soc {
152*6d359cf4SMatthew Gerlach        #address-cells = <1>;
153*6d359cf4SMatthew Gerlach        #size-cells = <1>;
154*6d359cf4SMatthew Gerlach        ethernet@ff700000 {
155*6d359cf4SMatthew Gerlach            compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a",
156*6d359cf4SMatthew Gerlach            "snps,dwmac";
157*6d359cf4SMatthew Gerlach            altr,sysmgr-syscon = <&sysmgr 0x60 0>;
158*6d359cf4SMatthew Gerlach            reg = <0xff700000 0x2000>;
159*6d359cf4SMatthew Gerlach            interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
160*6d359cf4SMatthew Gerlach            interrupt-names = "macirq";
161*6d359cf4SMatthew Gerlach            mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
162*6d359cf4SMatthew Gerlach            clocks = <&emac_0_clk>;
163*6d359cf4SMatthew Gerlach            clock-names = "stmmaceth";
164*6d359cf4SMatthew Gerlach            phy-mode = "sgmii";
165*6d359cf4SMatthew Gerlach        };
166*6d359cf4SMatthew Gerlach    };
167