diff mbox

powerpc/fsl: Add FMan best effort port compatible

Message ID 1431938519-11343-1-git-send-email-igal.liberman@freescale.com (mailing list archive)
State Superseded
Delegated to: Scott Wood
Headers show

Commit Message

Igal.Liberman May 18, 2015, 8:41 a.m. UTC
From: Igal Liberman <igal.liberman@freescale.com>

This patch adds a compatible which represents FMan V3 best effort ports.
FMan best effort port is configured as 10G ports, however, it uses 1G
hardware.

Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
---
 .../devicetree/bindings/powerpc/fsl/fman.txt       |    5 +++++
 1 file changed, 5 insertions(+)

Comments

Scott Wood May 18, 2015, 9:09 p.m. UTC | #1
On Mon, 2015-05-18 at 11:41 +0300, Igal.Liberman wrote:
> From: Igal Liberman <igal.liberman@freescale.com>
> 
> This patch adds a compatible which represents FMan V3 best effort ports.
> FMan best effort port is configured as 10G ports, however, it uses 1G
> hardware.
> 
> Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
> ---
>  .../devicetree/bindings/powerpc/fsl/fman.txt       |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> index edda55f..c2e3ec3 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> @@ -166,6 +166,11 @@ PROPERTIES
>  			- "fsl,fman-v3-port-oh" for FManV3 OH ports
>  			- "fsl,fman-v3-port-rx" for FManV3 RX ports
>  			- "fsl,fman-v3-port-tx" for FManV3 TX ports
> +		Optional compatible which can be used in addition to the
> +		compatibles above is:
> +			- "fsl,fman-v3-best-effort-port"
> +		This compatible represents 10G best effort ports:
> +			Port configured as 10G, using 1G hardware.

What does this mean?  If it's using 1G hardware then it's a 1G port,
right?  How can you configure a 1G port to be 10G?

Why is this compatible in addition to others (note that this implies
such ports are 100% backwards compatible with hardware that lacks the
new compatible)?  You'd have the same compatible on rx and tx nodes (I'm
assuming this isn't applicable to oh)?

What are the implications of this that warrant adding a compatible?

-Scott
Igal.Liberman May 19, 2015, 9:27 a.m. UTC | #2
Hi Scott,
I understand your point, let me please explain more about the hardware configuration and suggest another solution.
I'm referring only to external ports (TX/RX), not OP.
In FMan V3 we have maximum of 8 Port, it depends on the FMan revision (in B4, T2, T4 we have 8 ports, in T1024 and T1040 we have 4).
The following configuration are valid:
	- All 8 ports can work as 1G ports. 
	- Ports 7, 8 (if available) can work as 10G (with full hardware resources).
	- Port 1, 2 (1 in T1024; 1, 2 in T2080) can be configured as 10G (with limited hardware resources).

Currently we use only "fsl,fm-v3-port-rx/tx".

We can go 2 ways:
1. Having 2 compatibles:
	"fsl,fman-v3-port-rx/tx"
	"fsl,fman-v3-best-effort-port-rx/tx"

	The driver can determine the port type of "fsl,fman-v3-port-rx/tx" by reading the HW port id.
	"fsl,fman-v3-best-effort-port-rx/tx" will let the driver know about the best effort port and it will be used instead of "fsl,fman-v3-port-rx/tx".

In your opinion, should we add "fsl,fman-v3-10g-port-rx/tx" for 10G (with full hardware resources)?
In such chase, "fsl,fman-v3-port-rx/tx" will denote 1G explicitly.

In FMan V2, dual ports/MACs are not available, so no need change the compatibles.

Igal

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

> From: Wood Scott-B07421

> Sent: Tuesday, May 19, 2015 12:09 AM

> To: Liberman Igal-B31950

> Cc: devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Bucur

> Madalin-Cristian-B32716

> Subject: Re: [PATCH] powerpc/fsl: Add FMan best effort port compatible

> 

> On Mon, 2015-05-18 at 11:41 +0300, Igal.Liberman wrote:

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

> >

> > This patch adds a compatible which represents FMan V3 best effort ports.

> > FMan best effort port is configured as 10G ports, however, it uses 1G

> > hardware.

> >

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

> > ---

> >  .../devicetree/bindings/powerpc/fsl/fman.txt       |    5 +++++

> >  1 file changed, 5 insertions(+)

> >

> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt

> > b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt

> > index edda55f..c2e3ec3 100644

> > --- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt

> > +++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt

> > @@ -166,6 +166,11 @@ PROPERTIES

> >  			- "fsl,fman-v3-port-oh" for FManV3 OH ports

