From patchwork Tue Feb 7 08:50:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 725036 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vHdNB468Bz9s7c for ; Tue, 7 Feb 2017 19:50:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 72B9E4B64C; Tue, 7 Feb 2017 09:50:48 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ny20ttD6P1a6; Tue, 7 Feb 2017 09:50:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD7604B5E3; Tue, 7 Feb 2017 09:50:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B8D4A4B5E3 for ; Tue, 7 Feb 2017 09:50:44 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hXnkT193Ftx7 for ; Tue, 7 Feb 2017 09:50:44 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by theia.denx.de (Postfix) with ESMTPS id 41F3C4B55F for ; Tue, 7 Feb 2017 09:50:39 +0100 (CET) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v178oLrf011404; Tue, 7 Feb 2017 02:50:21 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v178oKC4016157; Tue, 7 Feb 2017 02:50:21 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Tue, 7 Feb 2017 02:50:20 -0600 Received: from [172.24.190.171] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v178oGXl009512; Tue, 7 Feb 2017 02:50:17 -0600 To: "Ken.Lin" , "ken " , "sbabic@denx.de" References: <20170202212351.459-1-user@ken-notebook> <47825431-6c2f-dc16-66b8-e220ed733f6d@ti.com> <03B5A3CA1724CE4EAC32B27E39292A677FC757E8FC@AUSMAIL1.AUS.ADVANTECH.CORP> <80ca490a-5f49-593d-e1ed-63dda4667931@ti.com> <03B5A3CA1724CE4EAC32B27E39292A677FC757EB11@AUSMAIL1.AUS.ADVANTECH.CORP> From: Sekhar Nori Message-ID: Date: Tue, 7 Feb 2017 14:20:16 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Cc: "albert.u.uboot@aribaud.net" , "Peter.Chiang" , "u-boot@lists.denx.de" , "joe.hershberger@ni.com" , "Peter.Stretz" Subject: Re: [U-Boot] [PATCH] drivers: net: phy: atheros: apply the previous register setting for AR8031 to fix the voltage peak issue X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On Monday 06 February 2017 11:06 PM, Ken.Lin wrote: >>> The register setting would turn out to be 0x3D47 on our project boards and >> our signal measurement results show the patch (v2 version, >> https://patchwork.ozlabs.org/patch/723461/)) could fix the voltage peak issue. >>> The proposed solution is to follow the implementation in previous commits, >> which include the reserved bits settings in SerDes Test and System Mode Control >> register. >> So what does the register setting turn out to be with my patch below ? >> >> What are the "previous commits" you refer to ? Thanks for the references to the commits. You left out answering my question about what register settings you see with my patch. I have included another patch now with some debug enabled. Can you apply this patch to latest u-boot master, run on your board and send me the log ? Here is what I see on AM335x EVM-SK: U-Boot 2017.03-rc1-00058-g1216f9a0851f (Feb 07 2017 - 13:55:38 +0530) CPU : AM335X-GP rev 1.0 Model: TI AM335x EVM-SK DRAM: 256 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 reading uboot.env ERROR: No USB device found at ../drivers/usb/gadget/ether.c:2709/usb_ether_init() Net: ar8031_config: value read back 0x2c47, written: 0x2d47 eth0: ethernet@4a100000 Hit any key to stop autoboot: 0 Thanks, Sekhar ---8<--- diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index b34cdd3d87dc..5c0a36676ce9 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -28,12 +28,18 @@ static int ar8021_config(struct phy_device *phydev) static int ar8031_config(struct phy_device *phydev) { + int regval; + if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval = phy_read(phydev, MDIO_DEVAD_NONE, + AR803x_PHY_DEBUG_DATA_REG); + printf("%s: value read back 0x%x, written: 0x%x\n", + __func__, regval, regval | AR803x_RGMII_TX_CLK_DLY); phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_DATA_REG, - AR803x_RGMII_TX_CLK_DLY); + regval | AR803x_RGMII_TX_CLK_DLY); } if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||