linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
@ 2014-12-23  7:57 shh.xie
  2015-01-05 11:21 ` Shaohui Xie
  0 siblings, 1 reply; 9+ messages in thread
From: shh.xie @ 2014-12-23  7:57 UTC (permalink / raw)
  To: linuxppc-dev, devicetree, scottwood; +Cc: Shaohui Xie, Emilian.Medve

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>
---
changes in v3:
rephrase the 'Definition' of property 'bus-frequency', don't include the
property in example.

changes in v2:
addressed comments from Scott in V1.

 .../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 edeea16..737aa4c 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
 
 =============================================================================
@@ -357,6 +358,69 @@ 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: Specifies the external MDIO bus clock speed to
+		be used, if different from the standard 2.5 MHz.
+		This may be due to the standard speed being unsupported (e.g.
+		due to a hardware problem), or to advertise that all relevant
+		components in the system support a faster speed.
+
+- interrupts
+		Usage: optional
+		Value type: <prop-encoded-array>
+		Definition: Event interrupt of external MDIO controller.
+		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.
+
+- 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.
+
+EXAMPLE
+
+Example for FMan v2 external MDIO:
+
+mdio@f1000 {
+	compatible = "fsl,fman-xmdio";
+	reg = <0xf1000 0x1000>;
+};
+
+Example for FMan v3 internal MDIO:
+
+mdio@f1000 {
+	compatible = "fsl,fman-memac-mdio";
+	reg = <0xf1000 0x1000>;
+	fsl,fman-internal-mdio;
+};
+
+=============================================================================
 Example
 
 fman@400000 {
@@ -531,4 +595,9 @@ fman@400000 {
 		compatible = "fsl,fman-ptp-timer";
 		reg = <0xfe000 0x1000>;
 	};
+
+	mdio@f1000 {
+		compatible = "fsl,fman-xmdio";
+		reg = <0xf1000 0x1000>;
+	};
 };
-- 
1.8.4.1

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

* RE: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2014-12-23  7:57 [PATCH] [v3] power/fsl: add MDIO dt binding for FMan shh.xie
@ 2015-01-05 11:21 ` Shaohui Xie
  2015-01-07  0:28   ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Shaohui Xie @ 2015-01-05 11:21 UTC (permalink / raw)
  To: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org,
	Scott Wood
  Cc: Emilian Medve

Hello Scott,

Is this v3 OK?

Best Regards,=20
Shaohui Xie
> -----Original Message-----
> From: shh.xie@gmail.com [mailto:shh.xie@gmail.com]
> Sent: Tuesday, December 23, 2014 3:58 PM
> To: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; Wood Scott=
-B07421
> Cc: Medve Emilian-EMMEDVE1; Xie Shaohui-B21989
> Subject: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
>=20
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
>=20
> This binding is for FMan MDIO, it covers FMan v2 & FMan v3.
>=20
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
> changes in v3:
> rephrase the 'Definition' of property 'bus-frequency', don't include the
> property in example.
>=20
> changes in v2:
> addressed comments from Scott in V1.
>=20
>  .../devicetree/bindings/powerpc/fsl/fman.txt       | 69 ++++++++++++++++=
++++++
>  1 file changed, 69 insertions(+)
>=20
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index edeea16..737aa4c 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
>=20
>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> @@ -357,6 +358,69 @@ ptp-timer@fe000 {
>  };
>=20
>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> +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: Specifies the external MDIO bus clock speed to
> +		be used, if different from the standard 2.5 MHz.
> +		This may be due to the standard speed being unsupported (e.g.
> +		due to a hardware problem), or to advertise that all relevant
> +		components in the system support a faster speed.
> +
> +- interrupts
> +		Usage: optional
> +		Value type: <prop-encoded-array>
> +		Definition: Event interrupt of external MDIO controller.
> +		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.
> +
> +- 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.
> +
> +EXAMPLE
> +
> +Example for FMan v2 external MDIO:
> +
> +mdio@f1000 {
> +	compatible =3D "fsl,fman-xmdio";
> +	reg =3D <0xf1000 0x1000>;
> +};
> +
> +Example for FMan v3 internal MDIO:
> +
> +mdio@f1000 {
> +	compatible =3D "fsl,fman-memac-mdio";
> +	reg =3D <0xf1000 0x1000>;
> +	fsl,fman-internal-mdio;
> +};
> +
> +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> +=3D=3D=3D=3D=3D=3D
>  Example
>=20
>  fman@400000 {
> @@ -531,4 +595,9 @@ fman@400000 {
>  		compatible =3D "fsl,fman-ptp-timer";
>  		reg =3D <0xfe000 0x1000>;
>  	};
> +
> +	mdio@f1000 {
> +		compatible =3D "fsl,fman-xmdio";
> +		reg =3D <0xf1000 0x1000>;
> +	};
>  };
> --
> 1.8.4.1

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

* Re: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-05 11:21 ` Shaohui Xie
@ 2015-01-07  0:28   ` Scott Wood
  2015-01-07  5:29     ` Shaohui Xie
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2015-01-07  0:28 UTC (permalink / raw)
  To: Xie Shaohui-B21989
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Medve Emilian-EMMEDVE1

On Mon, 2015-01-05 at 05:21 -0600, Xie Shaohui-B21989 wrote:
> Hello Scott,
> 
> Is this v3 OK?
> 
> Best Regards, 
> Shaohui Xie
> > -----Original Message-----
> > From: shh.xie@gmail.com [mailto:shh.xie@gmail.com]
> > Sent: Tuesday, December 23, 2014 3:58 PM
> > To: linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org; Wood Scott-B07421
> > Cc: Medve Emilian-EMMEDVE1; Xie Shaohui-B21989
> > Subject: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
> > 
> > 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>
> > ---
> > changes in v3:
> > rephrase the 'Definition' of property 'bus-frequency', don't include the
> > property in example.
> > 
> > changes in v2:
> > addressed comments from Scott in V1.
> > 
> >  .../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 edeea16..737aa4c 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
> > 
> >  =============================================================================
> > @@ -357,6 +358,69 @@ 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: Specifies the external MDIO bus clock speed to
> > +		be used, if different from the standard 2.5 MHz.
> > +		This may be due to the standard speed being unsupported (e.g.
> > +		due to a hardware problem), or to advertise that all relevant
> > +		components in the system support a faster speed.
> > +
> > +- interrupts
> > +		Usage: optional
> > +		Value type: <prop-encoded-array>
> > +		Definition: Event interrupt of external MDIO controller.
> > +		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.

I'm confused by "respectively" here.  Does fsl,fman-memac-mdio have two
interrupts (one for 1 Gb/s and one for 10 Gb/s)?  If there's only (at
most) one interrupt per MDIO controller then just delete this line.

What interrupt is used for internal MDIO?  Does "optional" mean it's
used if and only if external MDIO is used, or is it optional even with
external MDIO?  I see it's not present in the example -- do we not have
a real example that has the interrupt?

-Scott

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

* RE: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-07  0:28   ` Scott Wood
@ 2015-01-07  5:29     ` Shaohui Xie
  2015-01-07 18:05       ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Shaohui Xie @ 2015-01-07  5:29 UTC (permalink / raw)
  To: Scott Wood
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Emilian Medve

PiA+ID4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gPiA+IEZyb206IHNoaC54aWVAZ21h
aWwuY29tIFttYWlsdG86c2hoLnhpZUBnbWFpbC5jb21dDQo+ID4gPiBTZW50OiBUdWVzZGF5LCBE
ZWNlbWJlciAyMywgMjAxNCAzOjU4IFBNDQo+ID4gPiBUbzogbGludXhwcGMtZGV2QGxpc3RzLm96
bGFicy5vcmc7IGRldmljZXRyZWVAdmdlci5rZXJuZWwub3JnOyBXb29kDQo+ID4gPiBTY290dC1C
MDc0MjENCj4gPiA+IENjOiBNZWR2ZSBFbWlsaWFuLUVNTUVEVkUxOyBYaWUgU2hhb2h1aS1CMjE5
ODkNCj4gPiA+IFN1YmplY3Q6IFtQQVRDSF0gW3YzXSBwb3dlci9mc2w6IGFkZCBNRElPIGR0IGJp
bmRpbmcgZm9yIEZNYW4NCj4gPiA+DQo+ID4gPiBGcm9tOiBTaGFvaHVpIFhpZSA8U2hhb2h1aS5Y
aWVA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Gl0J3Mgbm90IHByZXNlbnQgaW4gdGhlIGV4YW1wbGUg
LS0gZG8gd2Ugbm90IGhhdmUgYSByZWFsIGV4YW1wbGUgdGhhdCBoYXMgdGhlDQo+IGludGVycnVw
dD8NCltTLkhdICJvcHRpb25hbCIgbWVhbnMgaXQncyBhdmFpbGFibGUgb24gaGFyZHdhcmUsIGJ1
dCBNRElPIGRyaXZlciBkb2VzIG5vdCB1c2UgaW50ZXJydXB0LiANClNvIHdlIGRvbid0IGhhdmUg
YSByZWFsIGV4YW1wbGUuDQoNClRoYW5rcyENClNoYW9odWkNCg==

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

* Re: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-07  5:29     ` Shaohui Xie
@ 2015-01-07 18:05       ` Scott Wood
  2015-01-07 19:44         ` Emil Medve
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Wood @ 2015-01-07 18:05 UTC (permalink / raw)
  To: Xie Shaohui-B21989
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Medve Emilian-EMMEDVE1

On Tue, 2015-01-06 at 23:29 -0600, Xie Shaohui-B21989 wrote:
> > > > +- interrupts
> > > > +		Usage: optional
> > > > +		Value type: <prop-encoded-array>
> > > > +		Definition: Event interrupt of external MDIO controller.
> > > > +		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.
> > 
> > I'm confused by "respectively" here.  Does fsl,fman-memac-mdio have two
> > interrupts (one for 1 Gb/s and one for 10 Gb/s)?
> [S.H] We use two MDIO controllers for external PHY management. One for 1 Gb/s,
> One for 10 Gb/s, and two MDIO interrupts connected to MPIC.

If there can be two interrupts you need to make that clear and specify
the order.

Is it possible for one MDIO controller to have an interrupt connected
but not the other, on the same system?  How would you represent that in
the device tree?  If there are two MDIO controllers why are they in the
same node?

>   Does "optional" mean it's used if and
> > only if external MDIO is used, or is it optional even with external MDIO?  I see
> > it's not present in the example -- do we not have a real example that has the
> > interrupt?
> [S.H] "optional" means it's available on hardware, but MDIO driver does not use interrupt. 
> So we don't have a real example.

<record type="broken">The device tree describes the hardware, not the
driver</record>

-Scott

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

* Re: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-07 18:05       ` Scott Wood
@ 2015-01-07 19:44         ` Emil Medve
  2015-01-08  1:12           ` Scott Wood
  0 siblings, 1 reply; 9+ messages in thread
From: Emil Medve @ 2015-01-07 19:44 UTC (permalink / raw)
  To: Scott Wood, Xie Shaohui-B21989
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org

Hello Scott,


On 01/07/2015 12:05 PM, Scott Wood wrote:
> On Tue, 2015-01-06 at 23:29 -0600, Xie Shaohui-B21989 wrote:
>>>>> +- interrupts
>>>>> +		Usage: optional
>>>>> +		Value type: <prop-encoded-array>
>>>>> +		Definition: Event interrupt of external MDIO controller.
>>>>> +		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.
>>>
>>> I'm confused by "respectively" here.  Does fsl,fman-memac-mdio have two
>>> interrupts (one for 1 Gb/s and one for 10 Gb/s)?
>> [S.H] We use two MDIO controllers for external PHY management. One for 1 Gb/s,
>> One for 10 Gb/s, and two MDIO interrupts connected to MPIC.
> 
> If there can be two interrupts you need to make that clear and specify
> the order.
> 
> Is it possible for one MDIO controller to have an interrupt connected
> but not the other, on the same system?  How would you represent that in
> the device tree?  If there are two MDIO controllers why are they in the
> same node?

Historically (FMan v2 and even before/legacy) we've had each MAC include
an MDIO controller, but only one MDIO controller per MAC type/speed (1
Gb/s vs 10 Gb/s) is pinned out and all the same speed PHY(s) are
connected to the respective MDIO controllers. As such the first 1 Gb/s
MAC/MDIO controller is used to manage all the 1 Gb/s PHY(s) and the
first 10 Gb/s MAC/MDIO controller is used to manage all the 10 Gb/s
PHY(s). Each MDIO controller has the ability to generate interrupts but
only pinned out MDIO controllers are hooked up to the MPIC (as such the
talk about two interrupts)

(Each MAC has also integrated a SERDES/TBI/"internal" PHY that is
connected to the "local" MDIO controller)

As you can imagine this creates a number of problems in a partitioning
scenario (and not just, imagine RCWs where the first MAC is not
used/enabled). In order to help a bit (but not quite enough), in FMan
v3, two additional MDIO controllers (one for 1 the Gb/s PHY(s) and one
for 1 the 10 Gb/s PHY(s)) have been integrated that are not associated
with any MAC and these are the pinned out MDIO controllers on such
SoC(s) (chassis v2)

>>   Does "optional" mean it's used if and
>>> only if external MDIO is used, or is it optional even with external MDIO?  I see
>>> it's not present in the example -- do we not have a real example that has the
>>> interrupt?
>> [S.H] "optional" means it's available on hardware, but MDIO driver does not use interrupt. 
>> So we don't have a real example.
> 
> <record type="broken">The device tree describes the hardware, not the
> driver</record>

Anyway, only two MDIO nodes (out of 4 to 14) would have an interrupt
property describing exactly one interrupt. What language should we use
to convey this situation


Cheers,

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

* Re: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-07 19:44         ` Emil Medve
@ 2015-01-08  1:12           ` Scott Wood
  2015-01-08  3:58             ` Shaohui Xie
  2015-01-08  9:31             ` Emil Medve
  0 siblings, 2 replies; 9+ messages in thread
From: Scott Wood @ 2015-01-08  1:12 UTC (permalink / raw)
  To: Emil Medve
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Xie Shaohui-B21989

On Wed, 2015-01-07 at 13:44 -0600, Emil Medve wrote:
> Hello Scott,
> 
> 
> On 01/07/2015 12:05 PM, Scott Wood wrote:
> > On Tue, 2015-01-06 at 23:29 -0600, Xie Shaohui-B21989 wrote:
> >>>>> +- interrupts
> >>>>> +		Usage: optional
> >>>>> +		Value type: <prop-encoded-array>
> >>>>> +		Definition: Event interrupt of external MDIO controller.
> >>>>> +		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.
> >>>
> >>> I'm confused by "respectively" here.  Does fsl,fman-memac-mdio have two
> >>> interrupts (one for 1 Gb/s and one for 10 Gb/s)?
> >> [S.H] We use two MDIO controllers for external PHY management. One for 1 Gb/s,
> >> One for 10 Gb/s, and two MDIO interrupts connected to MPIC.
> > 
> > If there can be two interrupts you need to make that clear and specify
> > the order.
> > 
> > Is it possible for one MDIO controller to have an interrupt connected
> > but not the other, on the same system?  How would you represent that in
> > the device tree?  If there are two MDIO controllers why are they in the
> > same node?
> 
> Historically (FMan v2 and even before/legacy) we've had each MAC include
> an MDIO controller, but only one MDIO controller per MAC type/speed (1
> Gb/s vs 10 Gb/s) is pinned out and all the same speed PHY(s) are
> connected to the respective MDIO controllers. As such the first 1 Gb/s
> MAC/MDIO controller is used to manage all the 1 Gb/s PHY(s) and the
> first 10 Gb/s MAC/MDIO controller is used to manage all the 10 Gb/s
> PHY(s). Each MDIO controller has the ability to generate interrupts but
> only pinned out MDIO controllers are hooked up to the MPIC (as such the
> talk about two interrupts)
> 
> (Each MAC has also integrated a SERDES/TBI/"internal" PHY that is
> connected to the "local" MDIO controller)
> 
> As you can imagine this creates a number of problems in a partitioning
> scenario (and not just, imagine RCWs where the first MAC is not
> used/enabled). In order to help a bit (but not quite enough), in FMan
> v3, two additional MDIO controllers (one for 1 the Gb/s PHY(s) and one
> for 1 the 10 Gb/s PHY(s)) have been integrated that are not associated
> with any MAC and these are the pinned out MDIO controllers on such
> SoC(s) (chassis v2)

I'm happy to hear that.  Is that what is meant by "external" here?  I
thought it meant external to the SoC.  Is this the term used by hardware
documentation?  I'd have called it "independent" or similar.

> >>   Does "optional" mean it's used if and
> >>> only if external MDIO is used, or is it optional even with external MDIO?  I see
> >>> it's not present in the example -- do we not have a real example that has the
> >>> interrupt?
> >> [S.H] "optional" means it's available on hardware, but MDIO driver does not use interrupt. 
> >> So we don't have a real example.
> > 
> > <record type="broken">The device tree describes the hardware, not the
> > driver</record>
> 
> Anyway, only two MDIO nodes (out of 4 to 14) would have an interrupt
> property describing exactly one interrupt. What language should we use
> to convey this situation

So the answer is that there will not be more than one MDIO controller
per MDIO node, or more than one interrupt per MDIO node?  In that case
just get rid of the confusing "respectively" sentence -- and always
describe the interrupt if it exists in hardware.

-Scott

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

* RE: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-08  1:12           ` Scott Wood
@ 2015-01-08  3:58             ` Shaohui Xie
  2015-01-08  9:31             ` Emil Medve
  1 sibling, 0 replies; 9+ messages in thread
From: Shaohui Xie @ 2015-01-08  3:58 UTC (permalink / raw)
  To: Scott Wood, Emilian Medve
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBXb29kIFNjb3R0LUIwNzQyMQ0K
PiBTZW50OiBUaHVyc2RheSwgSmFudWFyeSAwOCwgMjAxNSA5OjEzIEFNDQo+IFRvOiBNZWR2ZSBF
bWlsaWFuLUVNTUVEVkUxDQo+IENjOiBYaWUgU2hhb2h1aS1CMjE5ODk7IGxpbnV4cHBjLWRldkBs
aXN0cy5vemxhYnMub3JnOw0KPiBkZXZpY2V0cmVlQHZnZXIua2VybmVsLm9yZw0KPiBTdWJqZWN0
OiBSZTogW1BBVENIXSBbdjNdIHBvd2VyL2ZzbDogYWRkIE1ESU8gZHQgYmluZGluZyBmb3IgRk1h
bg0KPiANCj4gT24gV2VkLCAyMDE1LTAxLTA3IGF0IDEzOjQ0IC0wNjAwLCBFbWlsIE1lZHZlIHdy
b3RlOg0KPiA+IEhlbGxvIFNjb3R0LA0KPiA+DQo+ID4NCj4gPiBPbiAwMS8wNy8yMDE1IDEyOjA1
IFBNLCBTY290dCBXb29kIHdyb3RlOg0KPiA+ID4gT24gVHVlLCAyMDE1LTAxLTA2IGF0IDIzOjI5
IC0wNjAwLCBYaWUgU2hhb2h1aS1CMjE5ODkgd3JvdGU6DQo+ID4gPj4+Pj4gKy0gaW50ZXJydXB0
cw0KPiA+ID4+Pj4+ICsJCVVzYWdlOiBvcHRpb25hbA0KPiA+ID4+Pj4+ICsJC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RoYW4gb25lIE1ESU8gY29udHJvbGxlciBwZXIgTURJTw0KPiBub2Rl
LCBvciBtb3JlIHRoYW4gb25lIGludGVycnVwdCBwZXIgTURJTyBub2RlPyANCltTLkhdIFllcywg
b25lIE1ESU8gY29udHJvbGxlciBwZXIgTURJTyBub2RlLCBhbmQgb25lIGludGVycnVwdCBwZXIg
ImV4dGVybmFsIg0KTURJTyBub2RlLg0KDQogSW4gdGhhdCBjYXNlIGp1c3QgZ2V0IHJpZCBvZg0K
PiB0aGUgY29uZnVzaW5nICJyZXNwZWN0aXZlbHkiIHNlbnRlbmNlIC0tIGFuZCBhbHdheXMgZGVz
Y3JpYmUgdGhlIGludGVycnVwdCBpZiBpdA0KPiBleGlzdHMgaW4gaGFyZHdhcmUuDQpbUy5IXSBP
Sy4NCg0KVGhhbmtzIQ0KU2hhb2h1aQ0K

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

