diff mbox

[U-Boot,RESEND] phy: atheros: add support for RGMII_ID, RGMII_TXID and RGMII_RXID

Message ID 1464279868-17764-1-git-send-email-andrea.merello@gmail.com
State Accepted
Commit 2ec4d10
Delegated to: Joe Hershberger
Headers show

Commit Message

Andrea Merello May 26, 2016, 4:24 p.m. UTC
This adds support for internal delay on RX and TX on RGMII interface for the
AR8035 phy.

This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
which u-boot support in is my tree; first patch waiting ML approval)

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>

--
2.1.4

Comments

Marek Vasut Sept. 27, 2016, 12:59 p.m. UTC | #1
On 05/26/2016 06:24 PM, Andrea Merello wrote:
> This adds support for internal delay on RX and TX on RGMII interface for the
> AR8035 phy.
> 
> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
> which u-boot support in is my tree; first patch waiting ML approval)
> 
> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>

Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>

Can we get this applied ? Thanks

> 
> diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
> index e57c412..694a338 100644
> --- a/drivers/net/phy/atheros.c
> +++ b/drivers/net/phy/atheros.c
> @@ -31,6 +31,22 @@ static int ar8035_config(struct phy_device *phydev)
>  	regval = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
>  	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, (regval|0x0100));
> 
> +	if ((phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
> +	    (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)) {
> +		/* select debug reg 5 */
> +		phy_write(phydev, MDIO_DEVAD_NONE, 0x1D, 0x5);
> +		/* enable tx delay */
> +		phy_write(phydev, MDIO_DEVAD_NONE, 0x1E, 0x0100);
> +	}
> +
> +	if ((phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
> +	    (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID)) {
> +		/* select debug reg 0 */
> +		phy_write(phydev, MDIO_DEVAD_NONE, 0x1D, 0x0);
> +		/* enable rx delay */
> +		phy_write(phydev, MDIO_DEVAD_NONE, 0x1E, 0x8000);
> +	}
> +
>  	phydev->supported = phydev->drv->features;
> 
>  	genphy_config_aneg(phydev);
> --
> 2.1.4
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Joe Hershberger Sept. 28, 2016, 6:53 p.m. UTC | #2
On Thu, May 26, 2016 at 11:24 AM, Andrea Merello
<andrea.merello@gmail.com> wrote:
> This adds support for internal delay on RX and TX on RGMII interface for the
> AR8035 phy.
>
> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
> which u-boot support in is my tree; first patch waiting ML approval)
>
> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger Sept. 28, 2016, 6:55 p.m. UTC | #3
On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut <marex@denx.de> wrote:
> On 05/26/2016 06:24 PM, Andrea Merello wrote:
>> This adds support for internal delay on RX and TX on RGMII interface for the
>> AR8035 phy.
>>
>> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
>> which u-boot support in is my tree; first patch waiting ML approval)
>>
>> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Acked-by: Marek Vasut <marex@denx.de>
>
> Can we get this applied ? Thanks

This is assigned to Michal in patchwork, so at least someone thinks
that's the correct path. I'm good either way.

-Joe
Marek Vasut Sept. 28, 2016, 7:01 p.m. UTC | #4
On 09/28/2016 08:55 PM, Joe Hershberger wrote:
> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut <marex@denx.de> wrote:
>> On 05/26/2016 06:24 PM, Andrea Merello wrote:
>>> This adds support for internal delay on RX and TX on RGMII interface for the
>>> AR8035 phy.
>>>
>>> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
>>> which u-boot support in is my tree; first patch waiting ML approval)
>>>
>>> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
>>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>> Acked-by: Marek Vasut <marex@denx.de>
>>
>> Can we get this applied ? Thanks
> 
> This is assigned to Michal in patchwork, so at least someone thinks
> that's the correct path. I'm good either way.

Well that doesn't make any sense, so please pick it.
Joe Hershberger Sept. 28, 2016, 7:04 p.m. UTC | #5
On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasut <marex@denx.de> wrote:
> On 09/28/2016 08:55 PM, Joe Hershberger wrote:
>> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut <marex@denx.de> wrote:
>>> On 05/26/2016 06:24 PM, Andrea Merello wrote:
>>>> This adds support for internal delay on RX and TX on RGMII interface for the
>>>> AR8035 phy.
>>>>
>>>> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
>>>> which u-boot support in is my tree; first patch waiting ML approval)
>>>>
>>>> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
>>>
>>> Reviewed-by: Marek Vasut <marex@denx.de>
>>> Acked-by: Marek Vasut <marex@denx.de>
>>>
>>> Can we get this applied ? Thanks
>>
>> This is assigned to Michal in patchwork, so at least someone thinks
>> that's the correct path. I'm good either way.
>
> Well that doesn't make any sense, so please pick it.

Probably was done because it mentions it's for a Zynq board. Sure
would be nice if patchwork listed a history of who changed what
fields.

-Joe
Marek Vasut Sept. 28, 2016, 7:10 p.m. UTC | #6
On 09/28/2016 09:04 PM, Joe Hershberger wrote:
> On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasut <marex@denx.de> wrote:
>> On 09/28/2016 08:55 PM, Joe Hershberger wrote:
>>> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut <marex@denx.de> wrote:
>>>> On 05/26/2016 06:24 PM, Andrea Merello wrote:
>>>>> This adds support for internal delay on RX and TX on RGMII interface for the
>>>>> AR8035 phy.
>>>>>
>>>>> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
>>>>> which u-boot support in is my tree; first patch waiting ML approval)
>>>>>
>>>>> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
>>>>
>>>> Reviewed-by: Marek Vasut <marex@denx.de>
>>>> Acked-by: Marek Vasut <marex@denx.de>
>>>>
>>>> Can we get this applied ? Thanks
>>>
>>> This is assigned to Michal in patchwork, so at least someone thinks
>>> that's the correct path. I'm good either way.
>>
>> Well that doesn't make any sense, so please pick it.
> 
> Probably was done because it mentions it's for a Zynq board. Sure
> would be nice if patchwork listed a history of who changed what
> fields.

