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