From patchwork Mon Mar 21 17:30:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karsten Merker X-Patchwork-Id: 600211 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 3qTNBn5Drmz9s4n for ; Tue, 22 Mar 2016 04:30:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AFCCEA74D6; Mon, 21 Mar 2016 18:30:21 +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 jFHqOFK431wG; Mon, 21 Mar 2016 18:30:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2FB07A7498; Mon, 21 Mar 2016 18:30:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A5A6A7498 for ; Mon, 21 Mar 2016 18:30:17 +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 ktYi5rZqsJ90 for ; Mon, 21 Mar 2016 18:30:17 +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 mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by theia.denx.de (Postfix) with ESMTPS id 19E18A748F for ; Mon, 21 Mar 2016 18:30:12 +0100 (CET) Received: from excalibur.cnev.de ([84.44.187.95]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0MTbOB-1aJbzP1zZ1-00SRkn; Mon, 21 Mar 2016 18:30:04 +0100 Received: from karsten by excalibur.cnev.de with local (Exim 4.84_2) (envelope-from ) id 1ai3eS-0005d2-As; Mon, 21 Mar 2016 18:30:00 +0100 Date: Mon, 21 Mar 2016 18:30:00 +0100 From: Karsten Merker To: Hans de Goede , Michael Haas , Chen-Yu Tsai Message-ID: <20160321173000.GD4751@excalibur.cnev.de> References: <56EA4097.3010500@computerlinguist.org> <56EA8C5E.1070701@redhat.com> <56EC78F7.80507@computerlinguist.org> <56ed1046.857ac20a.dc7f4.ffffb08e@mx.google.com> <56ED1C96.30708@redhat.com> <56ED56BF.8040304@computerlinguist.org> <56EEA975.6060301@redhat.com> <56EEC18A.1040807@computerlinguist.org> <56EEF128.4020704@redhat.com> <20160321154714.GA4751@excalibur.cnev.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160321154714.GA4751@excalibur.cnev.de> X-No-Archive: yes User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:4Jysg8se99Zwp6/f5J3Xdbi6aFzmyr/JGgBIoStr8ugOa7tBgBK itBPzSRd+TzcrpKALWh3fA5nWmy1iyjF7qCxwLHtNnwNxz17yY7j2VHTd+sPO9ZbyJBaOwY 0KY1JYvTjTFIvd2/Xas0I/LIePfvD+1XQv2DYEmwbh8pUpz8JBr07AK7KYORhVscyJtLKkm r9PcSeSKE95PTDOp7PztQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:uCV0M45SIuA=:3TPjTpOnd7AuSEbm5YGqSC sbA5uwqrwls4xO2hiN4W7XXfLPmsjrPw/DJS8ercC8K65X+DJtH1CT+BVOf/5Lv9vjC9JEz11 zOIxxyGbGAzfkJy1mUpNEAcLoLQcTIxo8Bx7S387mu3DUIP4CwAnWQGPAdPGDAx6GEPDzuSpj gAaejVJaQd0ADuGWPJCU3+aTI4D5RQ5srYnCXx45BHoNWheWbW+OfU2bNbpXHYnbA6x11iqNZ cYT8wXrCeS51qtkXduYFDhzBmP9B4+gAAwi1gZXUkfNoWOP6nWKX4QMDaDE/f37dzRLKqFv3V 62Xr1PUV2SipsOgziM12On1vzSx3bgHUI1c9hqE+yA6odXIE9o4vHcSPqF5+IST/JQ64U+CB7 EIC01r5askPh9LcMqkNOyMLCTUwWxb4juh0lnGPK2n6IbQosdYLTCibpVon9htvo+FjbWaZZm kzhhTf167JJ1Cn95FMO8JrCOX5klEAdZ+FtSYrlQR0fvLN0aJmfFXsXJ0bKI4xkgD3feKXUma UI8XfNPIPDXQB6IzW++TiNW5LRYXBLc7MOmC/YteNpljqAY1eUTqT1KaHFpud664oPEV5WEwh OxEbkSOB/iZN0jX6VIyRrQMxcU55fSFPgiGDXj4UHB2ha1TR+meoqJChMIjs1XB/mZs2pgoKq /xbF/9U6FMAKUGuRf1CIB5zTnJKU12ypmqAxYZ056+RjtndCJUUvVp1dIXP3sfhe7Frc= Cc: Ian Campbell , "u-boot@lists.denx.de" Subject: Re: [U-Boot] [PATCH] Add CONFIG_GMAC_TX_DELAY=4 for OlinuXino Lime2 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 Mon, Mar 21, 2016 at 04:47:15PM +0100, Karsten Merker wrote: > On Sun, Mar 20, 2016 at 07:51:20PM +0100, Hans de Goede wrote: > > On 20-03-16 16:28, Michael Haas wrote: > > >On 03/20/2016 02:45 PM, Hans de Goede wrote: > > >>On 19-03-16 14:40, Michael Haas wrote: > > >>>0xA was set to 7800 for working runs and 3800 for broken runs. The > > >>>difference is bit 14 in the GBSR: 'MASTER/SLAVE Configuration > > >>>Resolution'. In the broken runs, the autonegotation configured the > > >>>OlinuXino to 'slave'. I have whipped up a quick patch which disable the > > >>>master/slave part of the autonegotiation and force master mode. > > >>>diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c > > >>>index 51b5746..484b2be 100644 > > >>>--- a/drivers/net/phy/phy.c > > >>>+++ b/drivers/net/phy/phy.c > > >>>@@ -170,6 +170,7 @@ int genphy_restart_aneg(struct phy_device *phydev) > > >>> int genphy_config_aneg(struct phy_device *phydev) > > >>> { > > >>> int result; > > >>>+ phy_write(phydev, MDIO_DEVAD_NONE, 0x09, 0x1A00); > > >>> > > >>> if (AUTONEG_ENABLE != phydev->autoneg) > > >>> return genphy_setup_forced(phydev); > > >>> > > >I was going to add that in realtek.c, not in phy.c - as soon as I figure > > >out which section there is applicable. Unfortunately the issue is now split over two threads - this one and the "Which entry in drivers/net/phy/realtek.c matches my device?" thread. It looks like we have three related but separate issues here: a) The sunxi config doesn't actually build the phy drivers: include/configs/sunxi-common.h contains: 302 /* Ethernet support */ 303 #ifdef CONFIG_SUNXI_EMAC 304 #define CONFIG_PHY_ADDR 1 305 #define CONFIG_MII /* MII PHY management */ 306 #define CONFIG_PHYLIB 307 #endif 308 309 #ifdef CONFIG_SUNXI_GMAC 310 #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ 311 #define CONFIG_PHY_ADDR 1 312 #define CONFIG_MII /* MII PHY management */ 313 #endif For the sunxi EMAC case (which is AFAIK only used on A10/A13) CONFIG_PHYLIB is enabled, but for the CONFIG_SUNXI_GMAC case (all other sunxi-based systems) we don't enable any PHY driver. So we either need to enable CONFIG_PHYLIB for CONFIG_SUNXI_GMAC as well or enable the relevant PHY drivers (do we actually have anything besides realtek on sunxi-based systems?) separately, i.e. something like b) The realtek PHY driver (drivers/net/phy/realtek.c) doesn't match on the RTL8211CL PHY ID, so even if it is compiled in, it still doesn't work. For more details on this issue, see the "Which entry in drivers/net/phy/realtek.c matches my device?" thread. c) The master/slave mode problem that can be worked around by forcing master mode on the RTL8211CL. Regards, Karsten diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b26363d..ea15e37 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -310,6 +310,7 @@ extern int soft_i2c_gpio_scl; #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ #define CONFIG_PHY_ADDR 1 #define CONFIG_MII /* MII PHY management */ +#define CONFIG_PHY_REALTEK #endif #ifdef CONFIG_USB_EHCI_HCD