2008-07-08 00:28:33 +08:00
|
|
|
* MDIO IO device
|
|
|
|
|
|
|
|
The MDIO is a bus to which the PHY devices are connected. For each
|
|
|
|
device that exists on this bus, a child node should be created. See
|
2008-12-17 07:29:15 +08:00
|
|
|
the definition of the PHY node in booting-without-of.txt for an example
|
|
|
|
of how to define a PHY.
|
2008-07-08 00:28:33 +08:00
|
|
|
|
|
|
|
Required properties:
|
|
|
|
- reg : Offset and length of the register set for the device
|
|
|
|
- compatible : Should define the compatible device type for the
|
2015-02-02 05:58:31 +08:00
|
|
|
mdio. Currently supported strings/devices are:
|
|
|
|
- "fsl,gianfar-tbi"
|
|
|
|
- "fsl,gianfar-mdio"
|
|
|
|
- "fsl,etsec2-tbi"
|
|
|
|
- "fsl,etsec2-mdio"
|
|
|
|
- "fsl,ucc-mdio"
|
|
|
|
- "fsl,fman-mdio"
|
|
|
|
When device_type is "mdio", the following strings are also considered:
|
|
|
|
- "gianfar"
|
|
|
|
- "ucc_geth_phy"
|
2008-07-08 00:28:33 +08:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
mdio@24520 {
|
|
|
|
reg = <24520 20>;
|
|
|
|
compatible = "fsl,gianfar-mdio";
|
|
|
|
|
|
|
|
ethernet-phy@0 {
|
|
|
|
......
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2008-12-17 07:29:15 +08:00
|
|
|
* TBI Internal MDIO bus
|
|
|
|
|
|
|
|
As of this writing, every tsec is associated with an internal TBI PHY.
|
|
|
|
This PHY is accessed through the local MDIO bus. These buses are defined
|
|
|
|
similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi".
|
|
|
|
The TBI PHYs underneath them are similar to normal PHYs, but the reg property
|
|
|
|
is considered instructive, rather than descriptive. The reg property should
|
|
|
|
be chosen so it doesn't interfere with other PHYs on the bus.
|
2008-07-08 00:28:33 +08:00
|
|
|
|
|
|
|
* Gianfar-compatible ethernet nodes
|
|
|
|
|
2008-07-12 07:04:43 +08:00
|
|
|
Properties:
|
2008-07-08 00:28:33 +08:00
|
|
|
|
|
|
|
- device_type : Should be "network"
|
|
|
|
- model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
|
|
|
|
- compatible : Should be "gianfar"
|
|
|
|
- reg : Offset and length of the register set for the device
|
2008-07-12 07:04:43 +08:00
|
|
|
- interrupts : For FEC devices, the first interrupt is the device's
|
|
|
|
interrupt. For TSEC and eTSEC devices, the first interrupt is
|
|
|
|
transmit, the second is receive, and the third is error.
|
2014-02-18 07:41:59 +08:00
|
|
|
- phy-handle : See ethernet.txt file in the same directory.
|
2014-05-23 00:47:44 +08:00
|
|
|
- fixed-link : See fixed-link.txt in the same directory.
|
2014-02-18 07:41:59 +08:00
|
|
|
- phy-connection-type : See ethernet.txt file in the same directory.
|
|
|
|
This property is only really needed if the connection is of type
|
|
|
|
"rgmii-id", as all other connection types are detected by hardware.
|
2008-07-12 07:04:43 +08:00
|
|
|
- fsl,magic-packet : If present, indicates that the hardware supports
|
|
|
|
waking up via magic packet.
|
2015-10-05 22:19:57 +08:00
|
|
|
- fsl,wake-on-filer : If present, indicates that the hardware supports
|
|
|
|
waking up by Filer General Purpose Interrupt (FGPI) asserted on the
|
|
|
|
Rx int line. This is an advanced power management capability allowing
|
|
|
|
certain packet types (user) defined by filer rules to wake up the system.
|
2009-02-05 08:43:44 +08:00
|
|
|
- bd-stash : If present, indicates that the hardware supports stashing
|
|
|
|
buffer descriptors in the L2.
|
|
|
|
- rx-stash-len : Denotes the number of bytes of a received buffer to stash
|
|
|
|
in the L2.
|
|
|
|
- rx-stash-idx : Denotes the index of the first byte from the received
|
|
|
|
buffer to stash in the L2.
|
2008-07-08 00:28:33 +08:00
|
|
|
|
|
|
|
Example:
|
|
|
|
ethernet@24000 {
|
|
|
|
device_type = "network";
|
|
|
|
model = "TSEC";
|
|
|
|
compatible = "gianfar";
|
2008-07-12 07:04:43 +08:00
|
|
|
reg = <0x24000 0x1000>;
|
|
|
|
local-mac-address = [ 00 E0 0C 00 73 00 ];
|
|
|
|
interrupts = <29 2 30 2 34 2>;
|
|
|
|
interrupt-parent = <&mpic>;
|
|
|
|
phy-handle = <&phy0>
|
2008-07-08 00:28:33 +08:00
|
|
|
};
|
2011-04-22 18:03:54 +08:00
|
|
|
|
|
|
|
* Gianfar PTP clock nodes
|
|
|
|
|
|
|
|
General Properties:
|
|
|
|
|
|
|
|
- compatible Should be "fsl,etsec-ptp"
|
|
|
|
- reg Offset and length of the register set for the device
|
|
|
|
- interrupts There should be at least two interrupts. Some devices
|
|
|
|
have as many as four PTP related interrupts.
|
|
|
|
|
|
|
|
Clock Properties:
|
|
|
|
|
2013-09-27 21:40:27 +08:00
|
|
|
- fsl,cksel Timer reference clock source.
|
2011-04-22 18:03:54 +08:00
|
|
|
- fsl,tclk-period Timer reference clock period in nanoseconds.
|
|
|
|
- fsl,tmr-prsc Prescaler, divides the output clock.
|
|
|
|
- fsl,tmr-add Frequency compensation value.
|
|
|
|
- fsl,tmr-fiper1 Fixed interval period pulse generator.
|
|
|
|
- fsl,tmr-fiper2 Fixed interval period pulse generator.
|
|
|
|
- fsl,max-adj Maximum frequency adjustment in parts per billion.
|
|
|
|
|
|
|
|
These properties set the operational parameters for the PTP
|
|
|
|
clock. You must choose these carefully for the clock to work right.
|
|
|
|
Here is how to figure good values:
|
|
|
|
|
2013-09-27 21:40:27 +08:00
|
|
|
TimerOsc = selected reference clock MHz
|
2011-04-22 18:03:54 +08:00
|
|
|
tclk_period = desired clock period nanoseconds
|
|
|
|
NominalFreq = 1000 / tclk_period MHz
|
|
|
|
FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0)
|
|
|
|
tmr_add = ceil(2^32 / FreqDivRatio)
|
|
|
|
OutputClock = NominalFreq / tmr_prsc MHz
|
|
|
|
PulseWidth = 1 / OutputClock microseconds
|
|
|
|
FiperFreq1 = desired frequency in Hz
|
|
|
|
FiperDiv1 = 1000000 * OutputClock / FiperFreq1
|
|
|
|
tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period
|
|
|
|
max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1
|
|
|
|
|
|
|
|
The calculation for tmr_fiper2 is the same as for tmr_fiper1. The
|
|
|
|
driver expects that tmr_fiper1 will be correctly set to produce a 1
|
|
|
|
Pulse Per Second (PPS) signal, since this will be offered to the PPS
|
|
|
|
subsystem to synchronize the Linux clock.
|
|
|
|
|
2013-09-27 21:40:27 +08:00
|
|
|
Reference clock source is determined by the value, which is holded
|
|
|
|
in CKSEL bits in TMR_CTRL register. "fsl,cksel" property keeps the
|
|
|
|
value, which will be directly written in those bits, that is why,
|
|
|
|
according to reference manual, the next clock sources can be used:
|
|
|
|
|
|
|
|
<0> - external high precision timer reference clock (TSEC_TMR_CLK
|
|
|
|
input is used for this purpose);
|
|
|
|
<1> - eTSEC system clock;
|
|
|
|
<2> - eTSEC1 transmit clock;
|
|
|
|
<3> - RTC clock input.
|
|
|
|
|
|
|
|
When this attribute is not used, eTSEC system clock will serve as
|
|
|
|
IEEE 1588 timer reference clock.
|
|
|
|
|
2011-04-22 18:03:54 +08:00
|
|
|
Example:
|
|
|
|
|
|
|
|
ptp_clock@24E00 {
|
|
|
|
compatible = "fsl,etsec-ptp";
|
|
|
|
reg = <0x24E00 0xB0>;
|
|
|
|
interrupts = <12 0x8 13 0x8>;
|
|
|
|
interrupt-parent = < &ipic >;
|
2013-09-27 21:40:27 +08:00
|
|
|
fsl,cksel = <1>;
|
2011-04-22 18:03:54 +08:00
|
|
|
fsl,tclk-period = <10>;
|
|
|
|
fsl,tmr-prsc = <100>;
|
|
|
|
fsl,tmr-add = <0x999999A4>;
|
|
|
|
fsl,tmr-fiper1 = <0x3B9AC9F6>;
|
|
|
|
fsl,tmr-fiper2 = <0x00018696>;
|
|
|
|
fsl,max-adj = <659999998>;
|
|
|
|
};
|