^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) * MDIO IO device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) The MDIO is a bus to which the PHY devices are connected. For each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) device that exists on this bus, a child node should be created. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) the definition of the PHY node in booting-without-of.txt for an example
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) of how to define a PHY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - reg : Offset and length of the register set for the device, and optionally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) the offset and length of the TBIPA register (TBI PHY address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) register). If TBIPA register is not specified, the driver will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) attempt to infer it from the register set specified (your mileage may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) vary).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) - compatible : Should define the compatible device type for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) mdio. Currently supported strings/devices are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) - "fsl,gianfar-tbi"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - "fsl,gianfar-mdio"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) - "fsl,etsec2-tbi"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - "fsl,etsec2-mdio"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - "fsl,ucc-mdio"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) - "fsl,fman-mdio"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) When device_type is "mdio", the following strings are also considered:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) - "gianfar"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) - "ucc_geth_phy"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) mdio@24520 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) reg = <24520 20>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) compatible = "fsl,gianfar-mdio";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ethernet-phy@0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) ......
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) * TBI Internal MDIO bus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) As of this writing, every tsec is associated with an internal TBI PHY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) This PHY is accessed through the local MDIO bus. These buses are defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) The TBI PHYs underneath them are similar to normal PHYs, but the reg property
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) is considered instructive, rather than descriptive. The reg property should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) be chosen so it doesn't interfere with other PHYs on the bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * Gianfar-compatible ethernet nodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) Properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) - device_type : Should be "network"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - compatible : Should be "gianfar"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - reg : Offset and length of the register set for the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - interrupts : For FEC devices, the first interrupt is the device's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) interrupt. For TSEC and eTSEC devices, the first interrupt is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) transmit, the second is receive, and the third is error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) - phy-handle : See ethernet.txt file in the same directory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) - fixed-link : See fixed-link.txt in the same directory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) - phy-connection-type : See ethernet.txt file in the same directory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) This property is only really needed if the connection is of type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) "rgmii-id", as all other connection types are detected by hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - fsl,magic-packet : If present, indicates that the hardware supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) waking up via magic packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) - fsl,wake-on-filer : If present, indicates that the hardware supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) waking up by Filer General Purpose Interrupt (FGPI) asserted on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Rx int line. This is an advanced power management capability allowing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) certain packet types (user) defined by filer rules to wake up the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) - bd-stash : If present, indicates that the hardware supports stashing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) buffer descriptors in the L2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) - rx-stash-len : Denotes the number of bytes of a received buffer to stash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) in the L2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) - rx-stash-idx : Denotes the index of the first byte from the received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) buffer to stash in the L2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) ethernet@24000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) device_type = "network";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) model = "TSEC";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) compatible = "gianfar";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) reg = <0x24000 0x1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) local-mac-address = [ 00 E0 0C 00 73 00 ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) interrupts = <29 2 30 2 34 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) interrupt-parent = <&mpic>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) phy-handle = <&phy0>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) * Gianfar PTP clock nodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Refer to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt