Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-31 Thread Corentin Labbe
On Mon, Jul 31, 2017 at 08:19:40PM +0800, Chen-Yu Tsai wrote: > On Sat, Jul 29, 2017 at 2:48 PM, Corentin Labbe > wrote: > > On Fri, Jul 28, 2017 at 10:54:30AM -0700, Florian Fainelli wrote: > >> On 07/28/2017 07:44 AM, Corentin Labbe wrote: > >> > On Fri, Jul 28, 2017

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-31 Thread Chen-Yu Tsai
On Sat, Jul 29, 2017 at 2:48 PM, Corentin Labbe wrote: > On Fri, Jul 28, 2017 at 10:54:30AM -0700, Florian Fainelli wrote: >> On 07/28/2017 07:44 AM, Corentin Labbe wrote: >> > On Fri, Jul 28, 2017 at 04:36:00PM +0200, Andrew Lunn wrote: >> I've probably asked this

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-29 Thread Corentin Labbe
On Fri, Jul 28, 2017 at 10:54:30AM -0700, Florian Fainelli wrote: > On 07/28/2017 07:44 AM, Corentin Labbe wrote: > > On Fri, Jul 28, 2017 at 04:36:00PM +0200, Andrew Lunn wrote: > I've probably asked this before: Does the internal PHY use a different > PHY ID in registers 2 and 3? >

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Florian Fainelli
On 07/28/2017 07:44 AM, Corentin Labbe wrote: > On Fri, Jul 28, 2017 at 04:36:00PM +0200, Andrew Lunn wrote: I've probably asked this before: Does the internal PHY use a different PHY ID in registers 2 and 3? >>> >>> yes >>> >>> reg2: 0x0044 >>> reg3: 0X1500 > > Copy/paste error,

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Andrew Lunn
> It is too late when we know the PHY ID. > We need to set a syscon for choosing external/internal PHY. > So we can rely only on DT. The point is, its not a property of the PHY. It is a syscon or a MAC property. Having it as a MAC property would be more generic. Andrew

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Corentin Labbe
On Fri, Jul 28, 2017 at 04:36:00PM +0200, Andrew Lunn wrote: > > > I've probably asked this before: Does the internal PHY use a different > > > PHY ID in registers 2 and 3? > > > > > > > yes > > > > reg2: 0x0044 > > reg3: 0X1500 Copy/paste error, its 1400 > > So this is not about loading the

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Andrew Lunn
> > I've probably asked this before: Does the internal PHY use a different > > PHY ID in registers 2 and 3? > > > > yes > > reg2: 0x0044 > reg3: 0X1500 So this is not about loading the correct PHY driver. You can already do this based on the PHY IDs... This is about selecting which PHY to

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Corentin Labbe
On Fri, Jul 28, 2017 at 03:55:44PM +0200, Andrew Lunn wrote: > On Fri, Jul 28, 2017 at 11:28:15AM +0200, Corentin Labbe wrote: > > Hello > > > > The current way to find if the phy is internal is to compare DT phy-mode > > and emac_variant/internal_phy. > > But it will negate a possible future SoC

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Andrew Lunn
On Fri, Jul 28, 2017 at 11:28:15AM +0200, Corentin Labbe wrote: > Hello > > The current way to find if the phy is internal is to compare DT phy-mode > and emac_variant/internal_phy. > But it will negate a possible future SoC where an external PHY use the > same phy mode than the internal one. >

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Andrew Lunn
On Fri, Jul 28, 2017 at 05:53:40PM +0800, Chen-Yu Tsai wrote: > On Fri, Jul 28, 2017 at 5:28 PM, Corentin Labbe > wrote: > > Hello > > > > The current way to find if the phy is internal is to compare DT phy-mode > > and emac_variant/internal_phy. > > But it will negate

Re: [PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Chen-Yu Tsai
On Fri, Jul 28, 2017 at 5:28 PM, Corentin Labbe wrote: > Hello > > The current way to find if the phy is internal is to compare DT phy-mode > and emac_variant/internal_phy. > But it will negate a possible future SoC where an external PHY use the > same phy mode than the

[PATCH 0/3] net-next: stmmac: support future possible different internal phy mode

2017-07-28 Thread Corentin Labbe
Hello The current way to find if the phy is internal is to compare DT phy-mode and emac_variant/internal_phy. But it will negate a possible future SoC where an external PHY use the same phy mode than the internal one. This patchs series adds a new way to find if the PHY is internal, via its