* Re: [PATCH] [v3] power/fsl: add MDIO dt binding for FMan
  2015-01-08  1:12           ` Scott Wood
  2015-01-08  3:58             ` Shaohui Xie
@ 2015-01-08  9:31             ` Emil Medve
  1 sibling, 0 replies; 9+ messages in thread
From: Emil Medve @ 2015-01-08  9:31 UTC (permalink / raw)
  To: Scott Wood
  Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Xie Shaohui-B21989

Hello Scott,


On 01/07/2015 07:12 PM, Scott Wood wrote:
> On Wed, 2015-01-07 at 13:44 -0600, Emil Medve wrote:
>> Hello Scott,
>>
>>
>> On 01/07/2015 12:05 PM, Scott Wood wrote:
>>> On Tue, 2015-01-06 at 23:29 -0600, Xie Shaohui-B21989 wrote:
>>>>>>> +- interrupts
>>>>>>> +		Usage: optional
>>>>>>> +		Value type: <prop-encoded-array>
>>>>>>> +		Definition: Event interrupt of external MDIO controller.
>>>>>>> +		1 Gb/s MDIO and 10 Gb/s MDIO has one interrupt respectively.
>>>>>
>>>>> I'm confused by "respectively" here.  Does fsl,fman-memac-mdio have two
>>>>> interrupts (one for 1 Gb/s and one for 10 Gb/s)?
>>>> [S.H] We use two MDIO controllers for external PHY management. One for 1 Gb/s,
>>>> One for 10 Gb/s, and two MDIO interrupts connected to MPIC.
>>>
>>> If there can be two interrupts you need to make that clear and specify
>>> the order.
>>>
>>> Is it possible for one MDIO controller to have an interrupt connected
>>> but not the other, on the same system?  How would you represent that in
>>> the device tree?  If there are two MDIO controllers why are they in the
>>> same node?
>>
>> Historically (FMan v2 and even before/legacy) we've had each MAC include
>> an MDIO controller, but only one MDIO controller per MAC type/speed (1
>> Gb/s vs 10 Gb/s) is pinned out and all the same speed PHY(s) are
>> connected to the respective MDIO controllers. As such the first 1 Gb/s
>> MAC/MDIO controller is used to manage all the 1 Gb/s PHY(s) and the
>> first 10 Gb/s MAC/MDIO controller is used to manage all the 10 Gb/s
>> PHY(s). Each MDIO controller has the ability to generate interrupts but
>> only pinned out MDIO controllers are hooked up to the MPIC (as such the
>> talk about two interrupts)
>>
>> (Each MAC has also integrated a SERDES/TBI/"internal" PHY that is
>> connected to the "local" MDIO controller)
>>
>> As you can imagine this creates a number of problems in a partitioning
>> scenario (and not just, imagine RCWs where the first MAC is not
>> used/enabled). In order to help a bit (but not quite enough), in FMan
>> v3, two additional MDIO controllers (one for 1 the Gb/s PHY(s) and one
>> for 1 the 10 Gb/s PHY(s)) have been integrated that are not associated
>> with any MAC and these are the pinned out MDIO controllers on such
>> SoC(s) (chassis v2)
> 
> I'm happy to hear that.  Is that what is meant by "external" here?

"External" doesn't mean external to the MAC nodes. "External" doesn't
even properly apply to the MDIO controller(s) at all but to the PHY(s).

> I thought it meant external to the SoC.  Is this the term used by
> hardware documentation?

The documentation (mostly chip errata documents) refers to
external/internal MDIO accesses and as on FMan v3 external PHY accesses
are always made via these extra MDIO controllers (pinned oud) and the
internal SERDES PHY accesses are always made via the in-MAC MDIO
controllers some level of confusion is easy to be achieved. All the MDIO
controllers are identical whether they are in-MAC or standalone

> I'd have called it "independent" or similar.

To make things even more confusing, some documents call these extra MDIO
controllers "dedicated"


Cheers,


>>>>   Does "optional" mean it's used if and
>>>>> only if external MDIO is used, or is it optional even with external MDIO?  I see
>>>>> it's not present in the example -- do we not have a real example that has the
>>>>> interrupt?
>>>> [S.H] "optional" means it's available on hardware, but MDIO driver does not use interrupt. 
>>>> So we don't have a real example.
>>>
>>> <record type="broken">The device tree describes the hardware, not the
>>> driver</record>
>>
>> Anyway, only two MDIO nodes (out of 4 to 14) would have an interrupt
>> property describing exactly one interrupt. What language should we use
>> to convey this situation
> 
> So the answer is that there will not be more than one MDIO controller
> per MDIO node, or more than one interrupt per MDIO node?  In that case
> just get rid of the confusing "respectively" sentence -- and always
> describe the interrupt if it exists in hardware.
> 
> -Scott
> 
> 
> .
> 

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

end of thread, other threads:[~2015-01-08  9:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23  7:57 [PATCH] [v3] power/fsl: add MDIO dt binding for FMan shh.xie
2015-01-05 11:21 ` Shaohui Xie
2015-01-07  0:28   ` Scott Wood
2015-01-07  5:29     ` Shaohui Xie
2015-01-07 18:05       ` Scott Wood
2015-01-07 19:44         ` Emil Medve
2015-01-08  1:12           ` Scott Wood
2015-01-08  3:58             ` Shaohui Xie
2015-01-08  9:31             ` Emil Medve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).