2019-07-31 10:59:26

by Harini Katakam

[permalink] [raw]
Subject: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

Add a new property to indicate when PS SGMII is used with NO
external PHY on board.

Signed-off-by: Harini Katakam <[email protected]>
---
Documentation/devicetree/bindings/net/macb.txt | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 63c73fa..ae1b109 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -38,6 +38,10 @@ Optional properties for PHY child node:
up via magic packet.
- phy-handle : see ethernet.txt file in the same directory

+Optional properties:
+- is-internal-pcspma: Add when GEM's internal SGMII support is used without
+ any external SGMII PHY.
+
Examples:

macb0: ethernet@fffc4000 {
--
2.7.4


2019-08-04 14:57:34

by Andrew Lunn

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

On Wed, Jul 31, 2019 at 03:10:32PM +0530, Harini Katakam wrote:
> Add a new property to indicate when PS SGMII is used with NO
> external PHY on board.

Hi Harini

What exactly is you use case? Are you connecting to a Ethernet switch?
To an SFP cage with a copper module?

Andrew

2019-08-05 06:16:31

by Harini Katakam

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

Hi Andrew,

On Sun, Aug 4, 2019 at 8:26 PM Andrew Lunn <[email protected]> wrote:
>
> On Wed, Jul 31, 2019 at 03:10:32PM +0530, Harini Katakam wrote:
> > Add a new property to indicate when PS SGMII is used with NO
> > external PHY on board.
>
> Hi Harini
>
> What exactly is you use case? Are you connecting to a Ethernet switch?
> To an SFP cage with a copper module?

Yes, an SFP cage is the common HW target for this patch. Essentially, there
is no external PHY driver that the macb can "connect" to; if there was an
external PHY on board, its link status would also indicate when the GEM(PCS)
to external PHY link was down. But in the absence of an external PHY on
HW, PCS link status needs to be monitored and reported to users.

Regards,
Harini

2019-08-05 13:23:14

by Andrew Lunn

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

On Mon, Aug 05, 2019 at 11:45:05AM +0530, Harini Katakam wrote:
> Hi Andrew,
>
> On Sun, Aug 4, 2019 at 8:26 PM Andrew Lunn <[email protected]> wrote:
> >
> > On Wed, Jul 31, 2019 at 03:10:32PM +0530, Harini Katakam wrote:
> > > Add a new property to indicate when PS SGMII is used with NO
> > > external PHY on board.
> >
> > Hi Harini
> >
> > What exactly is you use case? Are you connecting to a Ethernet switch?
> > To an SFP cage with a copper module?
>
> Yes, an SFP cage is the common HW target for this patch.

Hi Harini

So you have a copper PHY in the SFP cage. It will talk SGMII
signalling to your PS SGMII. When that signalling is complete i would
expect the MAC to raise an interrupt, just as if the SGMII PHY was
soldered on the board. So i don't see why you need this polling?

Andrew

2019-08-05 14:38:16

by Harini Katakam

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

Hi Andrew,

On Mon, Aug 5, 2019 at 7:00 PM Andrew Lunn <[email protected]> wrote:
>
> On Mon, Aug 05, 2019 at 11:45:05AM +0530, Harini Katakam wrote:
> > Hi Andrew,
> >
> > On Sun, Aug 4, 2019 at 8:26 PM Andrew Lunn <[email protected]> wrote:
> > >
> > > On Wed, Jul 31, 2019 at 03:10:32PM +0530, Harini Katakam wrote:
> > > > Add a new property to indicate when PS SGMII is used with NO
> > > > external PHY on board.
> > >
> > > Hi Harini
> > >
> > > What exactly is you use case? Are you connecting to a Ethernet switch?
> > > To an SFP cage with a copper module?
> >
> > Yes, an SFP cage is the common HW target for this patch.
>
> Hi Harini
>
> So you have a copper PHY in the SFP cage. It will talk SGMII
> signalling to your PS SGMII. When that signalling is complete i would
> expect the MAC to raise an interrupt, just as if the SGMII PHY was
> soldered on the board. So i don't see why you need this polling?
>

Thanks. Sorry, I overlooked this interrupt. Let me try that.

Regards,
Harini

2019-08-05 17:18:10

by Andrew Lunn

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

> Even with the use of this interrupt, the link status actions (link print and
> netif ops) will still be required. And also the need for macb_open to
> proceed without phydev. Could you please let me know if that is acceptable
> to patch or if there's a cleaner way to
> report this link status?

It sounds like you need to convert to phylink, so you get full sfp
support. phylib does not handle hotplug of PHYs.

Please look at the comments Russell gave the last time this was
attempted.

Andrew

2019-08-06 05:48:38

by Harini Katakam

[permalink] [raw]
Subject: Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

Hi Andrew,

On Mon, Aug 5, 2019 at 10:47 PM Andrew Lunn <[email protected]> wrote:
>
> > Even with the use of this interrupt, the link status actions (link print and
> > netif ops) will still be required. And also the need for macb_open to
> > proceed without phydev. Could you please let me know if that is acceptable
> > to patch or if there's a cleaner way to
> > report this link status?
>
> It sounds like you need to convert to phylink, so you get full sfp
> support. phylib does not handle hotplug of PHYs.
>
> Please look at the comments Russell gave the last time this was
> attempted.

Yes, I looked at the comments from Russell and wasn't sure if this
case qualified for phylink.

Regards,
Harini