Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5993189ybe; Tue, 17 Sep 2019 17:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyr40JWckEsFWbaKMhzrR8lx6GhHNL4XREMnkd4ymBCp8C2kwRxAwMPrsBg2bG58b4EzgrZ X-Received: by 2002:a05:6402:32f:: with SMTP id q15mr5276603edw.143.1568767099287; Tue, 17 Sep 2019 17:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568767099; cv=none; d=google.com; s=arc-20160816; b=qzWOFWuAnLr7d5Usj6NkDkXn/1uqVlMq7THuNhD4WADFNLc8CvePG8W5JM70z5KX62 1qTaqGdJ3qoumnFj+1UAcYTQehJ2fPogSuMxttMkNDlMNgc0pgzOHsPqVffTPEMuuSKN hg9mNxPJA+Ei0460w3pHxDc6/77Ad8gFn2c5Y7FnR+GDKGo4BLchddFdQcC0c/NUDE2c CcxMN+6aa4IjOR1is8Z0kJGDLPp5H21iEA4ygBHlek3jkg/l4QHq0QYudSDPwJAyqoh2 O2JqSAWA5lTvsW9PA07EItJ1kb0PiVxP/e9gALDT4TtdafEC7tQDUrFzKmfxKyj5Sou9 oh8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Abx4F+jwfMTtLUNyxvhKvVfgeehUhHffQfO59dPVzBw=; b=sMMnQYl5PDGUaRBzSyuBwnEbzdYaWh+mZpvW4pBgLFBeoAZZ3pqy9BIF+JoThGzlJL GWsgGLU5Vge99VOaNa+xAkefaMYpMm8sxY3kwQNq7Beh1m3/TtIkJh3lVdnVY1L/Wcyb +6I8LTLIF9AgrnjUgqppWLURbyUD52fza4WHTVcPZkU5J4TIrAoAlRVsv1O69zwnX1gM FUMG2/KHeGCVOaFP7LapDaV+TXq0JywYZSJCoGzGg2UXRecUJl4m+fP0Vzp83lYeEcx2 S8i7Qak1bKrLum+ydKHJ0UNmUwHUbgl8gI8O85AvzugYEVREp9yhkTtBXBQEz/brVv+F jA4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=u1tOKegF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a26si2349887edv.35.2019.09.17.17.37.55; Tue, 17 Sep 2019 17:38:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=u1tOKegF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbfIQVmT (ORCPT + 99 others); Tue, 17 Sep 2019 17:42:19 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:47296 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfIQVmT (ORCPT ); Tue, 17 Sep 2019 17:42:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Abx4F+jwfMTtLUNyxvhKvVfgeehUhHffQfO59dPVzBw=; b=u1tOKegFJUc9oNAXUMrowBe6t iSId7UHGw8DY7GFuW0EYnNtI5SS6w4mX6cD8gSmefCRb+N824LNIPTzXf1/4YGG0BFfzxQqMoObSZ LfMACLLy+j9oFRNcw+MdfXOYe4T+e3KF4tW7S2fgYgGprjml5pz292h05s+6Jor5vQc4grFhCQwVF ucHSFoeguoJbs1R74HGKDwjPvCG1cB2OavYY7cIsOTxrPlGtd514CzqYPKSPV2tmxkNWh/GarOWB2 lCrmanipMghHbtgJk2wvBcoQbKmY5/HFYg9eGdcpOPdGmYGmV9PfYsMjNLowLg2UTeTraZI1use1/ 55U7FD6hw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44930) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iALEb-0004Hs-3X; Tue, 17 Sep 2019 22:42:05 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iALEX-0001dO-MT; Tue, 17 Sep 2019 22:42:01 +0100 Date: Tue, 17 Sep 2019 22:42:01 +0100 From: Russell King - ARM Linux admin To: tinywrkb Cc: Mark Rutland , Andrew Lunn , Baruch Siach , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Fabio Estevam , Sascha Hauer , open list , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] ARM: dts: imx6dl: SolidRun: add phy node with 100Mb/s max-speed Message-ID: <20190917214201.GB25745@shell.armlinux.org.uk> References: <20190915135652.GC3427@lunn.ch> <20190917124101.GA1200564@arch-dsk-01> <20190917125434.GH20778@lunn.ch> <20190917133253.GA1210141@arch-dsk-01> <20190917133942.GR25745@shell.armlinux.org.uk> <20190917151707.GV25745@shell.armlinux.org.uk> <20190917153027.GW25745@shell.armlinux.org.uk> <20190917163427.GA1475935@arch-dsk-01> <20190917170419.GX25745@shell.armlinux.org.uk> <20190917171913.GY25745@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190917171913.GY25745@shell.armlinux.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 17, 2019 at 06:19:13PM +0100, Russell King - ARM Linux admin wrote: > whether you can get the link to come up at all. You might need to see > whether wiggling the RJ45 helps (I've had that sort of thing with some > cables.) > > You might also need "ethtool -s eth0 advertise ffcf" after trying that > if it doesn't work to take the gigabit speeds out of the advertisement. > > Thanks. > > drivers/net/phy/at803x.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c > index b3893347804d..85cf4a4a5e81 100644 > --- a/drivers/net/phy/at803x.c > +++ b/drivers/net/phy/at803x.c > @@ -296,6 +296,11 @@ static int at803x_config_init(struct phy_device *phydev) > if (ret < 0) > return ret; > > + /* Disable smartspeed */ > + ret = phy_modify(phydev, 0x14, BIT(5), 0); > + if (ret < 0) > + return ret; > + > /* The RX and TX delay default is: > * after HW reset: RX delay enabled and TX delay disabled > * after SW reset: RX delay enabled, while TX delay retains the Hi, Could you try this patch instead - it seems that the PHY needs to be soft-reset for the write to take effect, and _even_ for the clearance of the bit to become visible in the register. I'm not expecting this on its own to solve anything, but it should at least mean that the at803x doesn't modify the advertisement registers itself. It may mean that the link doesn't even come up without forcing the advertisement via the ethtool command I mentioned before. Thanks. drivers/net/phy/at803x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index b3893347804d..69a58c0e6b42 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -296,6 +296,16 @@ static int at803x_config_init(struct phy_device *phydev) if (ret < 0) return ret; + /* Disable smartspeed */ + ret = phy_modify(phydev, 0x14, BIT(5), 0); + if (ret < 0) + return ret; + + /* Must soft-reset the PHY for smartspeed disable to take effect */ + ret = genphy_soft_reset(phydev); + if (ret < 0) + return ret; + /* The RX and TX delay default is: * after HW reset: RX delay enabled and TX delay disabled * after SW reset: RX delay enabled, while TX delay retains the -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up