diff mbox

DT: add MDIO node for FMan node

Message ID 1415102196-9238-1-git-send-email-shh.xie@gmail.com
State New, archived
Headers show

Commit Message

shaohui xie Nov. 4, 2014, 11:56 a.m. UTC
From: Shaohui Xie <Shaohui.Xie@freescale.com>

This binding is for FMan MDIO, it covers FMan v2 & FMan v3.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
based on http://patchwork.ozlabs.org/patch/390351/
for 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

 .../devicetree/bindings/powerpc/fsl/fman.txt       | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)

Comments

shaohui xie Nov. 10, 2014, 10:19 a.m. UTC | #1
Ping.

Best Regards, 
Shaohui Xie

> -----Original Message-----
> From: shh.xie@gmail.com [mailto:shh.xie@gmail.com]
> Sent: Tuesday, November 04, 2014 7:57 PM
> To: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; Wood
> Scott-B07421
> Cc: Medve Emilian-EMMEDVE1; Xie Shaohui-B21989
> Subject: [PATCH] DT: add MDIO node for FMan node
> 
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
> 
> This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
> 
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
> based on http://patchwork.ozlabs.org/patch/390351/
> for 'next' of
> git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git
> 
>  .../devicetree/bindings/powerpc/fsl/fman.txt       | 69
> ++++++++++++++++++++++
>  1 file changed, 69 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index da8e5f2..83c2f14 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -7,6 +7,7 @@ CONTENTS
>    - FMan MURAM Node
>    - FMan dTSEC/XGEC/mEMAC Node
>    - FMan IEEE 1588 Node
> +  - FMan MDIO Node
>    - Example
> 
> 
> =========================================================================
> ====
> @@ -352,6 +353,67 @@ ptp-timer@fe000 {
>  };
> 
> 
> =========================================================================
> ====
> +FMan MDIO Node
> +
> +DESCRIPTION
> +
> +The MDIO is a bus to which the PHY devices are connected.
> +
> +PROPERTIES
> +
> +- compatible
> +		Usage: required
> +		Value type: <stringlist>
> +		Definition: A standard property.
> +		Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
> +		Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
> +		Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
> +		FMan v3.
> +
> +- reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: A standard property.
> +
> +- bus-frequency
> +		Usage: optional
> +		Value type: <u32>
> +		Definition: Default MDIO bus clock speed.
> +
> +- interrupts
> +		Usage: optional
> +		Value type: <prop-encoded-array>
> +		Definition: MDIO controller event interrupts.
> +
> +- type
> +		Usage: required for FMan v3
> +		Value type: <stringlist>
> +		Definition: A standard property.
> +		FMan v3 has internal MDIO for internal PCS(Physical Coding
> +		Sublayer) PHYs and external MDIO for external PHYs.
> +		The settings and programming routines for internal/external
> +		MDIO are different. Must include "internal" for internal MDIO,
> +		must include "external" for external MDIO.
> +
> +EXAMPLE
> +
> +Example for FMan v2:
> +
> +mdio@f1000 {
> +	compatible = "fsl,fman-xmdio";
> +	reg = <0xf1000 0x1000>;
> +};
> +
> +Example for FMan v3:
> +
> +mdio@fd000 {
> +	compatible = "fsl,fman-memac-mdio";
> +	reg = <0xfd000 0x1000>;
> +	bus-frequency = <2500000>;
> +	type = "external";
> +};
> +
> +========================================================================
> =====
>  Example
> 
>  fman@400000 {
> @@ -526,4 +588,11 @@ fman@400000 {
>  		compatible = "fsl,fman-ptp-timer";
>  		reg = <0xfe000 0x1000>;
>  	};
> +
> +	mdio@fd000 {
> +		compatible = "fsl,fman-memac-mdio";
> +		reg = <0xfd000 0x1000>;
> +		bus-frequency = <2500000>;
> +		type = "external";
> +	};
>  };
> --
> 1.8.4.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Scott Wood Nov. 11, 2014, 12:23 a.m. UTC | #2
On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com wrote:
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
> 
> This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
> 
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
> based on http://patchwork.ozlabs.org/patch/390351/
> for 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

Are there any other FMan pieces that are missing from the above patch?

>  .../devicetree/bindings/powerpc/fsl/fman.txt       | 69 ++++++++++++++++++++++
>  1 file changed, 69 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index da8e5f2..83c2f14 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -7,6 +7,7 @@ CONTENTS
>    - FMan MURAM Node
>    - FMan dTSEC/XGEC/mEMAC Node
>    - FMan IEEE 1588 Node
> +  - FMan MDIO Node
>    - Example
>  
>  =============================================================================
> @@ -352,6 +353,67 @@ ptp-timer@fe000 {
>  };
>  
>  =============================================================================
> +FMan MDIO Node
> +
> +DESCRIPTION
> +
> +The MDIO is a bus to which the PHY devices are connected.
> +
> +PROPERTIES
> +
> +- compatible
> +		Usage: required
> +		Value type: <stringlist>
> +		Definition: A standard property.
> +		Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
> +		Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
> +		Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
> +		FMan v3.
> +
> +- reg
> +		Usage: required
> +		Value type: <prop-encoded-array>
> +		Definition: A standard property.
> +
> +- bus-frequency
> +		Usage: optional
> +		Value type: <u32>
> +		Definition: Default MDIO bus clock speed.

Use clocks/clock-names

> +- interrupts
> +		Usage: optional
> +		Value type: <prop-encoded-array>
> +		Definition: MDIO controller event interrupts.

One interrupt or multiple?

> +
> +- type
> +		Usage: required for FMan v3
> +		Value type: <stringlist>
> +		Definition: A standard property.

What standard is "type" defined in?

> +		FMan v3 has internal MDIO for internal PCS(Physical Coding
> +		Sublayer) PHYs and external MDIO for external PHYs.
> +		The settings and programming routines for internal/external
> +		MDIO are different. Must include "internal" for internal MDIO,
> +		must include "external" for external MDIO.

I assume fman v2 is always internal?  How about a boolean
"fsl,fman-internal-phy" property instead?

> +
> +EXAMPLE
> +
> +Example for FMan v2:
> +
> +mdio@f1000 {
> +	compatible = "fsl,fman-xmdio";
> +	reg = <0xf1000 0x1000>;
> +};
> +
> +Example for FMan v3:
> +
> +mdio@fd000 {
> +	compatible = "fsl,fman-memac-mdio";
> +	reg = <0xfd000 0x1000>;
> +	bus-frequency = <2500000>;
> +	type = "external";
> +};
> +
> +=============================================================================
>  Example
>  
>  fman@400000 {
> @@ -526,4 +588,11 @@ fman@400000 {
>  		compatible = "fsl,fman-ptp-timer";
>  		reg = <0xfe000 0x1000>;
>  	};
> +
> +	mdio@fd000 {
> +		compatible = "fsl,fman-memac-mdio";
> +		reg = <0xfd000 0x1000>;
> +		bus-frequency = <2500000>;
> +		type = "external";
> +	};
>  };

The rest of the example is fman v2; don't mix an fman v3 node in with
that.

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Scott Wood Nov. 11, 2014, 5:37 p.m. UTC | #3
On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, November 11, 2014 8:23 AM
> > To: shh.xie@gmail.com
> > Cc: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; Medve
> > Emilian-EMMEDVE1; Xie Shaohui-B21989
> > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > 
> > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com wrote:
> > > From: Shaohui Xie <Shaohui.Xie@freescale.com>
> > >
> > > This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
> > >
> > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > ---
> > > based on http://patchwork.ozlabs.org/patch/390351/
> > > for 'next' of
> > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git
> > 
> > Are there any other FMan pieces that are missing from the above patch?
> [S.H] I'm adding Igal for this comment.
> 
> > 
> > >  .../devicetree/bindings/powerpc/fsl/fman.txt       | 69
> > ++++++++++++++++++++++
> > >  1 file changed, 69 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > > b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > > index da8e5f2..83c2f14 100644
> > > --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > > +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > > @@ -7,6 +7,7 @@ CONTENTS
> > >    - FMan MURAM Node
> > >    - FMan dTSEC/XGEC/mEMAC Node
> > >    - FMan IEEE 1588 Node
> > > +  - FMan MDIO Node
> > >    - Example
> > >
> > >
> > > ======================================================================
> > > ======= @@ -352,6 +353,67 @@ ptp-timer@fe000 {  };
> > >
> > >
> > > ======================================================================
> > > =======
> > > +FMan MDIO Node
> > > +
> > > +DESCRIPTION
> > > +
> > > +The MDIO is a bus to which the PHY devices are connected.
> > > +
> > > +PROPERTIES
> > > +
> > > +- compatible
> > > +		Usage: required
> > > +		Value type: <stringlist>
> > > +		Definition: A standard property.
> > > +		Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
> > > +		Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
> > > +		Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
> > > +		FMan v3.
> > > +
> > > +- reg
> > > +		Usage: required
> > > +		Value type: <prop-encoded-array>
> > > +		Definition: A standard property.
> > > +
> > > +- bus-frequency
> > > +		Usage: optional
> > > +		Value type: <u32>
> > > +		Definition: Default MDIO bus clock speed.
> > 
> > Use clocks/clock-names
> [S.H] The MDIO uses Fman clock and divides it to a proper value which is specified by this property.

Use clocks/clock-names to describe that relationship.

> > 
> > > +- interrupts
> > > +		Usage: optional
> > > +		Value type: <prop-encoded-array>
> > > +		Definition: MDIO controller event interrupts.
> > 
> > One interrupt or multiple?
> [S.H] One for 1 Gb/s, one for 10 Gb/s.

Then the binding needs to say that there are two (except for
"fsl,fman-mdio", right?) and which is which.

> > 
> > > +
> > > +- type
> > > +		Usage: required for FMan v3
> > > +		Value type: <stringlist>
> > > +		Definition: A standard property.
> > 
> > What standard is "type" defined in?
>
> [S.H] It's to differentiate between the internal and external MDIO, I'm
> not quite sure about naming it, or what could be better way to
> differentiate the MDIOs?

I'm not questioning the need to convey this information.  I'm saying
it's not "A standard property".  I'd also like to see a better name.

> > 
> > > +		FMan v3 has internal MDIO for internal PCS(Physical Coding
> > > +		Sublayer) PHYs and external MDIO for external PHYs.
> > > +		The settings and programming routines for internal/external
> > > +		MDIO are different. Must include "internal" for internal MDIO,
> > > +		must include "external" for external MDIO.
> > 
> > I assume fman v2 is always internal?  How about a boolean "fsl,fman-
> > internal-phy" property instead?
> [S.H] Both Fman v2 & v3 have internal/external MDIO, Fman v2 uses internal MDIO for TBI operations to set the SGMII PHY, 
>
> The TBI implements transmit/receive portions of PCS, it's not used in
> Linux. The PCS on Fman V3 are not just for SGMII, it has more
> implementations, it's used in Linux.

The device tree is about the hardware, not what's used in Linux.

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joakim Tjernlund Nov. 11, 2014, 10:27 p.m. UTC | #4
> >
> > The TBI implements transmit/receive portions of PCS, it's not used in
> > Linux. The PCS on Fman V3 are not just for SGMII, it has more
> > implementations, it's used in Linux.

It is used for PHY less mode(aka fixed PHY) and needs to be exposed to
linux so it is possible to select SGMII/1000BASE-X, AutoNeg etc.

> 
> The device tree is about the hardware, not what's used in Linux.
> 
> -Scott

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Scott Wood Nov. 13, 2014, 6:16 a.m. UTC | #5
On Wed, 2014-11-12 at 07:40 -0600, Xie Shaohui-B21989 wrote:
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Wednesday, November 12, 2014 1:38 AM
> > To: Xie Shaohui-B21989
> > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > 
> > On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Tuesday, November 11, 2014 8:23 AM
> > > > To: shh.xie@gmail.com
> > > > Cc: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; Medve
> > > > Emilian-EMMEDVE1; Xie Shaohui-B21989
> > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > >
> > > > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com wrote:
> > > > > From: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > >
> > > > > This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
> > > > >
> > > > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > ---
> > > > > based on http://patchwork.ozlabs.org/patch/390351/
> > > > > for 'next' of
> > > > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git
> > > >
> > > > Are there any other FMan pieces that are missing from the above patch?
> > > [S.H] I'm adding Igal for this comment.
> > >
> > > >
> > > > > +- bus-frequency
> > > > > +		Usage: optional
> > > > > +		Value type: <u32>
> > > > > +		Definition: Default MDIO bus clock speed.
> > > >
> > > > Use clocks/clock-names
> > > [S.H] The MDIO uses Fman clock and divides it to a proper value which
> > is specified by this property.
> > 
> > Use clocks/clock-names to describe that relationship.
> > 
>
> [S.H] The MDIO node is sub-node and embedded in Fman node, the
> clocks/clock-names is provided by Fman node, should repeat them in MDIO
> node? For the default MDIO bus clock speed, maybe "clock-ranges" should
> be used?

It's a different clock.  You wouldn't be repeating.  If it's derived
from the FMan clock, then maybe you don't need anything here (does the
driver know what the divider is, or would that need to be specified in
the device tree?), but no more clock-frequency/bus-frequency properties.

> [S.H] since Fman V2 & V3 can be differentiated by compatible, a boolean
> property "fsl,fman-internal-mdio" seems better, if defined, it
> indicates an internal MDIO. It looks like below:
> 
> fsl,fman-internal-mdio
> 		Usage: required for internal MDIO
> 		Value type: Boolean
> 		Definition: Fman has internal MDIO for internal PCS(Physical
> 		Coding Sublayer) PHYs and external MDIO for external PHYs.
> 		The settings and programming routines for internal/external
> 		MDIO are different. Must be included for internal MDIO.
> 
> How about this?

This looks better, thanks.

