Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758948AbeAIPyi (ORCPT + 1 other); Tue, 9 Jan 2018 10:54:38 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:60910 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758665AbeAIPyg (ORCPT ); Tue, 9 Jan 2018 10:54:36 -0500 Date: Tue, 9 Jan 2018 16:54:11 +0100 From: Antoine Tenart To: Russell King - ARM Linux Cc: Antoine Tenart , davem@davemloft.net, kishon@ti.com, andrew@lunn.ch, gregory.clement@free-electrons.com, mw@semihalf.com, stefanc@marvell.com, ymarkman@marvell.com, thomas.petazzoni@free-electrons.com, miquel.raynal@free-electrons.com, nadavh@marvell.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support Message-ID: <20180109155411.GD23676@kwain> References: <20180109085945.11916-1-antoine.tenart@free-electrons.com> <20180109085945.11916-5-antoine.tenart@free-electrons.com> <20180109144447.GI17719@n2100.armlinux.org.uk> <20180109151735.GB23676@kwain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180109151735.GB23676@kwain> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Russell, On Tue, Jan 09, 2018 at 04:17:35PM +0100, Antoine Tenart wrote: > On Tue, Jan 09, 2018 at 02:44:48PM +0000, Russell King - ARM Linux wrote: > > On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > > > val |= MVPP2_GMAC_CONFIG_GMII_SPEED | > > > MVPP2_GMAC_CONFIG_FULL_DUPLEX; > > > + else if (port->phy_interface == PHY_INTERFACE_MODE_2500BASEX) > > > + val |= MVPP2_GMAC_CONFIG_GMII_SPEED | > > > + MVPP2_GMAC_CONFIG_MII_SPEED | > > > + MVPP2_GMAC_CONFIG_FULL_DUPLEX; > > > > I think you'll find you don't need to set MII_SPEED here, since > > MII_SPEED selects between 10 and 100, GMII_SPEED always takes > > precidence selecting 1000, and 2500 is done by the comphy > > increasing the clocks by 2.5x. > > I just had a look at the datasheet, and as you say it seems GMII_SPEED > takes over MII_SPEED. I'll see if there is a corner case here or if > selecting MII_SPEED doesn't make sense, and update accordingly. I just checked, this can be removed for this mode. I'll update the patch. Thanks! Antoine -- Antoine T?nart, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com