From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E4EEC2BA83 for ; Wed, 12 Feb 2020 17:19:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7BF72082F for ; Wed, 12 Feb 2020 17:19:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="TF3BD4Z0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728576AbgBLRTr (ORCPT ); Wed, 12 Feb 2020 12:19:47 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:43056 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbgBLRTq (ORCPT ); Wed, 12 Feb 2020 12:19:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender: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=rkM9QGmsqKaUtiT8wCi5xafHwiZcklUGCeleqBo8SCM=; b=TF3BD4Z07Dig+7/BleThInvxyJ s+g7cYYr9Gij0deR+kCx/edpUOEv05/YEwrkbMkEhnQKE+/E8wj7tKHjB+SriAnYi03a466Ay54RA 3OhEWWx1/1F2QZ2wFlIR4GP37Jb30vq0xUFKw16FCn/2T0sDnWQN0UB/6059Hmi5ITds=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1j1vfr-0006lH-0S; Wed, 12 Feb 2020 18:19:43 +0100 Date: Wed, 12 Feb 2020 18:19:42 +0100 From: Andrew Lunn To: Tim Harvey Cc: netdev , open list , rrichter@marvell.com, linux-arm-kernel@lists.infradead.org, David Miller , sgoutham@marvell.com Subject: Re: [PATCH] net: thunderx: use proper interface type for RGMII Message-ID: <20200212171942.GR19213@lunn.ch> References: <1581108026-28170-1-git-send-email-tharvey@gateworks.com> <20200207210209.GD19213@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 08:55:39AM -0800, Tim Harvey wrote: > On Fri, Feb 7, 2020 at 1:02 PM Andrew Lunn wrote: > > > > On Fri, Feb 07, 2020 at 12:40:26PM -0800, Tim Harvey wrote: > > > The configuration of the OCTEONTX XCV_DLL_CTL register via > > > xcv_init_hw() is such that the RGMII RX delay is bypassed > > > leaving the RGMII TX delay enabled in the MAC: > > > > > > /* Configure DLL - enable or bypass > > > * TX no bypass, RX bypass > > > */ > > > cfg = readq_relaxed(xcv->reg_base + XCV_DLL_CTL); > > > cfg &= ~0xFF03; > > > cfg |= CLKRX_BYP; > > > writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL); > > > > > > This would coorespond to a interface type of PHY_INTERFACE_MODE_RGMII_RXID > > > and not PHY_INTERFACE_MODE_RGMII. > > > > > > Fixing this allows RGMII PHY drivers to do the right thing (enable > > > RX delay in the PHY) instead of erroneously enabling both delays in the > > > PHY. > > > > Hi Tim > > > > This seems correct. But how has it worked in the past? Does this > > suggest there is PHY driver out there which is doing the wrong thing > > when passed PHY_INTERFACE_MODE_RGMII? > > > > Reviewed-by: Andrew Lunn > > > > Andrew, > > Yes, the DP83867 phy driver used on the Gateworks Newport boards would > configure the delay in an incompatible way when enabled. Hi Tim So it was broken? Maybe find the appropriate Fixes tag, and have David add it to stable? Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19629C352A4 for ; Wed, 12 Feb 2020 17:20:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D62B82082F for ; Wed, 12 Feb 2020 17:20:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DAcLRrS1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="TF3BD4Z0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D62B82082F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3mfVfGIcwpUMeOp0GD8qO5MhjjgpOKtNJ4vC4CX20k8=; b=DAcLRrS184u5eF 7muvQlwhTRQUNhsnhyK5EHpdKFOBhRyvo4oiQoK8Vixr5bvpc2IXBxcLGCdNzTIedrt05O2HfQ9PJ oLKPMadFzR9ItQpCdS4DYv+WKbiyYuem36d1aDxwZxcnWeA4eAdTCM8q+lAkkEw4R0AYaoybnpOQA pyvuNg6TAr/aRW/bnaGcM3Fk48DRi2m5Dl7FJ+YzrutnsNlnzCiMLsAuLkNkbGDuoXXlm/RFPbrDN Zzn4ZvKinvn+joZd+Z1KKITwX+HGp7nPJWMNUFi4Jfl1LUD84jCWv6GPkp5vk7Qlj33xh67s5Sqw5 7mpxgReh2HQY9yVcWUWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1vg2-0006GY-29; Wed, 12 Feb 2020 17:19:54 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1vfz-0006Fo-9C for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2020 17:19:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender: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=rkM9QGmsqKaUtiT8wCi5xafHwiZcklUGCeleqBo8SCM=; b=TF3BD4Z07Dig+7/BleThInvxyJ s+g7cYYr9Gij0deR+kCx/edpUOEv05/YEwrkbMkEhnQKE+/E8wj7tKHjB+SriAnYi03a466Ay54RA 3OhEWWx1/1F2QZ2wFlIR4GP37Jb30vq0xUFKw16FCn/2T0sDnWQN0UB/6059Hmi5ITds=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1j1vfr-0006lH-0S; Wed, 12 Feb 2020 18:19:43 +0100 Date: Wed, 12 Feb 2020 18:19:42 +0100 From: Andrew Lunn To: Tim Harvey Subject: Re: [PATCH] net: thunderx: use proper interface type for RGMII Message-ID: <20200212171942.GR19213@lunn.ch> References: <1581108026-28170-1-git-send-email-tharvey@gateworks.com> <20200207210209.GD19213@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200212_091951_323940_3312FF30 X-CRM114-Status: GOOD ( 16.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev , open list , rrichter@marvell.com, linux-arm-kernel@lists.infradead.org, David Miller , sgoutham@marvell.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 12, 2020 at 08:55:39AM -0800, Tim Harvey wrote: > On Fri, Feb 7, 2020 at 1:02 PM Andrew Lunn wrote: > > > > On Fri, Feb 07, 2020 at 12:40:26PM -0800, Tim Harvey wrote: > > > The configuration of the OCTEONTX XCV_DLL_CTL register via > > > xcv_init_hw() is such that the RGMII RX delay is bypassed > > > leaving the RGMII TX delay enabled in the MAC: > > > > > > /* Configure DLL - enable or bypass > > > * TX no bypass, RX bypass > > > */ > > > cfg = readq_relaxed(xcv->reg_base + XCV_DLL_CTL); > > > cfg &= ~0xFF03; > > > cfg |= CLKRX_BYP; > > > writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL); > > > > > > This would coorespond to a interface type of PHY_INTERFACE_MODE_RGMII_RXID > > > and not PHY_INTERFACE_MODE_RGMII. > > > > > > Fixing this allows RGMII PHY drivers to do the right thing (enable > > > RX delay in the PHY) instead of erroneously enabling both delays in the > > > PHY. > > > > Hi Tim > > > > This seems correct. But how has it worked in the past? Does this > > suggest there is PHY driver out there which is doing the wrong thing > > when passed PHY_INTERFACE_MODE_RGMII? > > > > Reviewed-by: Andrew Lunn > > > > Andrew, > > Yes, the DP83867 phy driver used on the Gateworks Newport boards would > configure the delay in an incompatible way when enabled. Hi Tim So it was broken? Maybe find the appropriate Fixes tag, and have David add it to stable? Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel