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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/altr,socfpga-stmmac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera SOCFPGA SoC DWMAC controller
maintainers:
- Matthew Gerlach <matthew.gerlach@altera.com>
description:
This binding describes the Altera SOCFPGA SoC implementation of the
Synopsys DWMAC for the Cyclone5, Arria5, Stratix10, Agilex5 and Agilex7
families of chips.
# TODO: Determine how to handle the Arria10 reset-name, stmmaceth-ocp, that
# does not validate against net/snps,dwmac.yaml.
select:
properties:
compatible:
contains:
enum:
- altr,socfpga-stmmac
- altr,socfpga-stmmac-a10-s10
- altr,socfpga-stmmac-agilex5
required:
- compatible
properties:
compatible:
oneOf:
- items:
- const: altr,socfpga-stmmac
- const: snps,dwmac-3.70a
- const: snps,dwmac
- items:
- const: altr,socfpga-stmmac-a10-s10
- const: snps,dwmac-3.72a
- const: snps,dwmac
- items:
- const: altr,socfpga-stmmac-a10-s10
- const: snps,dwmac-3.74a
- const: snps,dwmac
- items:
- const: altr,socfpga-stmmac-agilex5
- const: snps,dwxgmac-2.10
clocks:
minItems: 1
items:
- description: GMAC main clock
- description:
PTP reference clock. This clock is used for programming the
Timestamp Addend Register. If not passed then the system
clock will be used and this is fine on some platforms.
clock-names:
minItems: 1
items:
- const: stmmaceth
- const: ptp_ref
iommus:
minItems: 1
maxItems: 2
phy-mode:
enum:
- gmii
- mii
- rgmii
- rgmii-id
- rgmii-rxid
- rgmii-txid
- sgmii
- 1000base-x
rxc-skew-ps:
description: Skew control of RXC pad
rxd0-skew-ps:
description: Skew control of RX data 0 pad
rxd1-skew-ps:
description: Skew control of RX data 1 pad
rxd2-skew-ps:
description: Skew control of RX data 2 pad
rxd3-skew-ps:
description: Skew control of RX data 3 pad
rxdv-skew-ps:
description: Skew control of RX CTL pad
txc-skew-ps:
description: Skew control of TXC pad
txen-skew-ps:
description: Skew control of TXC pad
altr,emac-splitter:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Should be the phandle to the emac splitter soft IP node if DWMAC
controller is connected an emac splitter.
altr,f2h_ptp_ref_clk:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to Precision Time Protocol reference clock. This clock is
common to gmac instances and defaults to osc1.
altr,gmii-to-sgmii-converter:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Should be the phandle to the gmii to sgmii converter soft IP.
altr,sysmgr-syscon:
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
Should be the phandle to the system manager node that encompass
the glue register, the register offset, and the register shift.
On Cyclone5/Arria5, the register shift represents the PHY mode
bits, while on the Arria10/Stratix10/Agilex platforms, the
register shift represents bit for each emac to enable/disable
signals from the FPGA fabric to the EMAC modules.
items:
- items:
- description: phandle to the system manager node
- description: offset of the control register
- description: shift within the control register
patternProperties:
"^mdio[0-9]$":
type: object
required:
- compatible
- clocks
- clock-names
- altr,sysmgr-syscon
allOf:
- $ref: snps,dwmac.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
soc {
#address-cells = <1>;
#size-cells = <1>;
ethernet@ff700000 {
compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a",
"snps,dwmac";
altr,sysmgr-syscon = <&sysmgr 0x60 0>;
reg = <0xff700000 0x2000>;
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
clocks = <&emac_0_clk>;
clock-names = "stmmaceth";
phy-mode = "sgmii";
};
};
|