> >  			- "fsl,fman-v3-port-rx" for FManV3 RX ports

> >  			- "fsl,fman-v3-port-tx" for FManV3 TX ports

> > +		Optional compatible which can be used in addition to the

> > +		compatibles above is:

> > +			- "fsl,fman-v3-best-effort-port"

> > +		This compatible represents 10G best effort ports:

> > +			Port configured as 10G, using 1G hardware.

> 

> What does this mean?  If it's using 1G hardware then it's a 1G port, right?

> How can you configure a 1G port to be 10G?

> 

> Why is this compatible in addition to others (note that this implies such ports

> are 100% backwards compatible with hardware that lacks the new

> compatible)?  You'd have the same compatible on rx and tx nodes (I'm

> assuming this isn't applicable to oh)?

> 

> What are the implications of this that warrant adding a compatible?

> 

> -Scott

>
Scott Wood May 21, 2015, 3:04 a.m. UTC | #3
On Tue, 2015-05-19 at 04:27 -0500, Liberman Igal-B31950 wrote:
> Hi Scott,
> I understand your point, let me please explain more about the hardware configuration and suggest another solution.
> I'm referring only to external ports (TX/RX), not OP.
> In FMan V3 we have maximum of 8 Port, it depends on the FMan revision (in B4, T2, T4 we have 8 ports, in T1024 and T1040 we have 4).
> The following configuration are valid:
> 	- All 8 ports can work as 1G ports. 
> 	- Ports 7, 8 (if available) can work as 10G (with full hardware resources).
> 	- Port 1, 2 (1 in T1024; 1, 2 in T2080) can be configured as 10G (with limited hardware resources).
> Currently we use only "fsl,fm-v3-port-rx/tx".
> 
> We can go 2 ways:
> 1. Having 2 compatibles:
> 	"fsl,fman-v3-port-rx/tx"
> 	"fsl,fman-v3-best-effort-port-rx/tx"
> 
> 	The driver can determine the port type of "fsl,fman-v3-port-rx/tx" by reading the HW port id.
> 	"fsl,fman-v3-best-effort-port-rx/tx" will let the driver know about the best effort port and it will be used instead of "fsl,fman-v3-port-rx/tx".
> 
> In your opinion, should we add "fsl,fman-v3-10g-port-rx/tx" for 10G (with full hardware resources)?
> In such chase, "fsl,fman-v3-port-rx/tx" will denote 1G explicitly.
> 
> In FMan V2, dual ports/MACs are not available, so no need change the compatibles.

The compatible string should describe what programming interface is
present.  Other information should be in other properties.  Having the
same compatible for tx and rx definitely seems wrong.

-Scott
Madalin Bucur May 21, 2015, 8:16 a.m. UTC | #4
> -----Original Message-----

> From: Wood Scott-B07421

> 

> The compatible string should describe what programming interface is

> present.  Other information should be in other properties.  Having the

> same compatible for tx and rx definitely seems wrong.

> 

> -Scott

> 


Hi Scott, what we tried to accomplish here is to avoid updating u-boot for this new compatible and have minimal additions to the binding document.

We currently know that:

"fsl,fman-v3-port-rx"  is an Rx port that can work in 1G mode
"fsl,fman-v3-port-tx"  is an Tx port that can work in 1G mode

We proposed adding a new optional compatible "fsl,fman-v3-best-effort-port"  such that:

"fsl,fman-v3-port-rx"  is an Rx port that can work in 1G mode
"fsl,fman-v3-port-tx"  is an Tx port that can work in 1G mode

"fsl,fman-v3-port-rx", "fsl,fman-v3-best-effort-port"  is an Rx port that can work in 1G mode and also in limited resourced 10G mode
"fsl,fman-v3-port-tx", "fsl,fman-v3-best-effort-port"  is an Tx port that can work in 1G mode and also in limited resourced 10G mode

The only code addition required is in the Linux driver, code that checks for the optional, supplemental parameter "fsl,fman-v3-best-effort-port" to change some resource allocations.

Madalin
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index edda55f..c2e3ec3 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -166,6 +166,11 @@  PROPERTIES
 			- "fsl,fman-v3-port-oh" for FManV3 OH ports
 			- "fsl,fman-v3-port-rx" for FManV3 RX ports
 			- "fsl,fman-v3-port-tx" for FManV3 TX ports
+		Optional compatible which can be used in addition to the
+		compatibles above is:
+			- "fsl,fman-v3-best-effort-port"
+		This compatible represents 10G best effort ports:
+			Port configured as 10G, using 1G hardware.
 
 - cell-index
 		Usage: required