This would be set on fman v2 TBI mdio nodes as well, right?

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Scott Wood Nov. 13, 2014, 7:15 a.m. UTC | #6
On Thu, 2014-11-13 at 01:11 -0600, Xie Shaohui-B21989 wrote:
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Thursday, November 13, 2014 2:17 PM
> > To: Xie Shaohui-B21989
> > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > 
> > On Wed, 2014-11-12 at 07:40 -0600, Xie Shaohui-B21989 wrote:
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Wednesday, November 12, 2014 1:38 AM
> > > > To: Xie Shaohui-B21989
> > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > >
> > > > On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:
> > > > > > -----Original Message-----
> > > > > > From: Wood Scott-B07421
> > > > > > Sent: Tuesday, November 11, 2014 8:23 AM
> > > > > > To: shh.xie@gmail.com
> > > > > > Cc: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org;
> > > > > > Medve Emilian-EMMEDVE1; Xie Shaohui-B21989
> > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > > > >
> > > > > > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com wrote:
> > > > > > > From: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > > >
> > > > > > > This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
> > > > > > >
> > > > > > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > > > ---
> > > > > > > based on http://patchwork.ozlabs.org/patch/390351/
> > > > > > > for 'next' of
> > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.
> > > > > > > git
> > > > > >
> > > > > > Are there any other FMan pieces that are missing from the above
> > patch?
> > > > > [S.H] I'm adding Igal for this comment.
> > > > >
> > > > > >
> > > > > > > +- bus-frequency
> > > > > > > +		Usage: optional
> > > > > > > +		Value type: <u32>
> > > > > > > +		Definition: Default MDIO bus clock speed.
> > > > > >
> > > > > > Use clocks/clock-names
> > > > > [S.H] The MDIO uses Fman clock and divides it to a proper value
> > > > > which
> > > > is specified by this property.
> > > >
> > > > Use clocks/clock-names to describe that relationship.
> > > >
> > >
> > > [S.H] The MDIO node is sub-node and embedded in Fman node, the
> > > clocks/clock-names is provided by Fman node, should repeat them in
> > > MDIO node? For the default MDIO bus clock speed, maybe "clock-ranges"
> > > should be used?
> > 
> > It's a different clock.  You wouldn't be repeating.  If it's derived from
> > the FMan clock, then maybe you don't need anything here (does the driver
> > know what the divider is, or would that need to be specified in the
> > device tree?), but no more clock-frequency/bus-frequency properties.
> > 
> [S.H] The purpose here is to get a specific clock frequency, driver to use it to calculate the divider.
> Then the Fman clock can be divided to the frequency.

Oh, so this is stating a desired frequency and not something that
already exists?  What determines this frequency?  Is it based on board
design, or just on the MDIO standard, etc?  I'm wondering if the device
tree is the right place for it.

> > > [S.H] since Fman V2 & V3 can be differentiated by compatible, a
> > > boolean property "fsl,fman-internal-mdio" seems better, if defined, it
> > > indicates an internal MDIO. It looks like below:
> > >
> > > fsl,fman-internal-mdio
> > > 		Usage: required for internal MDIO
> > > 		Value type: Boolean
> > > 		Definition: Fman has internal MDIO for internal PCS(Physical
> > > 		Coding Sublayer) PHYs and external MDIO for external PHYs.
> > > 		The settings and programming routines for internal/external
> > > 		MDIO are different. Must be included for internal MDIO.
> > >
> > > How about this?
> > 
> > This looks better, thanks.
> > 
> > This would be set on fman v2 TBI mdio nodes as well, right?
> [S.H] Yes. But it's not used by driver. (I know I should not say this :) )

Saying it is fine as long as you still put it in the device tree. :-)

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
shaohui xie Nov. 13, 2014, 8:02 a.m. UTC | #7
Best Regards, 
Shaohui Xie


> -----Original Message-----

> From: Wood Scott-B07421

> Sent: Thursday, November 13, 2014 3:15 PM

> To: Xie Shaohui-B21989

> Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> Subject: Re: [PATCH] DT: add MDIO node for FMan node

> 

> On Thu, 2014-11-13 at 01:11 -0600, Xie Shaohui-B21989 wrote:

> > > -----Original Message-----

> > > From: Wood Scott-B07421

> > > Sent: Thursday, November 13, 2014 2:17 PM

> > > To: Xie Shaohui-B21989

> > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > >

> > > On Wed, 2014-11-12 at 07:40 -0600, Xie Shaohui-B21989 wrote:

> > > > > -----Original Message-----

> > > > > From: Wood Scott-B07421

> > > > > Sent: Wednesday, November 12, 2014 1:38 AM

> > > > > To: Xie Shaohui-B21989

> > > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > > > >

> > > > > On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:

> > > > > > > -----Original Message-----

> > > > > > > From: Wood Scott-B07421

> > > > > > > Sent: Tuesday, November 11, 2014 8:23 AM

> > > > > > > To: shh.xie@gmail.com

> > > > > > > Cc: linuxppc-dev@lists.ozlabs.org;

> > > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1; Xie

> > > > > > > Shaohui-B21989

> > > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > > > > > >

> > > > > > > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com wrote:

> > > > > > > > From: Shaohui Xie <Shaohui.Xie@freescale.com>