I would rather avoid fingerpointing, but probably Tom, he's the one
doing the hard work of reassigning patches and is alone at it I think.
Thus, accidents can happen.
Joe Hershberger Sept. 28, 2016, 7:13 p.m. UTC | #7
On Wed, Sep 28, 2016 at 2:10 PM, Marek Vasut <marex@denx.de> wrote:
> On 09/28/2016 09:04 PM, Joe Hershberger wrote:
>> On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasut <marex@denx.de> wrote:
>>> On 09/28/2016 08:55 PM, Joe Hershberger wrote:
>>>> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut <marex@denx.de> wrote:
>>>>> On 05/26/2016 06:24 PM, Andrea Merello wrote:
>>>>>> This adds support for internal delay on RX and TX on RGMII interface for the
>>>>>> AR8035 phy.
>>>>>>
>>>>>> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
>>>>>> which u-boot support in is my tree; first patch waiting ML approval)
>>>>>>
>>>>>> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
>>>>>
>>>>> Reviewed-by: Marek Vasut <marex@denx.de>
>>>>> Acked-by: Marek Vasut <marex@denx.de>
>>>>>
>>>>> Can we get this applied ? Thanks
>>>>
>>>> This is assigned to Michal in patchwork, so at least someone thinks
>>>> that's the correct path. I'm good either way.
>>>
>>> Well that doesn't make any sense, so please pick it.
>>
>> Probably was done because it mentions it's for a Zynq board. Sure
>> would be nice if patchwork listed a history of who changed what
>> fields.
>
> I would rather avoid fingerpointing, but probably Tom, he's the one
> doing the hard work of reassigning patches and is alone at it I think.
> Thus, accidents can happen.

I also assign some, mostly unassigned and pertaining to me. I
certainly try to not take patches assigned to others when there's any
doubt in case they are in progress. I'm not interested in
finger-pointing so much as knowing who to ask about the assignment.

-Joe
Michal Simek Sept. 29, 2016, 5:22 p.m. UTC | #8
On 28.9.2016 12:13, Joe Hershberger wrote:
> On Wed, Sep 28, 2016 at 2:10 PM, Marek Vasut <marex@denx.de> wrote:
>> On 09/28/2016 09:04 PM, Joe Hershberger wrote:
>>> On Wed, Sep 28, 2016 at 2:01 PM, Marek Vasut <marex@denx.de> wrote:
>>>> On 09/28/2016 08:55 PM, Joe Hershberger wrote:
>>>>> On Tue, Sep 27, 2016 at 7:59 AM, Marek Vasut <marex@denx.de> wrote:
>>>>>> On 05/26/2016 06:24 PM, Andrea Merello wrote:
>>>>>>> This adds support for internal delay on RX and TX on RGMII interface for the
>>>>>>> AR8035 phy.
>>>>>>>
>>>>>>> This is basically the same Linux driver do. Tested on a Zynq Zturn board (for
>>>>>>> which u-boot support in is my tree; first patch waiting ML approval)
>>>>>>>
>>>>>>> Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
>>>>>>
>>>>>> Reviewed-by: Marek Vasut <marex@denx.de>
>>>>>> Acked-by: Marek Vasut <marex@denx.de>
>>>>>>
>>>>>> Can we get this applied ? Thanks
>>>>>
>>>>> This is assigned to Michal in patchwork, so at least someone thinks
>>>>> that's the correct path. I'm good either way.
>>>>
>>>> Well that doesn't make any sense, so please pick it.
>>>
>>> Probably was done because it mentions it's for a Zynq board. Sure
>>> would be nice if patchwork listed a history of who changed what
>>> fields.
>>
>> I would rather avoid fingerpointing, but probably Tom, he's the one
>> doing the hard work of reassigning patches and is alone at it I think.
>> Thus, accidents can happen.
> 
> I also assign some, mostly unassigned and pertaining to me. I
> certainly try to not take patches assigned to others when there's any
> doubt in case they are in progress. I'm not interested in
> finger-pointing so much as knowing who to ask about the assignment.


Joe: :-) Definitely take it via your tree.

Thanks,
Michal
Joe Hershberger Oct. 13, 2016, 5:38 p.m. UTC | #9
Hi Andrea,

https://patchwork.ozlabs.org/patch/626776/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index e57c412..694a338 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -31,6 +31,22 @@  static int ar8035_config(struct phy_device *phydev)
 	regval = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, (regval|0x0100));

+	if ((phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
+	    (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)) {
+		/* select debug reg 5 */
+		phy_write(phydev, MDIO_DEVAD_NONE, 0x1D, 0x5);
+		/* enable tx delay */
+		phy_write(phydev, MDIO_DEVAD_NONE, 0x1E, 0x0100);
+	}
+
+	if ((phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) ||
+	    (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID)) {
+		/* select debug reg 0 */
+		phy_write(phydev, MDIO_DEVAD_NONE, 0x1D, 0x0);
+		/* enable rx delay */
+		phy_write(phydev, MDIO_DEVAD_NONE, 0x1E, 0x8000);
+	}
+
 	phydev->supported = phydev->drv->features;

 	genphy_config_aneg(phydev);