1*354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2*354d7675SEmmanuel Vadot%YAML 1.2 3*354d7675SEmmanuel Vadot--- 4*354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/net/fsl,fec.yaml# 5*354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*354d7675SEmmanuel Vadot 7*354d7675SEmmanuel Vadottitle: Freescale Fast Ethernet Controller (FEC) 8*354d7675SEmmanuel Vadot 9*354d7675SEmmanuel Vadotmaintainers: 10*354d7675SEmmanuel Vadot - Joakim Zhang <qiangqing.zhang@nxp.com> 11*354d7675SEmmanuel Vadot 12*354d7675SEmmanuel VadotallOf: 13*354d7675SEmmanuel Vadot - $ref: ethernet-controller.yaml# 14*354d7675SEmmanuel Vadot 15*354d7675SEmmanuel Vadotproperties: 16*354d7675SEmmanuel Vadot compatible: 17*354d7675SEmmanuel Vadot oneOf: 18*354d7675SEmmanuel Vadot - enum: 19*354d7675SEmmanuel Vadot - fsl,imx25-fec 20*354d7675SEmmanuel Vadot - fsl,imx27-fec 21*354d7675SEmmanuel Vadot - fsl,imx28-fec 22*354d7675SEmmanuel Vadot - fsl,imx6q-fec 23*354d7675SEmmanuel Vadot - fsl,mvf600-fec 24*354d7675SEmmanuel Vadot - items: 25*354d7675SEmmanuel Vadot - enum: 26*354d7675SEmmanuel Vadot - fsl,imx53-fec 27*354d7675SEmmanuel Vadot - fsl,imx6sl-fec 28*354d7675SEmmanuel Vadot - const: fsl,imx25-fec 29*354d7675SEmmanuel Vadot - items: 30*354d7675SEmmanuel Vadot - enum: 31*354d7675SEmmanuel Vadot - fsl,imx35-fec 32*354d7675SEmmanuel Vadot - fsl,imx51-fec 33*354d7675SEmmanuel Vadot - const: fsl,imx27-fec 34*354d7675SEmmanuel Vadot - items: 35*354d7675SEmmanuel Vadot - enum: 36*354d7675SEmmanuel Vadot - fsl,imx6ul-fec 37*354d7675SEmmanuel Vadot - fsl,imx6sx-fec 38*354d7675SEmmanuel Vadot - const: fsl,imx6q-fec 39*354d7675SEmmanuel Vadot - items: 40*354d7675SEmmanuel Vadot - enum: 41*354d7675SEmmanuel Vadot - fsl,imx7d-fec 42*354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 43*354d7675SEmmanuel Vadot - items: 44*354d7675SEmmanuel Vadot - const: fsl,imx8mq-fec 45*354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 46*354d7675SEmmanuel Vadot - items: 47*354d7675SEmmanuel Vadot - enum: 48*354d7675SEmmanuel Vadot - fsl,imx8mm-fec 49*354d7675SEmmanuel Vadot - fsl,imx8mn-fec 50*354d7675SEmmanuel Vadot - fsl,imx8mp-fec 51*354d7675SEmmanuel Vadot - const: fsl,imx8mq-fec 52*354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 53*354d7675SEmmanuel Vadot - items: 54*354d7675SEmmanuel Vadot - const: fsl,imx8qm-fec 55*354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 56*354d7675SEmmanuel Vadot - items: 57*354d7675SEmmanuel Vadot - enum: 58*354d7675SEmmanuel Vadot - fsl,imx8qxp-fec 59*354d7675SEmmanuel Vadot - const: fsl,imx8qm-fec 60*354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 61*354d7675SEmmanuel Vadot 62*354d7675SEmmanuel Vadot reg: 63*354d7675SEmmanuel Vadot maxItems: 1 64*354d7675SEmmanuel Vadot 65*354d7675SEmmanuel Vadot interrupts: 66*354d7675SEmmanuel Vadot minItems: 1 67*354d7675SEmmanuel Vadot maxItems: 4 68*354d7675SEmmanuel Vadot 69*354d7675SEmmanuel Vadot interrupt-names: 70*354d7675SEmmanuel Vadot oneOf: 71*354d7675SEmmanuel Vadot - items: 72*354d7675SEmmanuel Vadot - const: int0 73*354d7675SEmmanuel Vadot - items: 74*354d7675SEmmanuel Vadot - const: int0 75*354d7675SEmmanuel Vadot - const: pps 76*354d7675SEmmanuel Vadot - items: 77*354d7675SEmmanuel Vadot - const: int0 78*354d7675SEmmanuel Vadot - const: int1 79*354d7675SEmmanuel Vadot - const: int2 80*354d7675SEmmanuel Vadot - items: 81*354d7675SEmmanuel Vadot - const: int0 82*354d7675SEmmanuel Vadot - const: int1 83*354d7675SEmmanuel Vadot - const: int2 84*354d7675SEmmanuel Vadot - const: pps 85*354d7675SEmmanuel Vadot 86*354d7675SEmmanuel Vadot clocks: 87*354d7675SEmmanuel Vadot minItems: 2 88*354d7675SEmmanuel Vadot maxItems: 5 89*354d7675SEmmanuel Vadot description: 90*354d7675SEmmanuel Vadot The "ipg", for MAC ipg_clk_s, ipg_clk_mac_s that are for register accessing. 91*354d7675SEmmanuel Vadot The "ahb", for MAC ipg_clk, ipg_clk_mac that are bus clock. 92*354d7675SEmmanuel Vadot The "ptp"(option), for IEEE1588 timer clock that requires the clock. 93*354d7675SEmmanuel Vadot The "enet_clk_ref"(option), for MAC transmit/receiver reference clock like 94*354d7675SEmmanuel Vadot RGMII TXC clock or RMII reference clock. It depends on board design, 95*354d7675SEmmanuel Vadot the clock is required if RGMII TXC and RMII reference clock source from 96*354d7675SEmmanuel Vadot SOC internal PLL. 97*354d7675SEmmanuel Vadot The "enet_out"(option), output clock for external device, like supply clock 98*354d7675SEmmanuel Vadot for PHY. The clock is required if PHY clock source from SOC. 99*354d7675SEmmanuel Vadot The "enet_2x_txclk"(option), for RGMII sampling clock which fixed at 250Mhz. 100*354d7675SEmmanuel Vadot The clock is required if SoC RGMII enable clock delay. 101*354d7675SEmmanuel Vadot 102*354d7675SEmmanuel Vadot clock-names: 103*354d7675SEmmanuel Vadot minItems: 2 104*354d7675SEmmanuel Vadot maxItems: 5 105*354d7675SEmmanuel Vadot items: 106*354d7675SEmmanuel Vadot enum: 107*354d7675SEmmanuel Vadot - ipg 108*354d7675SEmmanuel Vadot - ahb 109*354d7675SEmmanuel Vadot - ptp 110*354d7675SEmmanuel Vadot - enet_clk_ref 111*354d7675SEmmanuel Vadot - enet_out 112*354d7675SEmmanuel Vadot - enet_2x_txclk 113*354d7675SEmmanuel Vadot 114*354d7675SEmmanuel Vadot phy-mode: true 115*354d7675SEmmanuel Vadot 116*354d7675SEmmanuel Vadot phy-handle: true 117*354d7675SEmmanuel Vadot 118*354d7675SEmmanuel Vadot fixed-link: true 119*354d7675SEmmanuel Vadot 120*354d7675SEmmanuel Vadot local-mac-address: true 121*354d7675SEmmanuel Vadot 122*354d7675SEmmanuel Vadot mac-address: true 123*354d7675SEmmanuel Vadot 124*354d7675SEmmanuel Vadot tx-internal-delay-ps: 125*354d7675SEmmanuel Vadot enum: [0, 2000] 126*354d7675SEmmanuel Vadot 127*354d7675SEmmanuel Vadot rx-internal-delay-ps: 128*354d7675SEmmanuel Vadot enum: [0, 2000] 129*354d7675SEmmanuel Vadot 130*354d7675SEmmanuel Vadot phy-supply: 131*354d7675SEmmanuel Vadot description: 132*354d7675SEmmanuel Vadot Regulator that powers the Ethernet PHY. 133*354d7675SEmmanuel Vadot 134*354d7675SEmmanuel Vadot fsl,num-tx-queues: 135*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 136*354d7675SEmmanuel Vadot description: 137*354d7675SEmmanuel Vadot The property is valid for enet-avb IP, which supports hw multi queues. 138*354d7675SEmmanuel Vadot Should specify the tx queue number, otherwise set tx queue number to 1. 139*354d7675SEmmanuel Vadot enum: [1, 2, 3] 140*354d7675SEmmanuel Vadot 141*354d7675SEmmanuel Vadot fsl,num-rx-queues: 142*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 143*354d7675SEmmanuel Vadot description: 144*354d7675SEmmanuel Vadot The property is valid for enet-avb IP, which supports hw multi queues. 145*354d7675SEmmanuel Vadot Should specify the rx queue number, otherwise set rx queue number to 1. 146*354d7675SEmmanuel Vadot enum: [1, 2, 3] 147*354d7675SEmmanuel Vadot 148*354d7675SEmmanuel Vadot fsl,magic-packet: 149*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 150*354d7675SEmmanuel Vadot description: 151*354d7675SEmmanuel Vadot If present, indicates that the hardware supports waking up via magic packet. 152*354d7675SEmmanuel Vadot 153*354d7675SEmmanuel Vadot fsl,err006687-workaround-present: 154*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 155*354d7675SEmmanuel Vadot description: 156*354d7675SEmmanuel Vadot If present indicates that the system has the hardware workaround for 157*354d7675SEmmanuel Vadot ERR006687 applied and does not need a software workaround. 158*354d7675SEmmanuel Vadot 159*354d7675SEmmanuel Vadot fsl,stop-mode: 160*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 161*354d7675SEmmanuel Vadot description: 162*354d7675SEmmanuel Vadot Register bits of stop mode control, the format is <&gpr req_gpr req_bit>. 163*354d7675SEmmanuel Vadot gpr is the phandle to general purpose register node. 164*354d7675SEmmanuel Vadot req_gpr is the gpr register offset for ENET stop request. 165*354d7675SEmmanuel Vadot req_bit is the gpr bit offset for ENET stop request. 166*354d7675SEmmanuel Vadot 167*354d7675SEmmanuel Vadot mdio: 168*354d7675SEmmanuel Vadot type: object 169*354d7675SEmmanuel Vadot description: 170*354d7675SEmmanuel Vadot Specifies the mdio bus in the FEC, used as a container for phy nodes. 171*354d7675SEmmanuel Vadot 172*354d7675SEmmanuel Vadot # Deprecated optional properties: 173*354d7675SEmmanuel Vadot # To avoid these, create a phy node according to ethernet-phy.yaml in the same 174*354d7675SEmmanuel Vadot # directory, and point the FEC's "phy-handle" property to it. Then use 175*354d7675SEmmanuel Vadot # the phy's reset binding, again described by ethernet-phy.yaml. 176*354d7675SEmmanuel Vadot 177*354d7675SEmmanuel Vadot phy-reset-gpios: 178*354d7675SEmmanuel Vadot deprecated: true 179*354d7675SEmmanuel Vadot description: 180*354d7675SEmmanuel Vadot Should specify the gpio for phy reset. 181*354d7675SEmmanuel Vadot 182*354d7675SEmmanuel Vadot phy-reset-duration: 183*354d7675SEmmanuel Vadot deprecated: true 184*354d7675SEmmanuel Vadot description: 185*354d7675SEmmanuel Vadot Reset duration in milliseconds. Should present only if property 186*354d7675SEmmanuel Vadot "phy-reset-gpios" is available. Missing the property will have the 187*354d7675SEmmanuel Vadot duration be 1 millisecond. Numbers greater than 1000 are invalid 188*354d7675SEmmanuel Vadot and 1 millisecond will be used instead. 189*354d7675SEmmanuel Vadot 190*354d7675SEmmanuel Vadot phy-reset-active-high: 191*354d7675SEmmanuel Vadot deprecated: true 192*354d7675SEmmanuel Vadot description: 193*354d7675SEmmanuel Vadot If present then the reset sequence using the GPIO specified in the 194*354d7675SEmmanuel Vadot "phy-reset-gpios" property is reversed (H=reset state, L=operation state). 195*354d7675SEmmanuel Vadot 196*354d7675SEmmanuel Vadot phy-reset-post-delay: 197*354d7675SEmmanuel Vadot deprecated: true 198*354d7675SEmmanuel Vadot description: 199*354d7675SEmmanuel Vadot Post reset delay in milliseconds. If present then a delay of phy-reset-post-delay 200*354d7675SEmmanuel Vadot milliseconds will be observed after the phy-reset-gpios has been toggled. 201*354d7675SEmmanuel Vadot Can be omitted thus no delay is observed. Delay is in range of 1ms to 1000ms. 202*354d7675SEmmanuel Vadot Other delays are invalid. 203*354d7675SEmmanuel Vadot 204*354d7675SEmmanuel Vadotrequired: 205*354d7675SEmmanuel Vadot - compatible 206*354d7675SEmmanuel Vadot - reg 207*354d7675SEmmanuel Vadot - interrupts 208*354d7675SEmmanuel Vadot 209*354d7675SEmmanuel Vadot# FIXME: We had better set additionalProperties to false to avoid invalid or at 210*354d7675SEmmanuel Vadot# least undocumented properties. However, PHY may have a deprecated option to 211*354d7675SEmmanuel Vadot# place PHY OF properties in the MAC node, such as Micrel PHY, and we can find 212*354d7675SEmmanuel Vadot# these boards which is based on i.MX6QDL. 213*354d7675SEmmanuel VadotadditionalProperties: false 214*354d7675SEmmanuel Vadot 215*354d7675SEmmanuel Vadotexamples: 216*354d7675SEmmanuel Vadot - | 217*354d7675SEmmanuel Vadot ethernet@83fec000 { 218*354d7675SEmmanuel Vadot compatible = "fsl,imx51-fec", "fsl,imx27-fec"; 219*354d7675SEmmanuel Vadot reg = <0x83fec000 0x4000>; 220*354d7675SEmmanuel Vadot interrupts = <87>; 221*354d7675SEmmanuel Vadot phy-mode = "mii"; 222*354d7675SEmmanuel Vadot phy-reset-gpios = <&gpio2 14 0>; 223*354d7675SEmmanuel Vadot phy-supply = <®_fec_supply>; 224*354d7675SEmmanuel Vadot }; 225*354d7675SEmmanuel Vadot 226*354d7675SEmmanuel Vadot ethernet@83fed000 { 227*354d7675SEmmanuel Vadot compatible = "fsl,imx51-fec", "fsl,imx27-fec"; 228*354d7675SEmmanuel Vadot reg = <0x83fed000 0x4000>; 229*354d7675SEmmanuel Vadot interrupts = <87>; 230*354d7675SEmmanuel Vadot phy-mode = "mii"; 231*354d7675SEmmanuel Vadot phy-reset-gpios = <&gpio2 14 0>; 232*354d7675SEmmanuel Vadot phy-supply = <®_fec_supply>; 233*354d7675SEmmanuel Vadot phy-handle = <ðphy0>; 234*354d7675SEmmanuel Vadot 235*354d7675SEmmanuel Vadot mdio { 236*354d7675SEmmanuel Vadot #address-cells = <1>; 237*354d7675SEmmanuel Vadot #size-cells = <0>; 238*354d7675SEmmanuel Vadot 239*354d7675SEmmanuel Vadot ethphy0: ethernet-phy@0 { 240*354d7675SEmmanuel Vadot compatible = "ethernet-phy-ieee802.3-c22"; 241*354d7675SEmmanuel Vadot reg = <0>; 242*354d7675SEmmanuel Vadot }; 243*354d7675SEmmanuel Vadot }; 244*354d7675SEmmanuel Vadot }; 245