> > > > > > > >

> > > > > > > > This binding is for FMan MDIO, it covers FMan v2 & FMan v3.

> > > > > > > >

> > > > > > > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>

> > > > > > > > ---

> > > > > > > > based on http://patchwork.ozlabs.org/patch/390351/

> > > > > > > > for 'next' of

> > > > > > > >

> git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.

> > > > > > > > git

> > > > > > >

> > > > > > > Are there any other FMan pieces that are missing from the

> > > > > > > above

> > > patch?

> > > > > > [S.H] I'm adding Igal for this comment.

> > > > > >

> > > > > > >

> > > > > > > > +- bus-frequency

> > > > > > > > +		Usage: optional

> > > > > > > > +		Value type: <u32>

> > > > > > > > +		Definition: Default MDIO bus clock speed.

> > > > > > >

> > > > > > > Use clocks/clock-names

> > > > > > [S.H] The MDIO uses Fman clock and divides it to a proper

> > > > > > value which

> > > > > is specified by this property.

> > > > >

> > > > > Use clocks/clock-names to describe that relationship.

> > > > >

> > > >

> > > > [S.H] The MDIO node is sub-node and embedded in Fman node, the

> > > > clocks/clock-names is provided by Fman node, should repeat them in

> > > > MDIO node? For the default MDIO bus clock speed, maybe "clock-

> ranges"

> > > > should be used?

> > >

> > > It's a different clock.  You wouldn't be repeating.  If it's derived

> > > from the FMan clock, then maybe you don't need anything here (does

> > > the driver know what the divider is, or would that need to be

> > > specified in the device tree?), but no more clock-frequency/bus-

> frequency properties.

> > >

> > [S.H] The purpose here is to get a specific clock frequency, driver to

> use it to calculate the divider.

> > Then the Fman clock can be divided to the frequency.

> 

> Oh, so this is stating a desired frequency and not something that already

> exists?  What determines this frequency?  Is it based on board design, or

> just on the MDIO standard, etc?  I'm wondering if the device tree is the

> right place for it.

[S.H] Yes, a desired frequency which is different with MDIO standard.
The Fman clock and the divider determines this frequency.
Since Fman clock is different on different SoCs, so specify the desired frequency, 
then to get the proper divider.


Thanks.
shaohui
Scott Wood Nov. 13, 2014, 8:04 a.m. UTC | #8
On Thu, 2014-11-13 at 02:02 -0600, Xie Shaohui-B21989 wrote:
> 
> 
> Best Regards, 
> Shaohui Xie
> 
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Thursday, November 13, 2014 3:15 PM
> > To: Xie Shaohui-B21989
> > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > 
> > On Thu, 2014-11-13 at 01:11 -0600, Xie Shaohui-B21989 wrote:
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Thursday, November 13, 2014 2:17 PM
> > > > To: Xie Shaohui-B21989
> > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > >
> > > > On Wed, 2014-11-12 at 07:40 -0600, Xie Shaohui-B21989 wrote:
> > > > > > -----Original Message-----
> > > > > > From: Wood Scott-B07421
> > > > > > Sent: Wednesday, November 12, 2014 1:38 AM
> > > > > > To: Xie Shaohui-B21989
> > > > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > > > >
> > > > > > On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:
> > > > > > > > -----Original Message-----
> > > > > > > > From: Wood Scott-B07421
> > > > > > > > Sent: Tuesday, November 11, 2014 8:23 AM
> > > > > > > > To: shh.xie@gmail.com
> > > > > > > > Cc: linuxppc-dev@lists.ozlabs.org;
> > > > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1; Xie
> > > > > > > > Shaohui-B21989
> > > > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > > > > > >
> > > > > > > > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com wrote:
> > > > > > > > > From: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > > > > >
> > > > > > > > > This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > > > > > ---
> > > > > > > > > based on http://patchwork.ozlabs.org/patch/390351/
> > > > > > > > > for 'next' of
> > > > > > > > >
> > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.
> > > > > > > > > git
> > > > > > > >
> > > > > > > > Are there any other FMan pieces that are missing from the
> > > > > > > > above
> > > > patch?
> > > > > > > [S.H] I'm adding Igal for this comment.
> > > > > > >
> > > > > > > >
> > > > > > > > > +- bus-frequency
> > > > > > > > > +		Usage: optional
> > > > > > > > > +		Value type: <u32>
> > > > > > > > > +		Definition: Default MDIO bus clock speed.
> > > > > > > >
> > > > > > > > Use clocks/clock-names
> > > > > > > [S.H] The MDIO uses Fman clock and divides it to a proper
> > > > > > > value which
> > > > > > is specified by this property.
> > > > > >
> > > > > > Use clocks/clock-names to describe that relationship.
> > > > > >
> > > > >
> > > > > [S.H] The MDIO node is sub-node and embedded in Fman node, the
> > > > > clocks/clock-names is provided by Fman node, should repeat them in
> > > > > MDIO node? For the default MDIO bus clock speed, maybe "clock-
> > ranges"
> > > > > should be used?
> > > >
> > > > It's a different clock.  You wouldn't be repeating.  If it's derived
> > > > from the FMan clock, then maybe you don't need anything here (does
> > > > the driver know what the divider is, or would that need to be
> > > > specified in the device tree?), but no more clock-frequency/bus-
> > frequency properties.
> > > >
> > > [S.H] The purpose here is to get a specific clock frequency, driver to
> > use it to calculate the divider.
> > > Then the Fman clock can be divided to the frequency.
> > 
> > Oh, so this is stating a desired frequency and not something that already
> > exists?  What determines this frequency?  Is it based on board design, or
> > just on the MDIO standard, etc?  I'm wondering if the device tree is the
> > right place for it.
> [S.H] Yes, a desired frequency which is different with MDIO standard.

I'm not sure what you mean by "different with".  Do you mean "different
from"?  What does the standard say about frequency?

> The Fman clock and the divider determines this frequency.
> Since Fman clock is different on different SoCs, so specify the desired frequency, 
> then to get the proper divider.

Why does the fman clock being different mean the mdio clock should be
different?

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
shaohui xie Nov. 13, 2014, 8:27 a.m. UTC | #9
Best Regards, 
Shaohui Xie


> -----Original Message-----

> From: Wood Scott-B07421

> Sent: Thursday, November 13, 2014 4:04 PM

> To: Xie Shaohui-B21989

> Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> Subject: Re: [PATCH] DT: add MDIO node for FMan node

> 

> On Thu, 2014-11-13 at 02:02 -0600, Xie Shaohui-B21989 wrote:

> >

> >

> > Best Regards,

> > Shaohui Xie

> >

> >

> > > -----Original Message-----

> > > From: Wood Scott-B07421

> > > Sent: Thursday, November 13, 2014 3:15 PM

> > > To: Xie Shaohui-B21989

> > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > >

> > > On Thu, 2014-11-13 at 01:11 -0600, Xie Shaohui-B21989 wrote:

> > > > > -----Original Message-----

> > > > > From: Wood Scott-B07421

> > > > > Sent: Thursday, November 13, 2014 2:17 PM

> > > > > To: Xie Shaohui-B21989

> > > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > > > >

> > > > > On Wed, 2014-11-12 at 07:40 -0600, Xie Shaohui-B21989 wrote:

> > > > > > > -----Original Message-----

> > > > > > > From: Wood Scott-B07421

> > > > > > > Sent: Wednesday, November 12, 2014 1:38 AM

> > > > > > > To: Xie Shaohui-B21989

> > > > > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;

> > > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1

> > > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > > > > > >

> > > > > > > On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:

> > > > > > > > > -----Original Message-----

> > > > > > > > > From: Wood Scott-B07421

> > > > > > > > > Sent: Tuesday, November 11, 2014 8:23 AM

> > > > > > > > > To: shh.xie@gmail.com

> > > > > > > > > Cc: linuxppc-dev@lists.ozlabs.org;

> > > > > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1; Xie

> > > > > > > > > Shaohui-B21989

> > > > > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node

> > > > > > > > >

> > > > > > > > > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com

> wrote:

> > > > > > > > > > From: Shaohui Xie <Shaohui.Xie@freescale.com>

> > > > > > > > > >

> > > > > > > > > > This binding is for FMan MDIO, it covers FMan v2 & FMan

> v3.

> > > > > > > > > >

> > > > > > > > > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>

> > > > > > > > > > ---

> > > > > > > > > > based on http://patchwork.ozlabs.org/patch/390351/

> > > > > > > > > > for 'next' of

> > > > > > > > > >

> > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.

> > > > > > > > > > git

> > > > > > > > >

> > > > > > > > > Are there any other FMan pieces that are missing from

> > > > > > > > > the above

> > > > > patch?

> > > > > > > > [S.H] I'm adding Igal for this comment.

> > > > > > > >

> > > > > > > > >

> > > > > > > > > > +- bus-frequency

> > > > > > > > > > +		Usage: optional

> > > > > > > > > > +		Value type: <u32>

> > > > > > > > > > +		Definition: Default MDIO bus clock speed.

> > > > > > > > >

> > > > > > > > > Use clocks/clock-names

> > > > > > > > [S.H] The MDIO uses Fman clock and divides it to a proper

> > > > > > > > value which

> > > > > > > is specified by this property.

> > > > > > >

> > > > > > > Use clocks/clock-names to describe that relationship.

> > > > > > >

> > > > > >

> > > > > > [S.H] The MDIO node is sub-node and embedded in Fman node, the

> > > > > > clocks/clock-names is provided by Fman node, should repeat

