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