Received: by 2002:a05:7412:a9a3:b0:f9:93eb:408e with SMTP id o35csp65789rdh; Wed, 20 Dec 2023 23:17:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFF4LBr8Lt4ODCO0cBLKLADyoVCIcjcJ2j45fgw05C74X7L8zwM01wDPjkY+t5gQic7QPmL X-Received: by 2002:a05:6870:7010:b0:204:4f0:d015 with SMTP id u16-20020a056870701000b0020404f0d015mr1198277oae.39.1703143038357; Wed, 20 Dec 2023 23:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703143038; cv=none; d=google.com; s=arc-20160816; b=p6afUBbEpBxBvtGrUm0L08PaZmXtnk8AU77f6OyWsjGMhLc7zttDxwrpEpjZYfEy2F P6KkxYzjW4NIWYTn9eWf5dTM6baTl1u5+jF0Ruox9gLInAPRKKKuoXpbnvMyvXt1kkXO GoLkMu8iaMFf08HuDpRN+ytLorf7D+lnLoNqR0r8FrlfiZIDWqaP/pF6PR9HkKQ3Ehjz 9CLPnffGrkBXOAl5wsK6a3yojlSQhKta2+SOEWxhfCSiE5ZgDk5lRu1HSDzwSEpsCr3H F0nHyBupNuUvWvlB7ZypOecf4L8UNbrELONbC0aplhsQ4fA3JORuCpiw/Y2GKYoQNd40 s3aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:mail-followup-to:message-id:subject :cc:to:from:date; bh=ZqCo3c3ycZ61V9SfH/VPYwsvjKi3/9CcXxaZZvWMD4c=; fh=Rfk8kVolcHBGLMAHBBoJUh/kV1aTUVN5jPdrdLaraHM=; b=TA07MXbqkA4H98fQcpoqQ2NPZNtKJlBX1akifMJanoNx1wlDJdwhwDp+zwozMgeJQj Cd/FHgSyvomGzBqmwMnWT9lBVV7v06pZgNF5suYXXlTHUjwzIj0vYfv6/rizTGGsIK95 mUZTBCrT9p2Bb8QMegyWV1Szc1StmVPg9SZYMjaAI1+94283gjt8RT6vOIA/Ug2d7Nzs H9DmEKL+tggJKUKC+x9vNh0mLHgFSGkK/CfrMnA+bezognaCH5P5DbcgD8q1aLh46erQ AA2ZfxJaxypE2rcxGOgFx6qdUzi/W/w7lDDR4NfpoLAqQv583GADk3NyXQRl22X5uHYo Zm4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7925-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i25-20020a635419000000b005bdbf2ac2d2si1102586pgb.85.2023.12.20.23.17.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 23:17:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-7925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7925-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 042B42828AC for ; Thu, 21 Dec 2023 07:17:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D25811733; Thu, 21 Dec 2023 07:17:05 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from out28-81.mail.aliyun.com (out28-81.mail.aliyun.com [115.124.28.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C412BE6B; Thu, 21 Dec 2023 07:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sjterm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sjterm.com X-Alimail-AntiSpam:AC=CONTINUE;BC=0.1523255|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0672332-0.00579752-0.926969;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047198;MF=fuyao@sjterm.com;NM=1;PH=DS;RN=19;RT=16;SR=0;TI=SMTPD_---.Vpa1iLw_1703143015; Received: from localhost(mailfrom:fuyao@sjterm.com fp:SMTPD_---.Vpa1iLw_1703143015) by smtp.aliyun-inc.com; Thu, 21 Dec 2023 15:16:56 +0800 Date: Thu, 21 Dec 2023 15:16:54 +0800 From: fuyao To: Jernej =?utf-8?Q?=C5=A0krabec?= Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chen-Yu Tsai , Samuel Holland , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org, =?utf-8?B?6bqm5YGl5bu6?= Subject: Re: [PATCH] gmac: sun8i: r40: add gmac tx_delay support Message-ID: Mail-Followup-To: Jernej =?utf-8?Q?=C5=A0krabec?= , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chen-Yu Tsai , Samuel Holland , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org, =?utf-8?B?6bqm5YGl5bu6?= References: <2370947.NG923GbCHz@jernej-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2370947.NG923GbCHz@jernej-laptop> Organization: work_work_work On Wed, Dec 20, 2023 at 06:04:28PM +0100, Jernej Škrabec wrote: > Dne sreda, 20. december 2023 ob 10:08:25 CET je fuyao napisal(a): > > r40 can support tx_delay, so we add it. > > I don't see how. User manual, 3.3.4.64. GMAC Clock Register talks only > about RX delay. > I don't see it in the user manual also. it works fine in 100M, but it doesn't work good in 1G without tx_delay in my board. Read the sdk from allwinner I found in: https://sourcegraph.com/github.com/tinalinux/linux-3.10/-/blob/arch/arm/boot/dts/sun8iw11p1.dtsi?L1826 https://sourcegraph.com/github.com/tinalinux/linux-3.10@r40-v1.y/-/blob/drivers/net/ethernet/allwinner/sunxi-gmac.c?L877 And I add it to my board, it works fine. So, I think it may be exist register but not documented. Best regards, fuyao > Best regards, > Jernej > > > > > Signed-off-by: fuyao > > --- > > drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c > > index 137741b94122..fd07573afc9b 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c > > @@ -127,6 +127,7 @@ static const struct emac_variant emac_variant_r40 = { > > .support_mii = true, > > .support_rgmii = true, > > .rx_delay_max = 7, > > + .tx_delay_max = 7, > > }; > > > > static const struct emac_variant emac_variant_a64 = { > > > > > >