> > > > > > them in MDIO node? For the default MDIO bus clock speed, maybe

> > > > > > "clock-

> > > ranges"

> > > > > > should be used?

> > > > >

> > > > > It's a different clock.  You wouldn't be repeating.  If it's

> > > > > derived from the FMan clock, then maybe you don't need anything

> > > > > here (does the driver know what the divider is, or would that

> > > > > need to be specified in the device tree?), but no more

> > > > > clock-frequency/bus-

> > > frequency properties.

> > > > >

> > > > [S.H] The purpose here is to get a specific clock frequency,

> > > > driver to

> > > use it to calculate the divider.

> > > > Then the Fman clock can be divided to the frequency.

> > >

> > > Oh, so this is stating a desired frequency and not something that

> > > already exists?  What determines this frequency?  Is it based on

> > > board design, or just on the MDIO standard, etc?  I'm wondering if

> > > the device tree is the right place for it.

> > [S.H] Yes, a desired frequency which is different with MDIO standard.

> 

> I'm not sure what you mean by "different with".  Do you mean "different

> from"?  What does the standard say about frequency?

[S.H] The standard MDIO frequency is 2.5MHz.  But a different one is desired.

> 

> > The Fman clock and the divider determines this frequency.

> > Since Fman clock is different on different SoCs, so specify the

> > desired frequency, then to get the proper divider.

> 

> Why does the fman clock being different mean the mdio clock should be

> different?

[S.H] The mdio clock should be same, a different divider should be used 
to match the Fman clock to make sure the mdio clock kept same. So to specify
The desired mdio frequency, then to get proper divider.

Thanks.
Shaohui
Scott Wood Nov. 13, 2014, 8:29 a.m. UTC | #10
On Thu, 2014-11-13 at 02:27 -0600, Xie Shaohui-B21989 wrote:
> 
> 
> Best Regards, 
> Shaohui Xie
> 
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Thursday, November 13, 2014 4:04 PM
> > To: Xie Shaohui-B21989
> > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > 
> > On Thu, 2014-11-13 at 02:02 -0600, Xie Shaohui-B21989 wrote:
> > >
> > >
> > > Best Regards,
> > > Shaohui Xie
> > >
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Thursday, November 13, 2014 3:15 PM
> > > > To: Xie Shaohui-B21989
> > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > >
> > > > On Thu, 2014-11-13 at 01:11 -0600, Xie Shaohui-B21989 wrote:
> > > > > > -----Original Message-----
> > > > > > From: Wood Scott-B07421
> > > > > > Sent: Thursday, November 13, 2014 2:17 PM
> > > > > > To: Xie Shaohui-B21989
> > > > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > > > >
> > > > > > On Wed, 2014-11-12 at 07:40 -0600, Xie Shaohui-B21989 wrote:
> > > > > > > > -----Original Message-----
> > > > > > > > From: Wood Scott-B07421
> > > > > > > > Sent: Wednesday, November 12, 2014 1:38 AM
> > > > > > > > To: Xie Shaohui-B21989
> > > > > > > > Cc: Liberman Igal-B31950; linuxppc-dev@lists.ozlabs.org;
> > > > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1
> > > > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > > > > > >
> > > > > > > > On Tue, 2014-11-11 at 04:32 -0600, Xie Shaohui-B21989 wrote:
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Wood Scott-B07421
> > > > > > > > > > Sent: Tuesday, November 11, 2014 8:23 AM
> > > > > > > > > > To: shh.xie@gmail.com
> > > > > > > > > > Cc: linuxppc-dev@lists.ozlabs.org;
> > > > > > > > > > devicetree@vger.kernel.org; Medve Emilian-EMMEDVE1; Xie
> > > > > > > > > > Shaohui-B21989
> > > > > > > > > > Subject: Re: [PATCH] DT: add MDIO node for FMan node
> > > > > > > > > >
> > > > > > > > > > On Tue, 2014-11-04 at 19:56 +0800, shh.xie@gmail.com
> > wrote:
> > > > > > > > > > > From: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > > > > > > >
> > > > > > > > > > > This binding is for FMan MDIO, it covers FMan v2 & FMan
> > v3.
> > > > > > > > > > >
> > > > > > > > > > > Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> > > > > > > > > > > ---
> > > > > > > > > > > based on http://patchwork.ozlabs.org/patch/390351/
> > > > > > > > > > > for 'next' of
> > > > > > > > > > >
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.
> > > > > > > > > > > git
> > > > > > > > > >
> > > > > > > > > > Are there any other FMan pieces that are missing from
> > > > > > > > > > the above
> > > > > > patch?
> > > > > > > > > [S.H] I'm adding Igal for this comment.
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > +- bus-frequency
> > > > > > > > > > > +		Usage: optional
> > > > > > > > > > > +		Value type: <u32>
> > > > > > > > > > > +		Definition: Default MDIO bus clock speed.
> > > > > > > > > >
> > > > > > > > > > Use clocks/clock-names
> > > > > > > > > [S.H] The MDIO uses Fman clock and divides it to a proper
> > > > > > > > > value which
> > > > > > > > is specified by this property.
> > > > > > > >
> > > > > > > > Use clocks/clock-names to describe that relationship.
> > > > > > > >
> > > > > > >
> > > > > > > [S.H] The MDIO node is sub-node and embedded in Fman node, the
> > > > > > > clocks/clock-names is provided by Fman node, should repeat
> > > > > > > them in MDIO node? For the default MDIO bus clock speed, maybe
> > > > > > > "clock-
> > > > ranges"
> > > > > > > should be used?
> > > > > >
> > > > > > It's a different clock.  You wouldn't be repeating.  If it's
> > > > > > derived from the FMan clock, then maybe you don't need anything
> > > > > > here (does the driver know what the divider is, or would that
> > > > > > need to be specified in the device tree?), but no more
> > > > > > clock-frequency/bus-
> > > > frequency properties.
> > > > > >
> > > > > [S.H] The purpose here is to get a specific clock frequency,
> > > > > driver to
> > > > use it to calculate the divider.
> > > > > Then the Fman clock can be divided to the frequency.
> > > >
> > > > Oh, so this is stating a desired frequency and not something that
> > > > already exists?  What determines this frequency?  Is it based on
> > > > board design, or just on the MDIO standard, etc?  I'm wondering if
> > > > the device tree is the right place for it.
> > > [S.H] Yes, a desired frequency which is different with MDIO standard.
> > 
> > I'm not sure what you mean by "different with".  Do you mean "different
> > from"?  What does the standard say about frequency?
> [S.H] The standard MDIO frequency is 2.5MHz.  But a different one is desired.

