All of lore.kernel.org
 help / color / mirror / Atom feed
* [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy
@ 2015-12-24  1:42 ` igal.liberman
  0 siblings, 0 replies; 6+ messages in thread
From: igal.liberman-KZfg59tc24xl57MIdRCFDg @ 2015-12-24  1:42 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: scottwood-KZfg59tc24xl57MIdRCFDg,
	madalin.bucur-KZfg59tc24xl57MIdRCFDg,
	shaohui.xie-KZfg59tc24xl57MIdRCFDg, Igal Liberman

From: Igal Liberman <igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

The FMan contains internal PHY devices used for SGMII connections
to external PHYs. When these PHYs are in use a reference is needed
for both the external PHY and the internal one. For the external
PHY phy-handle provides the reference. For the internal PHY a new
handle is required.
In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY,
the handle used will be tbi-handle.
In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY,
the handle used will be pcsphy-handle.

Signed-off-by: Igal Liberman <igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---

v1 --> v2
	Addressed feedback from Scott Wood:
	- Improved commit description
	- Added missing parentheses

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

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index 1fc5328..55c2c03 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -315,6 +315,16 @@ PROPERTIES
 		Value type: <phandle>
 		Definition: A phandle for 1EEE1588 timer.
 
+- pcsphy-handle
+		Usage required for "fsl,fman-memac" MACs
+		Value type: <phandle>
+		Definition: A phandle for pcsphy.
+
+- tbi-handle
+		Usage required for "fsl,fman-dtsec" MACs
+		Value type: <phandle>
+		Definition: A phandle for tbiphy.
+
 EXAMPLE
 
 fman1_tx28: port@a8000 {
@@ -340,6 +350,7 @@ ethernet@e0000 {
 	reg = <0xe0000 0x1000>;
 	fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
 	ptp-timer = <&ptp-timer>;
+	tbi-handle = <&tbi0>;
 };
 
 ============================================================================
@@ -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,29 @@ 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 +603,7 @@ fman@400000 {
 		cell-index = <0>;
 		reg = <0xe0000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0x8 &fman1_tx_0x28>;
+		tbi-handle = <&tbi5>;
 	};
 
 	ethernet@e2000 {
@@ -575,6 +611,7 @@ fman@400000 {
 		cell-index = <1>;
 		reg = <0xe2000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0x9 &fman1_tx_0x29>;
+		tbi-handle = <&tbi6>;
 	};
 
 	ethernet@e4000 {
@@ -582,6 +619,7 @@ fman@400000 {
 		cell-index = <2>;
 		reg = <0xe4000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0xa &fman1_tx_0x2a>;
+		tbi-handle = <&tbi7>;
 	};
 
 	ethernet@e6000 {
@@ -589,6 +627,7 @@ fman@400000 {
 		cell-index = <3>;
 		reg = <0xe6000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0xb &fman1_tx_0x2b>;
+		tbi-handle = <&tbi8>;
 	};
 
 	ethernet@e8000 {
@@ -596,6 +635,7 @@ fman@400000 {
 		cell-index = <4>;
 		reg = <0xf0000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0xc &fman1_tx_0x2c>;
+		tbi-handle = <&tbi9>;
 
 	ethernet@f0000 {
 		cell-index = <8>;
-- 
1.7.9.5

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy
@ 2015-12-24  1:42 ` igal.liberman
  0 siblings, 0 replies; 6+ messages in thread
From: igal.liberman @ 2015-12-24  1:42 UTC (permalink / raw)
  To: devicetree, linuxppc-dev
  Cc: scottwood, madalin.bucur, shaohui.xie, Igal Liberman

From: Igal Liberman <igal.liberman@freescale.com>

The FMan contains internal PHY devices used for SGMII connections
to external PHYs. When these PHYs are in use a reference is needed
for both the external PHY and the internal one. For the external
PHY phy-handle provides the reference. For the internal PHY a new
handle is required.
In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY,
the handle used will be tbi-handle.
In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY,
the handle used will be pcsphy-handle.

Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
---

v1 --> v2
	Addressed feedback from Scott Wood:
	- Improved commit description
	- Added missing parentheses

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

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index 1fc5328..55c2c03 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -315,6 +315,16 @@ PROPERTIES
 		Value type: <phandle>
 		Definition: A phandle for 1EEE1588 timer.
 
+- pcsphy-handle
+		Usage required for "fsl,fman-memac" MACs
+		Value type: <phandle>
+		Definition: A phandle for pcsphy.
+
+- tbi-handle
+		Usage required for "fsl,fman-dtsec" MACs
+		Value type: <phandle>
+		Definition: A phandle for tbiphy.
+
 EXAMPLE
 
 fman1_tx28: port@a8000 {
@@ -340,6 +350,7 @@ ethernet@e0000 {
 	reg = <0xe0000 0x1000>;
 	fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
 	ptp-timer = <&ptp-timer>;
+	tbi-handle = <&tbi0>;
 };
 
 ============================================================================
@@ -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,29 @@ 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 +603,7 @@ fman@400000 {
 		cell-index = <0>;
 		reg = <0xe0000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0x8 &fman1_tx_0x28>;
+		tbi-handle = <&tbi5>;
 	};
 
 	ethernet@e2000 {
@@ -575,6 +611,7 @@ fman@400000 {
 		cell-index = <1>;
 		reg = <0xe2000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0x9 &fman1_tx_0x29>;
+		tbi-handle = <&tbi6>;
 	};
 
 	ethernet@e4000 {
@@ -582,6 +619,7 @@ fman@400000 {
 		cell-index = <2>;
 		reg = <0xe4000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0xa &fman1_tx_0x2a>;
+		tbi-handle = <&tbi7>;
 	};
 
 	ethernet@e6000 {
@@ -589,6 +627,7 @@ fman@400000 {
 		cell-index = <3>;
 		reg = <0xe6000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0xb &fman1_tx_0x2b>;
+		tbi-handle = <&tbi8>;
 	};
 
 	ethernet@e8000 {
@@ -596,6 +635,7 @@ fman@400000 {
 		cell-index = <4>;
 		reg = <0xf0000 0x1000>;
 		fsl,fman-ports = <&fman1_rx_0xc &fman1_tx_0x2c>;
+		tbi-handle = <&tbi9>;
 
 	ethernet@f0000 {
 		cell-index = <8>;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy
  2015-12-24  1:42 ` igal.liberman
@ 2015-12-30 16:27     ` Rob Herring
  -1 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2015-12-30 16:27 UTC (permalink / raw)
  To: igal.liberman-KZfg59tc24xl57MIdRCFDg
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
	scottwood-KZfg59tc24xl57MIdRCFDg,
	madalin.bucur-KZfg59tc24xl57MIdRCFDg,
	shaohui.xie-KZfg59tc24xl57MIdRCFDg

On Thu, Dec 24, 2015 at 03:42:11AM +0200, igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> From: Igal Liberman <igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> 
> The FMan contains internal PHY devices used for SGMII connections
> to external PHYs. When these PHYs are in use a reference is needed
> for both the external PHY and the internal one. For the external
> PHY phy-handle provides the reference. For the internal PHY a new
> handle is required.
> In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY,
> the handle used will be tbi-handle.
> In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY,
> the handle used will be pcsphy-handle.

This is fairly commom for 10G eth I think. Can't you use the common PHY 
binding here in the case without internal MDIO bus? Just because you use 
it that doesn't mean you have to use the generic phy subsystem in the 
kernel. 

Perhaps phy-handle should be deprecated in favor of doing something like 
this if you need a phandle to both:

phys = <&internal-phy>, <&external-phy>;

> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index 1fc5328..55c2c03 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -315,6 +315,16 @@ PROPERTIES
>  		Value type: <phandle>
>  		Definition: A phandle for 1EEE1588 timer.
>  
> +- pcsphy-handle
> +		Usage required for "fsl,fman-memac" MACs
> +		Value type: <phandle>
> +		Definition: A phandle for pcsphy.
> +
> +- tbi-handle
> +		Usage required for "fsl,fman-dtsec" MACs
> +		Value type: <phandle>
> +		Definition: A phandle for tbiphy.
> +
>  EXAMPLE
>  
>  fman1_tx28: port@a8000 {
> @@ -340,6 +350,7 @@ ethernet@e0000 {
>  	reg = <0xe0000 0x1000>;
>  	fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
>  	ptp-timer = <&ptp-timer>;
> +	tbi-handle = <&tbi0>;

What does the tbi0 node contain? It should be present in the example.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy
@ 2015-12-30 16:27     ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2015-12-30 16:27 UTC (permalink / raw)
  To: igal.liberman
  Cc: devicetree, linuxppc-dev, scottwood, madalin.bucur, shaohui.xie

On Thu, Dec 24, 2015 at 03:42:11AM +0200, igal.liberman@freescale.com wrote:
> From: Igal Liberman <igal.liberman@freescale.com>
> 
> The FMan contains internal PHY devices used for SGMII connections
> to external PHYs. When these PHYs are in use a reference is needed
> for both the external PHY and the internal one. For the external
> PHY phy-handle provides the reference. For the internal PHY a new
> handle is required.
> In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY,
> the handle used will be tbi-handle.
> In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY,
> the handle used will be pcsphy-handle.

This is fairly commom for 10G eth I think. Can't you use the common PHY 
binding here in the case without internal MDIO bus? Just because you use 
it that doesn't mean you have to use the generic phy subsystem in the 
kernel. 

Perhaps phy-handle should be deprecated in favor of doing something like 
this if you need a phandle to both:

phys = <&internal-phy>, <&external-phy>;

> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index 1fc5328..55c2c03 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -315,6 +315,16 @@ PROPERTIES
>  		Value type: <phandle>
>  		Definition: A phandle for 1EEE1588 timer.
>  
> +- pcsphy-handle
> +		Usage required for "fsl,fman-memac" MACs
> +		Value type: <phandle>
> +		Definition: A phandle for pcsphy.
> +
> +- tbi-handle
> +		Usage required for "fsl,fman-dtsec" MACs
> +		Value type: <phandle>
> +		Definition: A phandle for tbiphy.
> +
>  EXAMPLE
>  
>  fman1_tx28: port@a8000 {
> @@ -340,6 +350,7 @@ ethernet@e0000 {
>  	reg = <0xe0000 0x1000>;
>  	fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
>  	ptp-timer = <&ptp-timer>;
> +	tbi-handle = <&tbi0>;

What does the tbi0 node contain? It should be present in the example.

Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy
  2015-12-30 16:27     ` Rob Herring
@ 2016-01-11  9:23       ` Igal Liberman
  -1 siblings, 0 replies; 6+ messages in thread
From: Igal Liberman @ 2016-01-11  9:23 UTC (permalink / raw)
  To: Rob Herring, Igal Liberman
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, Scott Wood,
	Madalin-Cristian Bucur, shaohui.xie-KZfg59tc24xl57MIdRCFDg

Hi Rob,

> -----Original Message-----
> From: Rob Herring [mailto:robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org]
> Sent: Wednesday, December 30, 2015 6:28 PM
> To: Igal Liberman <Igal.Liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; Scott Wood
> <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>; Madalin-Cristian Bucur
> <madalin.bucur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>; shaohui.xie-KZfg59tc24xl57MIdRCFDg@public.gmane.org
> Subject: Re: [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-
> phy
> 
> On Thu, Dec 24, 2015 at 03:42:11AM +0200, igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org
> wrote:
> > From: Igal Liberman <igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> >
> > The FMan contains internal PHY devices used for SGMII connections to
> > external PHYs. When these PHYs are in use a reference is needed for
> > both the external PHY and the internal one. For the external PHY
> > phy-handle provides the reference. For the internal PHY a new handle
> > is required.
> > In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY, the
> > handle used will be tbi-handle.
> > In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY,
> > the handle used will be pcsphy-handle.
> 
> This is fairly commom for 10G eth I think. Can't you use the common PHY
> binding here in the case without internal MDIO bus? Just because you use it
> that doesn't mean you have to use the generic phy subsystem in the kernel.
> 

mEMAC and dTSEC always have internal MDIO bus.
I was requested to use generic PHY API for internal PHY configuration by netdev, this part was accepted. 

> Perhaps phy-handle should be deprecated in favor of doing something like
> this if you need a phandle to both:
> 
> phys = <&internal-phy>, <&external-phy>;
> 

I think that pcsphy-handle and tbi-handle represent the hardware in a good way.
This is the actual name of the hardware.

> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > index 1fc5328..55c2c03 100644
> > --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > @@ -315,6 +315,16 @@ PROPERTIES
> >  		Value type: <phandle>
> >  		Definition: A phandle for 1EEE1588 timer.
> >
> > +- pcsphy-handle
> > +		Usage required for "fsl,fman-memac" MACs
> > +		Value type: <phandle>
> > +		Definition: A phandle for pcsphy.
> > +
> > +- tbi-handle
> > +		Usage required for "fsl,fman-dtsec" MACs
> > +		Value type: <phandle>
> > +		Definition: A phandle for tbiphy.
> > +
> >  EXAMPLE
> >
> >  fman1_tx28: port@a8000 {
> > @@ -340,6 +350,7 @@ ethernet@e0000 {
> >  	reg = <0xe0000 0x1000>;
> >  	fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
> >  	ptp-timer = <&ptp-timer>;
> > +	tbi-handle = <&tbi0>;
> 
> What does the tbi0 node contain? It should be present in the example.
> 

There is an example in under MDIO section:

mdio@e3120 {
	compatible = "fsl,fman-mdio";
	reg = <0xe3120 0xee0>;
	fsl,fman-internal-mdio;

	tbi1: tbi-phy@8 {
		reg = <0x8>;
		device_type = "tbi-phy";
	};
};

I used different indexes to make sure that it's aligned to the other examples in the binding document.

> Rob

Thank you for your feedback, 
Igal
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy
@ 2016-01-11  9:23       ` Igal Liberman
  0 siblings, 0 replies; 6+ messages in thread
From: Igal Liberman @ 2016-01-11  9:23 UTC (permalink / raw)
  To: Rob Herring, Igal Liberman
  Cc: devicetree, linuxppc-dev, Scott Wood, Madalin-Cristian Bucur,
	shaohui.xie

Hi Rob,

> -----Original Message-----
> From: Rob Herring [mailto:robh@kernel.org]
> Sent: Wednesday, December 30, 2015 6:28 PM
> To: Igal Liberman <Igal.Liberman@freescale.com>
> Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Scott Wood
> <scottwood@freescale.com>; Madalin-Cristian Bucur
> <madalin.bucur@freescale.com>; shaohui.xie@freescale.com
> Subject: Re: [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tb=
i-
> phy
>=20
> On Thu, Dec 24, 2015 at 03:42:11AM +0200, igal.liberman@freescale.com
> wrote:
> > From: Igal Liberman <igal.liberman@freescale.com>
> >
> > The FMan contains internal PHY devices used for SGMII connections to
> > external PHYs. When these PHYs are in use a reference is needed for
> > both the external PHY and the internal one. For the external PHY
> > phy-handle provides the reference. For the internal PHY a new handle
> > is required.
> > In dTSEC, the internal PHY is a TBI (Ten Bit Interface) PHY, the
> > handle used will be tbi-handle.
> > In mEMAC, the internal PHY is a PCS (Physical Coding Sublayer) PHY,
> > the handle used will be pcsphy-handle.
>=20
> This is fairly commom for 10G eth I think. Can't you use the common PHY
> binding here in the case without internal MDIO bus? Just because you use =
it
> that doesn't mean you have to use the generic phy subsystem in the kernel=
.
>=20

mEMAC and dTSEC always have internal MDIO bus.
I was requested to use generic PHY API for internal PHY configuration by ne=
tdev, this part was accepted.=20

> Perhaps phy-handle should be deprecated in favor of doing something like
> this if you need a phandle to both:
>=20
> phys =3D <&internal-phy>, <&external-phy>;
>=20

I think that pcsphy-handle and tbi-handle represent the hardware in a good =
way.
This is the actual name of the hardware.

> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > index 1fc5328..55c2c03 100644
> > --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> > @@ -315,6 +315,16 @@ PROPERTIES
> >  		Value type: <phandle>
> >  		Definition: A phandle for 1EEE1588 timer.
> >
> > +- pcsphy-handle
> > +		Usage required for "fsl,fman-memac" MACs
> > +		Value type: <phandle>
> > +		Definition: A phandle for pcsphy.
> > +
> > +- tbi-handle
> > +		Usage required for "fsl,fman-dtsec" MACs
> > +		Value type: <phandle>
> > +		Definition: A phandle for tbiphy.
> > +
> >  EXAMPLE
> >
> >  fman1_tx28: port@a8000 {
> > @@ -340,6 +350,7 @@ ethernet@e0000 {
> >  	reg =3D <0xe0000 0x1000>;
> >  	fsl,fman-ports =3D <&fman1_rx8 &fman1_tx28>;
> >  	ptp-timer =3D <&ptp-timer>;
> > +	tbi-handle =3D <&tbi0>;
>=20
> What does the tbi0 node contain? It should be present in the example.
>=20

There is an example in under MDIO section:

mdio@e3120 {
	compatible =3D "fsl,fman-mdio";
	reg =3D <0xe3120 0xee0>;
	fsl,fman-internal-mdio;

	tbi1: tbi-phy@8 {
		reg =3D <0x8>;
		device_type =3D "tbi-phy";
	};
};

I used different indexes to make sure that it's aligned to the other exampl=
es in the binding document.

> Rob

Thank you for your feedback,=20
Igal

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-11  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-24  1:42 [v2] powerpc/fsl: Update fman dt binding with pcs-phy and tbi-phy igal.liberman-KZfg59tc24xl57MIdRCFDg
2015-12-24  1:42 ` igal.liberman
     [not found] ` <1450921331-25309-1-git-send-email-igal.liberman-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-12-30 16:27   ` Rob Herring
2015-12-30 16:27     ` Rob Herring
2016-01-11  9:23     ` Igal Liberman
2016-01-11  9:23       ` Igal Liberman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.