Re: [PATCH] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy

2015-12-22 Thread Joakim Tjernlund
On Tue, 2015-12-22 at 06:18 +0200, igal.liber...@freescale.com wrote:
> From: Igal Liberman 
> 
> Signed-off-by: Igal Liberman 
> ---
>  .../devicetree/bindings/powerpc/fsl/fman.txt   |   39 
> 
>  1 file changed, 39 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index 1fc5328..7a6d7c3 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -315,6 +315,16 @@ PROPERTIES
>   Value type: 
>   Definition: A phandle for 1EEE1588 timer.
>  
> +- pcsphy-handle
> + Usage required for "fsl,fman-memac" MACs
> + Value type: 
> + Definition: A phandle for pcsphy.
> +
> +- tbi-handle
> + Usage required for "fsl,fman-dtsec" MACs
> + Value type: 
> + Definition: A phandle for tbiphy.
> +
>  EXAMPLE
>  
>  fman1_tx28: port@a8000 {
> @@ -340,6 +350,7 @@ ethernet@e {
>   reg = <0xe 0x1000>;
>   fsl,fman-ports = <_rx8 _tx28>;
>   ptp-timer = <>;
> + tbi-handle = <>;
>  };
>  
>  
> @@ -415,6 +426,13 @@ PROPERTIES
>   The settings and programming routines for internal/external
>   MDIO are different. Must be included for internal MDIO.
>  
> +For internal PHY device on internal mdio bus, a PHY node should be created.
> +See the definition of the PHY node in booting-without-of.txt for an
> +example of how to define a PHY (Internal PHY has no interrupt line).
> +- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
> +- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY,
> +  PCS PHY addr must be '0'.

Will this replace the need for fixed PHYs ?

   Jocke
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy

2015-12-22 Thread Scott Wood
On Tue, 2015-12-22 at 06:18 +0200, igal.liber...@freescale.com wrote:
> From: Igal Liberman 
> 
> Signed-off-by: Igal Liberman 
> ---
>  .../devicetree/bindings/powerpc/fsl/fman.txt   |   39
> 
>  1 file changed, 39 insertions(+)

Some description in the log would be nice, especially why it can't use phy
-handle

> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index 1fc5328..7a6d7c3 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -315,6 +315,16 @@ PROPERTIES
>   Value type: 
>   Definition: A phandle for 1EEE1588 timer.
>  
> +- pcsphy-handle
> + Usage required for "fsl,fman-memac" MACs
> + Value type: 
> + Definition: A phandle for pcsphy.
> +
> +- tbi-handle
> + Usage required for "fsl,fman-dtsec" MACs
> + Value type: 
> + Definition: A phandle for tbiphy.
> +
>  EXAMPLE
>  
>  fman1_tx28: port@a8000 {
> @@ -340,6 +350,7 @@ ethernet@e {
>   reg = <0xe 0x1000>;
>   fsl,fman-ports = <_rx8 _tx28>;
>   ptp-timer = <>;
> + tbi-handle = <>;
>  };
>  
>  ===
> =
> @@ -415,6 +426,13 @@ PROPERTIES
>   The settings and programming routines for internal/external
>   MDIO are different. Must be included for internal MDIO.
>  
> +For internal PHY device on internal mdio bus, a PHY node should be created.
> +See the definition of the PHY node in booting-without-of.txt for an
> +example of how to define a PHY (Internal PHY has no interrupt line).
> +- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
> +- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS
> PHY,
> +  PCS PHY addr must be '0'.
> +
>  EXAMPLE
>  
>  Example for FMan v2 external MDIO:
> @@ -425,12 +443,28 @@ mdio@f1000 {
>   interrupts = <101 2 0 0>;
>  };
>  
> +Example for FMan v2 internal MDIO:
> +
> +mdio@e3120 {
> + compatible = "fsl,fman-mdio";
> + reg = <0xe3120 0xee0>;
> + fsl,fman-internal-mdio;
> +
> + tbi1: tbi-phy@8 {
> + reg = <0x8>;
> + device_type = "tbi-phy";
> + };
> +};
> +
>  Example for FMan v3 internal MDIO:
>  
>  mdio@f1000 {
>   compatible = "fsl,fman-memac-mdio";
>   reg = <0xf1000 0x1000>;
>   fsl,fman-internal-mdio;
> +
> + pcsphy6: ethernet-phy@0 {
> + reg = <0x0>;
>  };

missing }

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy

2015-12-22 Thread igal.liberman
From: Igal Liberman 

Signed-off-by: Igal Liberman 
---
 .../devicetree/bindings/powerpc/fsl/fman.txt   |   39 
 1 file changed, 39 insertions(+)

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt 
b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index 1fc5328..7a6d7c3 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -315,6 +315,16 @@ PROPERTIES
Value type: 
Definition: A phandle for 1EEE1588 timer.
 
+- pcsphy-handle
+   Usage required for "fsl,fman-memac" MACs
+   Value type: 
+   Definition: A phandle for pcsphy.
+
+- tbi-handle
+   Usage required for "fsl,fman-dtsec" MACs
+   Value type: 
+   Definition: A phandle for tbiphy.
+
 EXAMPLE
 
 fman1_tx28: port@a8000 {
@@ -340,6 +350,7 @@ ethernet@e {
reg = <0xe 0x1000>;
fsl,fman-ports = <_rx8 _tx28>;
ptp-timer = <>;
+   tbi-handle = <>;
 };
 
 
@@ -415,6 +426,13 @@ PROPERTIES
The settings and programming routines for internal/external
MDIO are different. Must be included for internal MDIO.
 
+For internal PHY device on internal mdio bus, a PHY node should be created.
+See the definition of the PHY node in booting-without-of.txt for an
+example of how to define a PHY (Internal PHY has no interrupt line).
+- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
+- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY,
+  PCS PHY addr must be '0'.
+
 EXAMPLE
 
 Example for FMan v2 external MDIO:
@@ -425,12 +443,28 @@ mdio@f1000 {
interrupts = <101 2 0 0>;
 };
 
+Example for FMan v2 internal MDIO:
+
+mdio@e3120 {
+   compatible = "fsl,fman-mdio";
+   reg = <0xe3120 0xee0>;
+   fsl,fman-internal-mdio;
+
+   tbi1: tbi-phy@8 {
+   reg = <0x8>;
+   device_type = "tbi-phy";
+   };
+};
+
 Example for FMan v3 internal MDIO:
 
 mdio@f1000 {
compatible = "fsl,fman-memac-mdio";
reg = <0xf1000 0x1000>;
fsl,fman-internal-mdio;
+
+   pcsphy6: ethernet-phy@0 {
+   reg = <0x0>;
 };
 
 =
@@ -568,6 +602,7 @@ fman@40 {
cell-index = <0>;
reg = <0xe 0x1000>;
fsl,fman-ports = <_rx_0x8 _tx_0x28>;
+   tbi-handle = <>;
};
 
ethernet@e2000 {
@@ -575,6 +610,7 @@ fman@40 {
cell-index = <1>;
reg = <0xe2000 0x1000>;
fsl,fman-ports = <_rx_0x9 _tx_0x29>;
+   tbi-handle = <>;
};
 
ethernet@e4000 {
@@ -582,6 +618,7 @@ fman@40 {
cell-index = <2>;
reg = <0xe4000 0x1000>;
fsl,fman-ports = <_rx_0xa _tx_0x2a>;
+   tbi-handle = <>;
};
 
ethernet@e6000 {
@@ -589,6 +626,7 @@ fman@40 {
cell-index = <3>;
reg = <0xe6000 0x1000>;
fsl,fman-ports = <_rx_0xb _tx_0x2b>;
+   tbi-handle = <>;
};
 
ethernet@e8000 {
@@ -596,6 +634,7 @@ fman@40 {
cell-index = <4>;
reg = <0xf 0x1000>;
fsl,fman-ports = <_rx_0xc _tx_0x2c>;
+   tbi-handle = <>;
 
ethernet@f {
cell-index = <8>;
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy

2015-12-22 Thread Liberman Igal

Regards,
Igal Liberman

> -Original Message-
> From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com]
> Sent: Tuesday, December 22, 2015 5:57 PM
> To: linuxppc-dev@lists.ozlabs.org; Liberman Igal-B31950
> <igal.liber...@freescale.com>; devicet...@vger.kernel.org
> Cc: Wood Scott-B07421 <scottw...@freescale.com>; Xie Shaohui-B21989
> <shaohui@freescale.com>; Bucur Madalin-Cristian-B32716
> <madalin.bu...@freescale.com>
> Subject: Re: [PATCH] powerpc/fsl: Update fman dt binding with pcs-phy and
> tbi-phy
> 
> On Tue, 2015-12-22 at 06:18 +0200, igal.liber...@freescale.com wrote:
> > From: Igal Liberman <igal.liber...@freescale.com>
> >
> > Signed-off-by: Igal Liberman <igal.liber...@freescale.com>
> > ---
> >  .../devicetree/bindings/powerpc/fsl/fman.txt   |   39
> > 
> >  1 file changed, 39 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > index 1fc5328..7a6d7c3 100644
> > --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > @@ -315,6 +315,16 @@ PROPERTIES
> >     Value type: 
> >     Definition: A phandle for 1EEE1588 timer.
> >
> > +- pcsphy-handle
> > +   Usage required for "fsl,fman-memac" MACs
> > +   Value type: 
> > +   Definition: A phandle for pcsphy.
> > +
> > +- tbi-handle
> > +   Usage required for "fsl,fman-dtsec" MACs
> > +   Value type: 
> > +   Definition: A phandle for tbiphy.
> > +
> >  EXAMPLE
> >
> >  fman1_tx28: port@a8000 {
> > @@ -340,6 +350,7 @@ ethernet@e {
> >     reg = <0xe 0x1000>;
> >     fsl,fman-ports = <_rx8 _tx28>;
> >     ptp-timer = <>;
> > +   tbi-handle = <>;
> >  };
> >
> >
> >
> ==
> 
> > ==
> > @@ -415,6 +426,13 @@ PROPERTIES
> >     The settings and programming routines for internal/external
> >     MDIO are different. Must be included for internal MDIO.
> >
> > +For internal PHY device on internal mdio bus, a PHY node should be
> created.
> > +See the definition of the PHY node in booting-without-of.txt for an
> > +example of how to define a PHY (Internal PHY has no interrupt line).
> > +- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
> > +- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is
> > +PCS PHY,
> > +  PCS PHY addr must be '0'.
> 
> Will this replace the need for fixed PHYs ?
> 

Hi Jocke,

No, this is internal PCS configuration which required for both types of links.
The configuration for fixed links is different, but we use the same method.

Igal

>    Jocke
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev