public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
@ 2017-09-29 14:47 Lukasz Majewski
  2017-10-26 14:18 ` Lukasz Majewski
  2017-10-26 15:05 ` York Sun
  0 siblings, 2 replies; 7+ messages in thread
From: Lukasz Majewski @ 2017-09-29 14:47 UTC (permalink / raw)
  To: u-boot

This commit allows extended Marvell registers to be read with:

foo > mdio rx FEC 3.10
Reading from bus FEC
PHY at address 0:
3.16 - 0x1063
foo > mdio wx FEC 3.10 0x1011

The above code changes the way ETH connector LEDs blink.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 drivers/net/phy/marvell.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index b7f300e..a167c34 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -104,6 +104,31 @@
 #define MIIM_88E151x_MODE_SGMII		1
 #define MIIM_88E151x_RESET_OFFS		15
 
+static int m88e1xxx_phy_extread(struct phy_device *phydev, int addr,
+				int devaddr, int regnum)
+{
+	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE);
+	int val;
+
+	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, devaddr);
+	val = phy_read(phydev, MDIO_DEVAD_NONE, regnum);
+	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, oldpage);
+
+	return val;
+}
+
+static int m88e1xxx_phy_extwrite(struct phy_device *phydev, int addr,
+				 int devaddr, int regnum, u16 val)
+{
+	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE);
+
+	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, devaddr);
+	phy_write(phydev, MDIO_DEVAD_NONE, regnum, val);
+	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, oldpage);
+
+	return 0;
+}
+
 /* Marvell 88E1011S */
 static int m88e1011s_config(struct phy_device *phydev)
 {
@@ -669,6 +694,8 @@ static struct phy_driver M88E1510_driver = {
 	.config = &m88e1510_config,
 	.startup = &m88e1011s_startup,
 	.shutdown = &genphy_shutdown,
+	.readext = &m88e1xxx_phy_extread,
+	.writeext = &m88e1xxx_phy_extwrite,
 };
 
 /*
-- 
2.1.4

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

* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
  2017-09-29 14:47 [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers Lukasz Majewski
@ 2017-10-26 14:18 ` Lukasz Majewski
  2017-10-26 15:05 ` York Sun
  1 sibling, 0 replies; 7+ messages in thread
From: Lukasz Majewski @ 2017-10-26 14:18 UTC (permalink / raw)
  To: u-boot

Dear All,

> [PATCH] net: phy: marvell: Add functions to read PHY's extended
> registers

Gentle ping about this patch.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

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

* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
  2017-09-29 14:47 [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers Lukasz Majewski
  2017-10-26 14:18 ` Lukasz Majewski
@ 2017-10-26 15:05 ` York Sun
  2017-10-26 15:15   ` Lukasz Majewski
  1 sibling, 1 reply; 7+ messages in thread
From: York Sun @ 2017-10-26 15:05 UTC (permalink / raw)
  To: u-boot

On 09/29/2017 07:48 AM, Lukasz Majewski wrote:
> This commit allows extended Marvell registers to be read with:
> 
> foo > mdio rx FEC 3.10
> Reading from bus FEC
> PHY at address 0:
> 3.16 - 0x1063
> foo > mdio wx FEC 3.10 0x1011
> 
> The above code changes the way ETH connector LEDs blink.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  drivers/net/phy/marvell.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index b7f300e..a167c34 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -104,6 +104,31 @@
>  #define MIIM_88E151x_MODE_SGMII		1
>  #define MIIM_88E151x_RESET_OFFS		15
>  
> +static int m88e1xxx_phy_extread(struct phy_device *phydev, int addr,
> +				int devaddr, int regnum)
> +{
> +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE);
> +	int val;
> +
> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, devaddr);
> +	val = phy_read(phydev, MDIO_DEVAD_NONE, regnum);
> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, oldpage);
> +
> +	return val;
> +}
> +
> +static int m88e1xxx_phy_extwrite(struct phy_device *phydev, int addr,
> +				 int devaddr, int regnum, u16 val)
> +{
> +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE);
> +
> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, devaddr);
> +	phy_write(phydev, MDIO_DEVAD_NONE, regnum, val);
> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, oldpage);
> +
> +	return 0;
> +}
> +
>  /* Marvell 88E1011S */
>  static int m88e1011s_config(struct phy_device *phydev)
>  {
> @@ -669,6 +694,8 @@ static struct phy_driver M88E1510_driver = {
>  	.config = &m88e1510_config,
>  	.startup = &m88e1011s_startup,
>  	.shutdown = &genphy_shutdown,
> +	.readext = &m88e1xxx_phy_extread,
> +	.writeext = &m88e1xxx_phy_extwrite,
>  };
>  
>  /*
> 


I guess this feature is usable. You only enable it for M88E1510. Can the
same be applied to other Marvell PHYs?

York

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

* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
  2017-10-26 15:05 ` York Sun
@ 2017-10-26 15:15   ` Lukasz Majewski
  2017-10-26 15:15     ` Lukasz Majewski
  0 siblings, 1 reply; 7+ messages in thread
From: Lukasz Majewski @ 2017-10-26 15:15 UTC (permalink / raw)
  To: u-boot

On Thu, 26 Oct 2017 15:05:18 +0000
York Sun <york.sun@nxp.com> wrote:

> On 09/29/2017 07:48 AM, Lukasz Majewski wrote:
> > This commit allows extended Marvell registers to be read with:
> > 
> > foo > mdio rx FEC 3.10
> > Reading from bus FEC
> > PHY at address 0:
> > 3.16 - 0x1063
> > foo > mdio wx FEC 3.10 0x1011
> > 
> > The above code changes the way ETH connector LEDs blink.
> > 
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >  drivers/net/phy/marvell.c | 27 +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> > 
> > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> > index b7f300e..a167c34 100644
> > --- a/drivers/net/phy/marvell.c
> > +++ b/drivers/net/phy/marvell.c
> > @@ -104,6 +104,31 @@
> >  #define MIIM_88E151x_MODE_SGMII		1
> >  #define MIIM_88E151x_RESET_OFFS		15
> >  
> > +static int m88e1xxx_phy_extread(struct phy_device *phydev, int
> > addr,
> > +				int devaddr, int regnum)
> > +{
> > +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
> > MII_MARVELL_PHY_PAGE);
> > +	int val;
> > +
> > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > devaddr);
> > +	val = phy_read(phydev, MDIO_DEVAD_NONE, regnum);
> > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > oldpage); +
> > +	return val;
> > +}
> > +
> > +static int m88e1xxx_phy_extwrite(struct phy_device *phydev, int
> > addr,
> > +				 int devaddr, int regnum, u16 val)
> > +{
> > +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
> > MII_MARVELL_PHY_PAGE); +
> > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > devaddr);
> > +	phy_write(phydev, MDIO_DEVAD_NONE, regnum, val);
> > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > oldpage); +
> > +	return 0;
> > +}
> > +
> >  /* Marvell 88E1011S */
> >  static int m88e1011s_config(struct phy_device *phydev)
> >  {
> > @@ -669,6 +694,8 @@ static struct phy_driver M88E1510_driver = {
> >  	.config = &m88e1510_config,
> >  	.startup = &m88e1011s_startup,
> >  	.shutdown = &genphy_shutdown,
> > +	.readext = &m88e1xxx_phy_extread,
> > +	.writeext = &m88e1xxx_phy_extwrite,
> >  };
> >  
> >  /*
> > 
> 
> 
> I guess this feature is usable. You only enable it for M88E1510. Can
> the same be applied to other Marvell PHYs?

It should work...

However, in this patch I've only enabled one - which I could test.....

I can enable more if you can help me with debugging.

> 
> York




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

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

* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
  2017-10-26 15:15   ` Lukasz Majewski
@ 2017-10-26 15:15     ` Lukasz Majewski
  2017-10-26 15:45       ` York Sun
  0 siblings, 1 reply; 7+ messages in thread
From: Lukasz Majewski @ 2017-10-26 15:15 UTC (permalink / raw)
  To: u-boot

On Thu, 26 Oct 2017 17:15:19 +0200
Lukasz Majewski <lukma@denx.de> wrote:

> On Thu, 26 Oct 2017 15:05:18 +0000
> York Sun <york.sun@nxp.com> wrote:
> 
> > On 09/29/2017 07:48 AM, Lukasz Majewski wrote:
> > > This commit allows extended Marvell registers to be read with:
> > > 
> > > foo > mdio rx FEC 3.10
> > > Reading from bus FEC
> > > PHY at address 0:
> > > 3.16 - 0x1063
> > > foo > mdio wx FEC 3.10 0x1011
> > > 
> > > The above code changes the way ETH connector LEDs blink.
> > > 
> > > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > > ---
> > >  drivers/net/phy/marvell.c | 27 +++++++++++++++++++++++++++
> > >  1 file changed, 27 insertions(+)
> > > 
> > > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> > > index b7f300e..a167c34 100644
> > > --- a/drivers/net/phy/marvell.c
> > > +++ b/drivers/net/phy/marvell.c
> > > @@ -104,6 +104,31 @@
> > >  #define MIIM_88E151x_MODE_SGMII		1
> > >  #define MIIM_88E151x_RESET_OFFS		15
> > >  
> > > +static int m88e1xxx_phy_extread(struct phy_device *phydev, int
> > > addr,
> > > +				int devaddr, int regnum)
> > > +{
> > > +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
> > > MII_MARVELL_PHY_PAGE);
> > > +	int val;
> > > +
> > > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > > devaddr);
> > > +	val = phy_read(phydev, MDIO_DEVAD_NONE, regnum);
> > > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > > oldpage); +
> > > +	return val;
> > > +}
> > > +
> > > +static int m88e1xxx_phy_extwrite(struct phy_device *phydev, int
> > > addr,
> > > +				 int devaddr, int regnum, u16
> > > val) +{
> > > +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
> > > MII_MARVELL_PHY_PAGE); +
> > > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > > devaddr);
> > > +	phy_write(phydev, MDIO_DEVAD_NONE, regnum, val);
> > > +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> > > oldpage); +
> > > +	return 0;
> > > +}
> > > +
> > >  /* Marvell 88E1011S */
> > >  static int m88e1011s_config(struct phy_device *phydev)
> > >  {
> > > @@ -669,6 +694,8 @@ static struct phy_driver M88E1510_driver = {
> > >  	.config = &m88e1510_config,
> > >  	.startup = &m88e1011s_startup,
> > >  	.shutdown = &genphy_shutdown,
> > > +	.readext = &m88e1xxx_phy_extread,
> > > +	.writeext = &m88e1xxx_phy_extwrite,
> > >  };
> > >  
> > >  /*
> > > 
> > 
> > 
> > I guess this feature is usable. You only enable it for M88E1510. Can
> > the same be applied to other Marvell PHYs?
> 
> It should work...
> 
> However, in this patch I've only enabled one - which I could test.....
> 
> I can enable more if you can help me with debugging.

s/debugging/testing

> 
> > 
> > York
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

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

* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
  2017-10-26 15:15     ` Lukasz Majewski
@ 2017-10-26 15:45       ` York Sun
  2017-10-26 21:02         ` Lukasz Majewski
  0 siblings, 1 reply; 7+ messages in thread
From: York Sun @ 2017-10-26 15:45 UTC (permalink / raw)
  To: u-boot

On 10/26/2017 08:16 AM, Lukasz Majewski wrote:
> On Thu, 26 Oct 2017 17:15:19 +0200
> Lukasz Majewski <lukma@denx.de> wrote:
> 
>> On Thu, 26 Oct 2017 15:05:18 +0000
>> York Sun <york.sun@nxp.com> wrote:
>>
>>> On 09/29/2017 07:48 AM, Lukasz Majewski wrote:
>>>> This commit allows extended Marvell registers to be read with:
>>>>
>>>> foo > mdio rx FEC 3.10
>>>> Reading from bus FEC
>>>> PHY at address 0:
>>>> 3.16 - 0x1063
>>>> foo > mdio wx FEC 3.10 0x1011
>>>>
>>>> The above code changes the way ETH connector LEDs blink.
>>>>
>>>> Signed-off-by: Lukasz Majewski <lukma@denx.de>
>>>> ---
>>>>  drivers/net/phy/marvell.c | 27 +++++++++++++++++++++++++++
>>>>  1 file changed, 27 insertions(+)
>>>>
>>>> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
>>>> index b7f300e..a167c34 100644
>>>> --- a/drivers/net/phy/marvell.c
>>>> +++ b/drivers/net/phy/marvell.c
>>>> @@ -104,6 +104,31 @@
>>>>  #define MIIM_88E151x_MODE_SGMII		1
>>>>  #define MIIM_88E151x_RESET_OFFS		15
>>>>  
>>>> +static int m88e1xxx_phy_extread(struct phy_device *phydev, int
>>>> addr,
>>>> +				int devaddr, int regnum)
>>>> +{
>>>> +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
>>>> MII_MARVELL_PHY_PAGE);
>>>> +	int val;
>>>> +
>>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
>>>> devaddr);
>>>> +	val = phy_read(phydev, MDIO_DEVAD_NONE, regnum);
>>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
>>>> oldpage); +
>>>> +	return val;
>>>> +}
>>>> +
>>>> +static int m88e1xxx_phy_extwrite(struct phy_device *phydev, int
>>>> addr,
>>>> +				 int devaddr, int regnum, u16
>>>> val) +{
>>>> +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
>>>> MII_MARVELL_PHY_PAGE); +
>>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
>>>> devaddr);
>>>> +	phy_write(phydev, MDIO_DEVAD_NONE, regnum, val);
>>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
>>>> oldpage); +
>>>> +	return 0;
>>>> +}
>>>> +
>>>>  /* Marvell 88E1011S */
>>>>  static int m88e1011s_config(struct phy_device *phydev)
>>>>  {
>>>> @@ -669,6 +694,8 @@ static struct phy_driver M88E1510_driver = {
>>>>  	.config = &m88e1510_config,
>>>>  	.startup = &m88e1011s_startup,
>>>>  	.shutdown = &genphy_shutdown,
>>>> +	.readext = &m88e1xxx_phy_extread,
>>>> +	.writeext = &m88e1xxx_phy_extwrite,
>>>>  };
>>>>  
>>>>  /*
>>>>
>>>
>>>
>>> I guess this feature is usable. You only enable it for M88E1510. Can
>>> the same be applied to other Marvell PHYs?
>>
>> It should work...
>>
>> However, in this patch I've only enabled one - which I could test.....
>>
>> I can enable more if you can help me with debugging.
> 
> s/debugging/testing
> 

I can try to find some old boards with Marvell PHYs, but it is not easy.
Our recent boards don't use their PHYs (don't ask me why). Maybe we can
take another approach. If you have access to the PHY manual, maybe you
can confirm the extended page is available. This actually prompts
another thought. What would happen if you access to a non-exist page? I
hope it doesn't lock the system. Please try it.

York

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

* [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers
  2017-10-26 15:45       ` York Sun
@ 2017-10-26 21:02         ` Lukasz Majewski
  0 siblings, 0 replies; 7+ messages in thread
From: Lukasz Majewski @ 2017-10-26 21:02 UTC (permalink / raw)
  To: u-boot

Hi York,

> On 10/26/2017 08:16 AM, Lukasz Majewski wrote:
> > On Thu, 26 Oct 2017 17:15:19 +0200
> > Lukasz Majewski <lukma@denx.de> wrote:
> > 
> >> On Thu, 26 Oct 2017 15:05:18 +0000
> >> York Sun <york.sun@nxp.com> wrote:
> >>
> >>> On 09/29/2017 07:48 AM, Lukasz Majewski wrote:
> >>>> This commit allows extended Marvell registers to be read with:
> >>>>
> >>>> foo > mdio rx FEC 3.10
> >>>> Reading from bus FEC
> >>>> PHY at address 0:
> >>>> 3.16 - 0x1063
> >>>> foo > mdio wx FEC 3.10 0x1011
> >>>>
> >>>> The above code changes the way ETH connector LEDs blink.
> >>>>
> >>>> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >>>> ---
> >>>>  drivers/net/phy/marvell.c | 27 +++++++++++++++++++++++++++
> >>>>  1 file changed, 27 insertions(+)
> >>>>
> >>>> diff --git a/drivers/net/phy/marvell.c
> >>>> b/drivers/net/phy/marvell.c index b7f300e..a167c34 100644
> >>>> --- a/drivers/net/phy/marvell.c
> >>>> +++ b/drivers/net/phy/marvell.c
> >>>> @@ -104,6 +104,31 @@
> >>>>  #define MIIM_88E151x_MODE_SGMII		1
> >>>>  #define MIIM_88E151x_RESET_OFFS		15
> >>>>  
> >>>> +static int m88e1xxx_phy_extread(struct phy_device *phydev, int
> >>>> addr,
> >>>> +				int devaddr, int regnum)
> >>>> +{
> >>>> +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
> >>>> MII_MARVELL_PHY_PAGE);
> >>>> +	int val;
> >>>> +
> >>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> >>>> devaddr);
> >>>> +	val = phy_read(phydev, MDIO_DEVAD_NONE, regnum);
> >>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> >>>> oldpage); +
> >>>> +	return val;
> >>>> +}
> >>>> +
> >>>> +static int m88e1xxx_phy_extwrite(struct phy_device *phydev, int
> >>>> addr,
> >>>> +				 int devaddr, int regnum, u16
> >>>> val) +{
> >>>> +	int oldpage = phy_read(phydev, MDIO_DEVAD_NONE,
> >>>> MII_MARVELL_PHY_PAGE); +
> >>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> >>>> devaddr);
> >>>> +	phy_write(phydev, MDIO_DEVAD_NONE, regnum, val);
> >>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE,
> >>>> oldpage); +
> >>>> +	return 0;
> >>>> +}
> >>>> +
> >>>>  /* Marvell 88E1011S */
> >>>>  static int m88e1011s_config(struct phy_device *phydev)
> >>>>  {
> >>>> @@ -669,6 +694,8 @@ static struct phy_driver M88E1510_driver = {
> >>>>  	.config = &m88e1510_config,
> >>>>  	.startup = &m88e1011s_startup,
> >>>>  	.shutdown = &genphy_shutdown,
> >>>> +	.readext = &m88e1xxx_phy_extread,
> >>>> +	.writeext = &m88e1xxx_phy_extwrite,
> >>>>  };
> >>>>  
> >>>>  /*
> >>>>
> >>>
> >>>
> >>> I guess this feature is usable. You only enable it for M88E1510.
> >>> Can the same be applied to other Marvell PHYs?
> >>
> >> It should work...
> >>
> >> However, in this patch I've only enabled one - which I could
> >> test.....
> >>
> >> I can enable more if you can help me with debugging.
> > 
> > s/debugging/testing
> > 
> 
> I can try to find some old boards with Marvell PHYs, but it is not
> easy. Our recent boards don't use their PHYs (don't ask me why).
> Maybe we can take another approach. If you have access to the PHY
> manual, maybe you can confirm the extended page is available. This
> actually prompts another thought. What would happen if you access to
> a non-exist page? I hope it doesn't lock the system. Please try it.

It should not harm the devices. I would add the code to devices which
we can test. 

Support for others would be added on demand if somebody can test the
code.

> 
> York




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

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

end of thread, other threads:[~2017-10-26 21:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 14:47 [U-Boot] [PATCH] net: phy: marvell: Add functions to read PHY's extended registers Lukasz Majewski
2017-10-26 14:18 ` Lukasz Majewski
2017-10-26 15:05 ` York Sun
2017-10-26 15:15   ` Lukasz Majewski
2017-10-26 15:15     ` Lukasz Majewski
2017-10-26 15:45       ` York Sun
2017-10-26 21:02         ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox