Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp430569ybi; Fri, 21 Jun 2019 02:04:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkJXZYKklNdEHFZjvB1YF2+p2YM3ug5CHrN2JP+mFicoY7RNsLMXUXaPPNFKBY+BZKVP3t X-Received: by 2002:a17:90a:9b88:: with SMTP id g8mr5295628pjp.100.1561107878144; Fri, 21 Jun 2019 02:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561107878; cv=none; d=google.com; s=arc-20160816; b=cdQCva4/gdinzzMAtAJ5uz81K+6z/jvmpONe68amyuU6v/nu9JnZtbbPJBKYrERBlC jBEYrALGuM2KPBOH6IMRakj6w21lagRybRGm2weOhn2Zxgf/0DY9rzCIO4AcKoKcqY8B 5Yzv0jaHqTgV+FRLiqBDpfA6KRgKKpskv0OtehxWqMTddxhb9XFqeOCoQYNfjVkls9jb wj1G+k6u20HQJPiUoim3IXhHdmTo9mipU9BkpbM/K4ampuOvQfUf1PmZyQo34knRHUSp m5yRuMDKXFuPwM8YJ7Z/hqsxImZxMcHaLPD2Dwf/PlmXOGm1jOlJhcTS4JrwzRlJKkun imtQ== 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=Z/vrGL+hnN6XNQ43GJSsHqsTwEI017tyqqk0CCrmcjg=; b=Ht5DMf8vrJkMcA2btER59qmag7DOmAQlQWSeiFxR7PC1YRt0kZFf+T0VgszTkFOnpk qx1rPG8gVcO9vI/+T+CGLMBm4UjrOA0y7R62LQcvsjsnsZgsYD2gfaK0j4jZg6dW7Qls kkujU4HFM+gYPcvjhcjBJ2kO3vg6g7AU8I7tnLL/+0jWAmwwKj7n0GjuB1G1MfQ/gt3D c7u+t3SFIUkY9NqjtafVz3MkyJG5QA/XdscOiSn8wWpJrakIbtAsQfui/DvWOlk3PlNe GYPZUUci3t6qNjGp+denQHH3p5XQP7Grvkr6x9fn6bM5Wi7EyXKxKi6qYwbgXIrRkxdp 2pwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=hHLAXTyT; 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 e1si2197720pjr.28.2019.06.21.02.04.21; Fri, 21 Jun 2019 02:04:38 -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=hHLAXTyT; 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 S1726656AbfFUJDY (ORCPT + 99 others); Fri, 21 Jun 2019 05:03:24 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:38242 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbfFUJDX (ORCPT ); Fri, 21 Jun 2019 05:03:23 -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=Z/vrGL+hnN6XNQ43GJSsHqsTwEI017tyqqk0CCrmcjg=; b=hHLAXTyTKk+f6P3ai3jU2yJL1 TjZE8LsMp5pT6hxylcX6uRTXh+9EymIy0MYL8eRgCfX+Ha/2LQ8twWzpM3ou71le940xrTlTrYWTR Mnmx+WNjeCWcvSB6bHVzU8z32HthcD8oE8qhYxNlZKfYcBJ+rzbJ0KZHKjTMQMQPVxHMvlyHh2ghi Up+f8+gN4BbFtRCD14azsoFPdCewlgayeuMXFDSEreQJji2u9Yk7noToMCF4qfy9JrVteeOtTyvPb IEL8dIduaoRniyVBmi3NzCS6mBEVG/x7ZyZsEMfqf8tzPmrdQd/AZhzbmRH0LXEr3PmIGMDe+bJAb 5/2tv8FDg==; Received: from shell.armlinux.org.uk ([2002:4e20:1eda:1:5054:ff:fe00:4ec]:58946) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1heFS0-00049H-3a; Fri, 21 Jun 2019 10:03:16 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1heFRy-00038K-2T; Fri, 21 Jun 2019 10:03:14 +0100 Date: Fri, 21 Jun 2019 10:03:13 +0100 From: Russell King - ARM Linux admin To: Parshuram Thombare Cc: andrew@lunn.ch, nicolas.ferre@microchip.com, davem@davemloft.net, f.fainelli@gmail.com, netdev@vger.kernel.org, hkallweit1@gmail.com, linux-kernel@vger.kernel.org, rafalc@cadence.com, aniljoy@cadence.com, piotrs@cadence.com Subject: Re: [PATCH v3 2/5] net: macb: add support for sgmii MAC-PHY interface Message-ID: <20190621090313.xuaqvmyxxrzxh5aw@shell.armlinux.org.uk> References: <1561106037-6859-1-git-send-email-pthombar@cadence.com> <1561106090-8465-1-git-send-email-pthombar@cadence.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1561106090-8465-1-git-send-email-pthombar@cadence.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 09:34:50AM +0100, Parshuram Thombare wrote: > This patch add support for SGMII interface) and > 2.5Gbps MAC in Cadence ethernet controller driver. Also, I'm not sure that merely using PHY_INTERFACE_MODE_SGMII with a speed of 2.5Gbps is really on for up-clocked SGMII. Cisco SGMII is defined as running at a fixed 1.25Gbps with the control word indicating whether the negotiated speed is 1G, 100M or 10M, and the MAC and PHY expect symbols to be replicated the appropriate number of times for the slower speeds. Cisco SGMII as defined does not support 2.5Gbps. The same is true of 802.3z - this defines 1000BASE-X, but we also have an up-clocked version which we use a separate phy interface mode for when supporting 2.5Gbps, since it requires both ends to be configured differently. This appears to be the case with your 2.5Gbps up-clocked SGMII - the MAC needs to be told to up-clock the link. So, I'm wondering whether we need PHY_INTERFACE_MODE_2500SGMII, which means that if the PHY automatically selects between 1G and 2.5G SGMII, then it needs to automatically change its interface mode reported back to the MAC - that is, providing it really _does_ use an up-clocked 2.5Gbps SGMII and doesn't actually switch to 2.5Gbps BASE-X instead. Other PHYs (the 10G Marvell 88x3310) dynamically switch their MAC facing interface between 10GBASE-R, 2500BASE-X and SGMII depending on the negotiated link speed, so there is precedent for this already. Finally, note that it is possible for a mismatched SGMII / BASE-X link to come up and appear to work, but either end is going to be interpreting the 16-bit control word differently, which is obviously incorrect. Please ensure that details such as "SGMII" vs "BASE-X" are as correct as possible. -- 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