Why is a different frequency desired?

> > 
> > > The Fman clock and the divider determines this frequency.
> > > Since Fman clock is different on different SoCs, so specify the
> > > desired frequency, then to get the proper divider.
> > 
> > Why does the fman clock being different mean the mdio clock should be
> > different?
> [S.H] The mdio clock should be same, a different divider should be used 
> to match the Fman clock to make sure the mdio clock kept same. So to specify
> The desired mdio frequency, then to get proper divider.

What I'm trying to determine is why the MDIO frequency wouldn't always
be the same, and thus could be hardcoded in the driver rather than in
the device tree.

-Scott


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index da8e5f2..83c2f14 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -7,6 +7,7 @@  CONTENTS
   - FMan MURAM Node
   - FMan dTSEC/XGEC/mEMAC Node
   - FMan IEEE 1588 Node
+  - FMan MDIO Node
   - Example
 
 =============================================================================
@@ -352,6 +353,67 @@  ptp-timer@fe000 {
 };
 
 =============================================================================
+FMan MDIO Node
+
+DESCRIPTION
+
+The MDIO is a bus to which the PHY devices are connected.
+
+PROPERTIES
+
+- compatible
+		Usage: required
+		Value type: <stringlist>
+		Definition: A standard property.
+		Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
+		Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
+		Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
+		FMan v3.
+
+- reg
+		Usage: required
+		Value type: <prop-encoded-array>
+		Definition: A standard property.
+
+- bus-frequency
+		Usage: optional
+		Value type: <u32>
+		Definition: Default MDIO bus clock speed.
+
+- interrupts
+		Usage: optional
+		Value type: <prop-encoded-array>
+		Definition: MDIO controller event interrupts.
+
+- type
+		Usage: required for FMan v3
+		Value type: <stringlist>
+		Definition: A standard property.
+		FMan v3 has internal MDIO for internal PCS(Physical Coding
+		Sublayer) PHYs and external MDIO for external PHYs.
+		The settings and programming routines for internal/external
+		MDIO are different. Must include "internal" for internal MDIO,
+		must include "external" for external MDIO.
+
+EXAMPLE
+
+Example for FMan v2:
+
+mdio@f1000 {
+	compatible = "fsl,fman-xmdio";
+	reg = <0xf1000 0x1000>;
+};
+
+Example for FMan v3:
+
+mdio@fd000 {
+	compatible = "fsl,fman-memac-mdio";
+	reg = <0xfd000 0x1000>;
+	bus-frequency = <2500000>;
+	type = "external";
+};
+
+=============================================================================
 Example
 
 fman@400000 {
@@ -526,4 +588,11 @@  fman@400000 {
 		compatible = "fsl,fman-ptp-timer";
 		reg = <0xfe000 0x1000>;
 	};
+
+	mdio@fd000 {
+		compatible = "fsl,fman-memac-mdio";
+		reg = <0xfd000 0x1000>;
+		bus-frequency = <2500000>;
+		type = "external";
+	};
 };