xref: /linux/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml (revision bfc64d9b7e8cac82be6b8629865e137d962578f8)
1cbb1ca6dSRadhey Shyam Pandey# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2cbb1ca6dSRadhey Shyam Pandey%YAML 1.2
3cbb1ca6dSRadhey Shyam Pandey---
4cbb1ca6dSRadhey Shyam Pandey$id: http://devicetree.org/schemas/net/xlnx,axi-ethernet.yaml#
5cbb1ca6dSRadhey Shyam Pandey$schema: http://devicetree.org/meta-schemas/core.yaml#
6cbb1ca6dSRadhey Shyam Pandey
7cbb1ca6dSRadhey Shyam Pandeytitle: AXI 1G/2.5G Ethernet Subsystem
8cbb1ca6dSRadhey Shyam Pandey
9cbb1ca6dSRadhey Shyam Pandeydescription: |
10cbb1ca6dSRadhey Shyam Pandey  Also called  AXI 1G/2.5G Ethernet Subsystem, the xilinx axi ethernet IP core
11cbb1ca6dSRadhey Shyam Pandey  provides connectivity to an external ethernet PHY supporting different
12cbb1ca6dSRadhey Shyam Pandey  interfaces: MII, GMII, RGMII, SGMII, 1000BaseX. It also includes two
13cbb1ca6dSRadhey Shyam Pandey  segments of memory for buffering TX and RX, as well as the capability of
14cbb1ca6dSRadhey Shyam Pandey  offloading TX/RX checksum calculation off the processor.
15cbb1ca6dSRadhey Shyam Pandey
16cbb1ca6dSRadhey Shyam Pandey  Management configuration is done through the AXI interface, while payload is
17cbb1ca6dSRadhey Shyam Pandey  sent and received through means of an AXI DMA controller. This driver
18cbb1ca6dSRadhey Shyam Pandey  includes the DMA driver code, so this driver is incompatible with AXI DMA
19cbb1ca6dSRadhey Shyam Pandey  driver.
20cbb1ca6dSRadhey Shyam Pandey
21cbb1ca6dSRadhey Shyam Pandeymaintainers:
22cbb1ca6dSRadhey Shyam Pandey  - Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
23cbb1ca6dSRadhey Shyam Pandey
24cbb1ca6dSRadhey Shyam Pandeyproperties:
25cbb1ca6dSRadhey Shyam Pandey  compatible:
26cbb1ca6dSRadhey Shyam Pandey    enum:
27cbb1ca6dSRadhey Shyam Pandey      - xlnx,axi-ethernet-1.00.a
28cbb1ca6dSRadhey Shyam Pandey      - xlnx,axi-ethernet-1.01.a
29cbb1ca6dSRadhey Shyam Pandey      - xlnx,axi-ethernet-2.01.a
30cbb1ca6dSRadhey Shyam Pandey
31cbb1ca6dSRadhey Shyam Pandey  reg:
32cbb1ca6dSRadhey Shyam Pandey    description:
33cbb1ca6dSRadhey Shyam Pandey      Address and length of the IO space, as well as the address
34cbb1ca6dSRadhey Shyam Pandey      and length of the AXI DMA controller IO space, unless
35cbb1ca6dSRadhey Shyam Pandey      axistream-connected is specified, in which case the reg
36cbb1ca6dSRadhey Shyam Pandey      attribute of the node referenced by it is used.
37c6929644SRavikanth Tuniki    minItems: 1
38cbb1ca6dSRadhey Shyam Pandey    maxItems: 2
39cbb1ca6dSRadhey Shyam Pandey
40cbb1ca6dSRadhey Shyam Pandey  interrupts:
41cbb1ca6dSRadhey Shyam Pandey    items:
42cbb1ca6dSRadhey Shyam Pandey      - description: Ethernet core interrupt
43cbb1ca6dSRadhey Shyam Pandey      - description: Tx DMA interrupt
44cbb1ca6dSRadhey Shyam Pandey      - description: Rx DMA interrupt
45cbb1ca6dSRadhey Shyam Pandey    description:
46cbb1ca6dSRadhey Shyam Pandey      Ethernet core interrupt is optional. If axistream-connected property is
47cbb1ca6dSRadhey Shyam Pandey      present DMA node should contains TX/RX DMA interrupts else DMA interrupt
48cbb1ca6dSRadhey Shyam Pandey      resources are mentioned on ethernet node.
49cbb1ca6dSRadhey Shyam Pandey    minItems: 1
50cbb1ca6dSRadhey Shyam Pandey
51cbb1ca6dSRadhey Shyam Pandey  phy-handle: true
52cbb1ca6dSRadhey Shyam Pandey
53cbb1ca6dSRadhey Shyam Pandey  xlnx,rxmem:
54cbb1ca6dSRadhey Shyam Pandey    description:
55cbb1ca6dSRadhey Shyam Pandey      Set to allocated memory buffer for Rx/Tx in the hardware.
56cbb1ca6dSRadhey Shyam Pandey    $ref: /schemas/types.yaml#/definitions/uint32
57cbb1ca6dSRadhey Shyam Pandey
58cbb1ca6dSRadhey Shyam Pandey  phy-mode:
59cbb1ca6dSRadhey Shyam Pandey    enum:
60cbb1ca6dSRadhey Shyam Pandey      - mii
61cbb1ca6dSRadhey Shyam Pandey      - gmii
62cbb1ca6dSRadhey Shyam Pandey      - rgmii
63cbb1ca6dSRadhey Shyam Pandey      - sgmii
64*b2183187SSuraj Gupta      - 1000base-x
65cbb1ca6dSRadhey Shyam Pandey
66cbb1ca6dSRadhey Shyam Pandey  xlnx,phy-type:
67cbb1ca6dSRadhey Shyam Pandey    description:
68cbb1ca6dSRadhey Shyam Pandey      Do not use, but still accepted in preference to phy-mode.
69cbb1ca6dSRadhey Shyam Pandey    deprecated: true
70cbb1ca6dSRadhey Shyam Pandey    $ref: /schemas/types.yaml#/definitions/uint32
71cbb1ca6dSRadhey Shyam Pandey
72cbb1ca6dSRadhey Shyam Pandey  xlnx,txcsum:
73cbb1ca6dSRadhey Shyam Pandey    description:
74cbb1ca6dSRadhey Shyam Pandey      TX checksum offload. 0 or empty for disabling TX checksum offload,
75cbb1ca6dSRadhey Shyam Pandey      1 to enable partial TX checksum offload and 2 to enable full TX
76cbb1ca6dSRadhey Shyam Pandey      checksum offload.
77cbb1ca6dSRadhey Shyam Pandey    $ref: /schemas/types.yaml#/definitions/uint32
78cbb1ca6dSRadhey Shyam Pandey    enum: [0, 1, 2]
79cbb1ca6dSRadhey Shyam Pandey
80cbb1ca6dSRadhey Shyam Pandey  xlnx,rxcsum:
81cbb1ca6dSRadhey Shyam Pandey    description:
82cbb1ca6dSRadhey Shyam Pandey      RX checksum offload. 0 or empty for disabling RX checksum offload,
83cbb1ca6dSRadhey Shyam Pandey      1 to enable partial RX checksum offload and 2 to enable full RX
84cbb1ca6dSRadhey Shyam Pandey      checksum offload.
85cbb1ca6dSRadhey Shyam Pandey    $ref: /schemas/types.yaml#/definitions/uint32
86cbb1ca6dSRadhey Shyam Pandey    enum: [0, 1, 2]
87cbb1ca6dSRadhey Shyam Pandey
88cbb1ca6dSRadhey Shyam Pandey  xlnx,switch-x-sgmii:
89cbb1ca6dSRadhey Shyam Pandey    type: boolean
90cbb1ca6dSRadhey Shyam Pandey    description:
91cbb1ca6dSRadhey Shyam Pandey      Indicate the Ethernet core is configured to support both 1000BaseX and
92cbb1ca6dSRadhey Shyam Pandey      SGMII modes. If set, the phy-mode should be set to match the mode
93cbb1ca6dSRadhey Shyam Pandey      selected on core reset (i.e. by the basex_or_sgmii core input line).
94cbb1ca6dSRadhey Shyam Pandey
95cbb1ca6dSRadhey Shyam Pandey  clocks:
96cbb1ca6dSRadhey Shyam Pandey    items:
97cbb1ca6dSRadhey Shyam Pandey      - description: Clock for AXI register slave interface.
98cbb1ca6dSRadhey Shyam Pandey      - description: AXI4-Stream clock for TXD RXD TXC and RXS interfaces.
99cbb1ca6dSRadhey Shyam Pandey      - description: Ethernet reference clock, used by signal delay primitives
100cbb1ca6dSRadhey Shyam Pandey                     and transceivers.
101cbb1ca6dSRadhey Shyam Pandey      - description: MGT reference clock (used by optional internal PCS/PMA PHY)
102cbb1ca6dSRadhey Shyam Pandey
103cbb1ca6dSRadhey Shyam Pandey  clock-names:
104cbb1ca6dSRadhey Shyam Pandey    items:
105cbb1ca6dSRadhey Shyam Pandey      - const: s_axi_lite_clk
106cbb1ca6dSRadhey Shyam Pandey      - const: axis_clk
107cbb1ca6dSRadhey Shyam Pandey      - const: ref_clk
108cbb1ca6dSRadhey Shyam Pandey      - const: mgt_clk
109cbb1ca6dSRadhey Shyam Pandey
110cbb1ca6dSRadhey Shyam Pandey  axistream-connected:
111cbb1ca6dSRadhey Shyam Pandey    $ref: /schemas/types.yaml#/definitions/phandle
112cbb1ca6dSRadhey Shyam Pandey    description: Phandle of AXI DMA controller which contains the resources
113cbb1ca6dSRadhey Shyam Pandey      used by this device. If this is specified, the DMA-related resources
114cbb1ca6dSRadhey Shyam Pandey      from that device (DMA registers and DMA TX/RX interrupts) rather than
115cbb1ca6dSRadhey Shyam Pandey      this one will be used.
116cbb1ca6dSRadhey Shyam Pandey
117cbb1ca6dSRadhey Shyam Pandey  mdio:
118cbb1ca6dSRadhey Shyam Pandey    type: object
119cbb1ca6dSRadhey Shyam Pandey
120cbb1ca6dSRadhey Shyam Pandey  pcs-handle:
121cbb1ca6dSRadhey Shyam Pandey    description: Phandle to the internal PCS/PMA PHY in SGMII or 1000Base-X
122cbb1ca6dSRadhey Shyam Pandey      modes, where "pcs-handle" should be used to point to the PCS/PMA PHY,
123cbb1ca6dSRadhey Shyam Pandey      and "phy-handle" should point to an external PHY if exists.
124cbb1ca6dSRadhey Shyam Pandey    maxItems: 1
125cbb1ca6dSRadhey Shyam Pandey
1265e63c5efSRadhey Shyam Pandey  dmas:
1275e63c5efSRadhey Shyam Pandey    minItems: 2
1285e63c5efSRadhey Shyam Pandey    maxItems: 32
1295e63c5efSRadhey Shyam Pandey    description: TX and RX DMA channel phandle
1305e63c5efSRadhey Shyam Pandey
1315e63c5efSRadhey Shyam Pandey  dma-names:
1325e63c5efSRadhey Shyam Pandey    items:
1335e63c5efSRadhey Shyam Pandey      pattern: "^[tr]x_chan([0-9]|1[0-5])$"
1345e63c5efSRadhey Shyam Pandey    description:
1355e63c5efSRadhey Shyam Pandey      Should be "tx_chan0", "tx_chan1" ... "tx_chan15" for DMA Tx channel
1365e63c5efSRadhey Shyam Pandey      Should be "rx_chan0", "rx_chan1" ... "rx_chan15" for DMA Rx channel
1375e63c5efSRadhey Shyam Pandey    minItems: 2
1385e63c5efSRadhey Shyam Pandey    maxItems: 32
1395e63c5efSRadhey Shyam Pandey
140cbb1ca6dSRadhey Shyam Pandeyrequired:
141cbb1ca6dSRadhey Shyam Pandey  - compatible
142cbb1ca6dSRadhey Shyam Pandey  - interrupts
143cbb1ca6dSRadhey Shyam Pandey  - reg
144cbb1ca6dSRadhey Shyam Pandey  - xlnx,rxmem
145cbb1ca6dSRadhey Shyam Pandey  - phy-handle
146cbb1ca6dSRadhey Shyam Pandey
147cbb1ca6dSRadhey Shyam PandeyallOf:
148cbb1ca6dSRadhey Shyam Pandey  - $ref: /schemas/net/ethernet-controller.yaml#
149cbb1ca6dSRadhey Shyam Pandey
150cbb1ca6dSRadhey Shyam PandeyadditionalProperties: false
151cbb1ca6dSRadhey Shyam Pandey
152cbb1ca6dSRadhey Shyam Pandeyexamples:
153cbb1ca6dSRadhey Shyam Pandey  - |
154cbb1ca6dSRadhey Shyam Pandey    axi_ethernet_eth: ethernet@40c00000 {
155cbb1ca6dSRadhey Shyam Pandey        compatible = "xlnx,axi-ethernet-1.00.a";
156cbb1ca6dSRadhey Shyam Pandey        interrupts = <2 0 1>;
157cbb1ca6dSRadhey Shyam Pandey        clock-names = "s_axi_lite_clk", "axis_clk", "ref_clk", "mgt_clk";
158cbb1ca6dSRadhey Shyam Pandey        clocks = <&axi_clk>, <&axi_clk>, <&pl_enet_ref_clk>, <&mgt_clk>;
159cbb1ca6dSRadhey Shyam Pandey        phy-mode = "mii";
160cbb1ca6dSRadhey Shyam Pandey        reg = <0x40c00000 0x40000>,<0x50c00000 0x40000>;
1615e63c5efSRadhey Shyam Pandey        dmas = <&xilinx_dma 0>, <&xilinx_dma 1>;
1625e63c5efSRadhey Shyam Pandey        dma-names = "tx_chan0", "rx_chan0";
163cbb1ca6dSRadhey Shyam Pandey        xlnx,rxcsum = <0x2>;
164cbb1ca6dSRadhey Shyam Pandey        xlnx,rxmem = <0x800>;
165cbb1ca6dSRadhey Shyam Pandey        xlnx,txcsum = <0x2>;
166cbb1ca6dSRadhey Shyam Pandey        phy-handle = <&phy0>;
167cbb1ca6dSRadhey Shyam Pandey
168cbb1ca6dSRadhey Shyam Pandey        mdio {
169cbb1ca6dSRadhey Shyam Pandey            #address-cells = <1>;
170cbb1ca6dSRadhey Shyam Pandey            #size-cells = <0>;
171cbb1ca6dSRadhey Shyam Pandey            phy0: ethernet-phy@1 {
172cbb1ca6dSRadhey Shyam Pandey                device_type = "ethernet-phy";
173cbb1ca6dSRadhey Shyam Pandey                reg = <1>;
174cbb1ca6dSRadhey Shyam Pandey            };
175cbb1ca6dSRadhey Shyam Pandey        };
176cbb1ca6dSRadhey Shyam Pandey    };
177cbb1ca6dSRadhey Shyam Pandey
178cbb1ca6dSRadhey Shyam Pandey  - |
179cbb1ca6dSRadhey Shyam Pandey    axi_ethernet_eth1: ethernet@40000000 {
180cbb1ca6dSRadhey Shyam Pandey        compatible = "xlnx,axi-ethernet-1.00.a";
181cbb1ca6dSRadhey Shyam Pandey        interrupts = <0>;
182cbb1ca6dSRadhey Shyam Pandey        clock-names = "s_axi_lite_clk", "axis_clk", "ref_clk", "mgt_clk";
183cbb1ca6dSRadhey Shyam Pandey        clocks = <&axi_clk>, <&axi_clk>, <&pl_enet_ref_clk>, <&mgt_clk>;
184cbb1ca6dSRadhey Shyam Pandey        phy-mode = "mii";
185c6929644SRavikanth Tuniki        reg = <0x40000000 0x40000>;
186cbb1ca6dSRadhey Shyam Pandey        xlnx,rxcsum = <0x2>;
187cbb1ca6dSRadhey Shyam Pandey        xlnx,rxmem = <0x800>;
188cbb1ca6dSRadhey Shyam Pandey        xlnx,txcsum = <0x2>;
189cbb1ca6dSRadhey Shyam Pandey        phy-handle = <&phy1>;
190cbb1ca6dSRadhey Shyam Pandey        axistream-connected = <&dma>;
191cbb1ca6dSRadhey Shyam Pandey
192cbb1ca6dSRadhey Shyam Pandey        mdio {
193cbb1ca6dSRadhey Shyam Pandey            #address-cells = <1>;
194cbb1ca6dSRadhey Shyam Pandey            #size-cells = <0>;
195cbb1ca6dSRadhey Shyam Pandey            phy1: ethernet-phy@1 {
196cbb1ca6dSRadhey Shyam Pandey                device_type = "ethernet-phy";
197cbb1ca6dSRadhey Shyam Pandey                reg = <1>;
198cbb1ca6dSRadhey Shyam Pandey            };
199cbb1ca6dSRadhey Shyam Pandey        };
200cbb1ca6dSRadhey Shyam Pandey    };
201