1354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2354d7675SEmmanuel Vadot%YAML 1.2 3354d7675SEmmanuel Vadot--- 4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/net/fsl,fec.yaml# 5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6354d7675SEmmanuel Vadot 7354d7675SEmmanuel Vadottitle: Freescale Fast Ethernet Controller (FEC) 8354d7675SEmmanuel Vadot 9354d7675SEmmanuel Vadotmaintainers: 108bab661aSEmmanuel Vadot - Shawn Guo <shawnguo@kernel.org> 118bab661aSEmmanuel Vadot - Wei Fang <wei.fang@nxp.com> 128bab661aSEmmanuel Vadot - NXP Linux Team <linux-imx@nxp.com> 13354d7675SEmmanuel Vadot 14354d7675SEmmanuel VadotallOf: 15354d7675SEmmanuel Vadot - $ref: ethernet-controller.yaml# 16354d7675SEmmanuel Vadot 17354d7675SEmmanuel Vadotproperties: 18354d7675SEmmanuel Vadot compatible: 19354d7675SEmmanuel Vadot oneOf: 20354d7675SEmmanuel Vadot - enum: 21354d7675SEmmanuel Vadot - fsl,imx25-fec 22354d7675SEmmanuel Vadot - fsl,imx27-fec 23354d7675SEmmanuel Vadot - fsl,imx28-fec 24354d7675SEmmanuel Vadot - fsl,imx6q-fec 25354d7675SEmmanuel Vadot - fsl,mvf600-fec 267ef62cebSEmmanuel Vadot - fsl,s32v234-fec 27354d7675SEmmanuel Vadot - items: 28354d7675SEmmanuel Vadot - enum: 29354d7675SEmmanuel Vadot - fsl,imx53-fec 30354d7675SEmmanuel Vadot - fsl,imx6sl-fec 31354d7675SEmmanuel Vadot - const: fsl,imx25-fec 32354d7675SEmmanuel Vadot - items: 33354d7675SEmmanuel Vadot - enum: 34354d7675SEmmanuel Vadot - fsl,imx35-fec 35354d7675SEmmanuel Vadot - fsl,imx51-fec 36354d7675SEmmanuel Vadot - const: fsl,imx27-fec 37354d7675SEmmanuel Vadot - items: 38354d7675SEmmanuel Vadot - enum: 39354d7675SEmmanuel Vadot - fsl,imx6ul-fec 40354d7675SEmmanuel Vadot - fsl,imx6sx-fec 41354d7675SEmmanuel Vadot - const: fsl,imx6q-fec 42354d7675SEmmanuel Vadot - items: 43354d7675SEmmanuel Vadot - enum: 44354d7675SEmmanuel Vadot - fsl,imx7d-fec 45354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 46354d7675SEmmanuel Vadot - items: 47354d7675SEmmanuel Vadot - const: fsl,imx8mq-fec 48354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 49354d7675SEmmanuel Vadot - items: 50354d7675SEmmanuel Vadot - enum: 51354d7675SEmmanuel Vadot - fsl,imx8mm-fec 52354d7675SEmmanuel Vadot - fsl,imx8mn-fec 53354d7675SEmmanuel Vadot - fsl,imx8mp-fec 54cb7aa33aSEmmanuel Vadot - fsl,imx93-fec 55354d7675SEmmanuel Vadot - const: fsl,imx8mq-fec 56354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 57354d7675SEmmanuel Vadot - items: 58354d7675SEmmanuel Vadot - const: fsl,imx8qm-fec 59354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 60354d7675SEmmanuel Vadot - items: 61354d7675SEmmanuel Vadot - enum: 62*84943d6fSEmmanuel Vadot - fsl,imx8dxl-fec 63354d7675SEmmanuel Vadot - fsl,imx8qxp-fec 64354d7675SEmmanuel Vadot - const: fsl,imx8qm-fec 65354d7675SEmmanuel Vadot - const: fsl,imx6sx-fec 66b97ee269SEmmanuel Vadot - items: 67b97ee269SEmmanuel Vadot - enum: 68b97ee269SEmmanuel Vadot - fsl,imx8ulp-fec 69b97ee269SEmmanuel Vadot - const: fsl,imx6ul-fec 70b97ee269SEmmanuel Vadot - const: fsl,imx6q-fec 71354d7675SEmmanuel Vadot 72354d7675SEmmanuel Vadot reg: 73354d7675SEmmanuel Vadot maxItems: 1 74354d7675SEmmanuel Vadot 75354d7675SEmmanuel Vadot interrupts: 76354d7675SEmmanuel Vadot minItems: 1 77354d7675SEmmanuel Vadot maxItems: 4 78354d7675SEmmanuel Vadot 79354d7675SEmmanuel Vadot interrupt-names: 80354d7675SEmmanuel Vadot oneOf: 81354d7675SEmmanuel Vadot - items: 82354d7675SEmmanuel Vadot - const: int0 83354d7675SEmmanuel Vadot - items: 84354d7675SEmmanuel Vadot - const: int0 85354d7675SEmmanuel Vadot - const: pps 86354d7675SEmmanuel Vadot - items: 87354d7675SEmmanuel Vadot - const: int0 88354d7675SEmmanuel Vadot - const: int1 89354d7675SEmmanuel Vadot - const: int2 90354d7675SEmmanuel Vadot - items: 91354d7675SEmmanuel Vadot - const: int0 92354d7675SEmmanuel Vadot - const: int1 93354d7675SEmmanuel Vadot - const: int2 94354d7675SEmmanuel Vadot - const: pps 95354d7675SEmmanuel Vadot 96354d7675SEmmanuel Vadot clocks: 97354d7675SEmmanuel Vadot minItems: 2 98354d7675SEmmanuel Vadot maxItems: 5 99354d7675SEmmanuel Vadot description: 100354d7675SEmmanuel Vadot The "ipg", for MAC ipg_clk_s, ipg_clk_mac_s that are for register accessing. 101354d7675SEmmanuel Vadot The "ahb", for MAC ipg_clk, ipg_clk_mac that are bus clock. 102354d7675SEmmanuel Vadot The "ptp"(option), for IEEE1588 timer clock that requires the clock. 103354d7675SEmmanuel Vadot The "enet_clk_ref"(option), for MAC transmit/receiver reference clock like 104354d7675SEmmanuel Vadot RGMII TXC clock or RMII reference clock. It depends on board design, 105354d7675SEmmanuel Vadot the clock is required if RGMII TXC and RMII reference clock source from 106354d7675SEmmanuel Vadot SOC internal PLL. 107354d7675SEmmanuel Vadot The "enet_out"(option), output clock for external device, like supply clock 108354d7675SEmmanuel Vadot for PHY. The clock is required if PHY clock source from SOC. 109354d7675SEmmanuel Vadot The "enet_2x_txclk"(option), for RGMII sampling clock which fixed at 250Mhz. 110354d7675SEmmanuel Vadot The clock is required if SoC RGMII enable clock delay. 111354d7675SEmmanuel Vadot 112354d7675SEmmanuel Vadot clock-names: 113354d7675SEmmanuel Vadot minItems: 2 114354d7675SEmmanuel Vadot maxItems: 5 115354d7675SEmmanuel Vadot items: 116354d7675SEmmanuel Vadot enum: 117354d7675SEmmanuel Vadot - ipg 118354d7675SEmmanuel Vadot - ahb 119354d7675SEmmanuel Vadot - ptp 120354d7675SEmmanuel Vadot - enet_clk_ref 121354d7675SEmmanuel Vadot - enet_out 122354d7675SEmmanuel Vadot - enet_2x_txclk 123354d7675SEmmanuel Vadot 124354d7675SEmmanuel Vadot phy-mode: true 125354d7675SEmmanuel Vadot 126354d7675SEmmanuel Vadot phy-handle: true 127354d7675SEmmanuel Vadot 128354d7675SEmmanuel Vadot fixed-link: true 129354d7675SEmmanuel Vadot 130354d7675SEmmanuel Vadot local-mac-address: true 131354d7675SEmmanuel Vadot 132354d7675SEmmanuel Vadot mac-address: true 133354d7675SEmmanuel Vadot 134b97ee269SEmmanuel Vadot nvmem-cells: true 135b97ee269SEmmanuel Vadot 136b97ee269SEmmanuel Vadot nvmem-cell-names: true 137b97ee269SEmmanuel Vadot 138354d7675SEmmanuel Vadot tx-internal-delay-ps: 139354d7675SEmmanuel Vadot enum: [0, 2000] 140354d7675SEmmanuel Vadot 141354d7675SEmmanuel Vadot rx-internal-delay-ps: 142354d7675SEmmanuel Vadot enum: [0, 2000] 143354d7675SEmmanuel Vadot 144354d7675SEmmanuel Vadot phy-supply: 145354d7675SEmmanuel Vadot description: 146354d7675SEmmanuel Vadot Regulator that powers the Ethernet PHY. 147354d7675SEmmanuel Vadot 148fac71e4eSEmmanuel Vadot power-domains: 149fac71e4eSEmmanuel Vadot maxItems: 1 150fac71e4eSEmmanuel Vadot 151354d7675SEmmanuel Vadot fsl,num-tx-queues: 152354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 153354d7675SEmmanuel Vadot description: 154354d7675SEmmanuel Vadot The property is valid for enet-avb IP, which supports hw multi queues. 155354d7675SEmmanuel Vadot Should specify the tx queue number, otherwise set tx queue number to 1. 156354d7675SEmmanuel Vadot enum: [1, 2, 3] 157354d7675SEmmanuel Vadot 158354d7675SEmmanuel Vadot fsl,num-rx-queues: 159354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 160354d7675SEmmanuel Vadot description: 161354d7675SEmmanuel Vadot The property is valid for enet-avb IP, which supports hw multi queues. 162354d7675SEmmanuel Vadot Should specify the rx queue number, otherwise set rx queue number to 1. 163354d7675SEmmanuel Vadot enum: [1, 2, 3] 164354d7675SEmmanuel Vadot 165354d7675SEmmanuel Vadot fsl,magic-packet: 166354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 167354d7675SEmmanuel Vadot description: 168354d7675SEmmanuel Vadot If present, indicates that the hardware supports waking up via magic packet. 169354d7675SEmmanuel Vadot 170354d7675SEmmanuel Vadot fsl,err006687-workaround-present: 171354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 172354d7675SEmmanuel Vadot description: 173354d7675SEmmanuel Vadot If present indicates that the system has the hardware workaround for 174354d7675SEmmanuel Vadot ERR006687 applied and does not need a software workaround. 175354d7675SEmmanuel Vadot 176354d7675SEmmanuel Vadot fsl,stop-mode: 177354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 178c9ccf3a3SEmmanuel Vadot items: 179c9ccf3a3SEmmanuel Vadot - items: 180c9ccf3a3SEmmanuel Vadot - description: phandle to general purpose register node 181c9ccf3a3SEmmanuel Vadot - description: the gpr register offset for ENET stop request 182c9ccf3a3SEmmanuel Vadot - description: the gpr bit offset for ENET stop request 183354d7675SEmmanuel Vadot description: 184354d7675SEmmanuel Vadot Register bits of stop mode control, the format is <&gpr req_gpr req_bit>. 185354d7675SEmmanuel Vadot 186354d7675SEmmanuel Vadot mdio: 187e67e8565SEmmanuel Vadot $ref: mdio.yaml# 188e67e8565SEmmanuel Vadot unevaluatedProperties: false 189354d7675SEmmanuel Vadot description: 190354d7675SEmmanuel Vadot Specifies the mdio bus in the FEC, used as a container for phy nodes. 191354d7675SEmmanuel Vadot 192354d7675SEmmanuel Vadot # Deprecated optional properties: 193354d7675SEmmanuel Vadot # To avoid these, create a phy node according to ethernet-phy.yaml in the same 194354d7675SEmmanuel Vadot # directory, and point the FEC's "phy-handle" property to it. Then use 195354d7675SEmmanuel Vadot # the phy's reset binding, again described by ethernet-phy.yaml. 196354d7675SEmmanuel Vadot 197354d7675SEmmanuel Vadot phy-reset-gpios: 198354d7675SEmmanuel Vadot deprecated: true 199354d7675SEmmanuel Vadot description: 200354d7675SEmmanuel Vadot Should specify the gpio for phy reset. 201354d7675SEmmanuel Vadot 202354d7675SEmmanuel Vadot phy-reset-duration: 203d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 204354d7675SEmmanuel Vadot deprecated: true 205354d7675SEmmanuel Vadot description: 206354d7675SEmmanuel Vadot Reset duration in milliseconds. Should present only if property 207354d7675SEmmanuel Vadot "phy-reset-gpios" is available. Missing the property will have the 208354d7675SEmmanuel Vadot duration be 1 millisecond. Numbers greater than 1000 are invalid 209354d7675SEmmanuel Vadot and 1 millisecond will be used instead. 210354d7675SEmmanuel Vadot 211354d7675SEmmanuel Vadot phy-reset-active-high: 212d5b0e70fSEmmanuel Vadot type: boolean 213354d7675SEmmanuel Vadot deprecated: true 214354d7675SEmmanuel Vadot description: 215354d7675SEmmanuel Vadot If present then the reset sequence using the GPIO specified in the 216354d7675SEmmanuel Vadot "phy-reset-gpios" property is reversed (H=reset state, L=operation state). 217354d7675SEmmanuel Vadot 218354d7675SEmmanuel Vadot phy-reset-post-delay: 219d5b0e70fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 220354d7675SEmmanuel Vadot deprecated: true 221354d7675SEmmanuel Vadot description: 222354d7675SEmmanuel Vadot Post reset delay in milliseconds. If present then a delay of phy-reset-post-delay 223354d7675SEmmanuel Vadot milliseconds will be observed after the phy-reset-gpios has been toggled. 224354d7675SEmmanuel Vadot Can be omitted thus no delay is observed. Delay is in range of 1ms to 1000ms. 225354d7675SEmmanuel Vadot Other delays are invalid. 226354d7675SEmmanuel Vadot 227354d7675SEmmanuel Vadotrequired: 228354d7675SEmmanuel Vadot - compatible 229354d7675SEmmanuel Vadot - reg 230354d7675SEmmanuel Vadot - interrupts 231354d7675SEmmanuel Vadot 232354d7675SEmmanuel Vadot# FIXME: We had better set additionalProperties to false to avoid invalid or at 233354d7675SEmmanuel Vadot# least undocumented properties. However, PHY may have a deprecated option to 234354d7675SEmmanuel Vadot# place PHY OF properties in the MAC node, such as Micrel PHY, and we can find 235354d7675SEmmanuel Vadot# these boards which is based on i.MX6QDL. 236b97ee269SEmmanuel VadotunevaluatedProperties: false 237354d7675SEmmanuel Vadot 238354d7675SEmmanuel Vadotexamples: 239354d7675SEmmanuel Vadot - | 240354d7675SEmmanuel Vadot ethernet@83fec000 { 241354d7675SEmmanuel Vadot compatible = "fsl,imx51-fec", "fsl,imx27-fec"; 242354d7675SEmmanuel Vadot reg = <0x83fec000 0x4000>; 243354d7675SEmmanuel Vadot interrupts = <87>; 244354d7675SEmmanuel Vadot phy-mode = "mii"; 245354d7675SEmmanuel Vadot phy-reset-gpios = <&gpio2 14 0>; 246354d7675SEmmanuel Vadot phy-supply = <®_fec_supply>; 247354d7675SEmmanuel Vadot }; 248354d7675SEmmanuel Vadot 249354d7675SEmmanuel Vadot ethernet@83fed000 { 250354d7675SEmmanuel Vadot compatible = "fsl,imx51-fec", "fsl,imx27-fec"; 251354d7675SEmmanuel Vadot reg = <0x83fed000 0x4000>; 252354d7675SEmmanuel Vadot interrupts = <87>; 253354d7675SEmmanuel Vadot phy-mode = "mii"; 254354d7675SEmmanuel Vadot phy-reset-gpios = <&gpio2 14 0>; 255354d7675SEmmanuel Vadot phy-supply = <®_fec_supply>; 256354d7675SEmmanuel Vadot phy-handle = <ðphy0>; 257354d7675SEmmanuel Vadot 258354d7675SEmmanuel Vadot mdio { 259354d7675SEmmanuel Vadot #address-cells = <1>; 260354d7675SEmmanuel Vadot #size-cells = <0>; 261354d7675SEmmanuel Vadot 262354d7675SEmmanuel Vadot ethphy0: ethernet-phy@0 { 263354d7675SEmmanuel Vadot compatible = "ethernet-phy-ieee802.3-c22"; 264354d7675SEmmanuel Vadot reg = <0>; 265354d7675SEmmanuel Vadot }; 266354d7675SEmmanuel Vadot }; 267354d7675SEmmanuel Vadot }; 268