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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 59A81D2C556 for ; Tue, 22 Oct 2024 13:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=8QLl2gYAfuWCSnXDQr1Or46Kp7fejxm5qJIeUTuCA/s=; b=rfQUTw1WL0zdtS Lx+DgwgsHmoB8l3iAIbXi0By7GkaLWh0vbIp4TyqQCYBKjPXex+az5rHrqtIGuIpLRANFYAcwn+ua EvGWNelL1HwvPuMfuCLlSZ6cUdIziQEQQBKdKSG5ZrnK1nyrY6ha9rPvgwjawpz+k1Qa8lnQey8Ds G39uwzkQPlaJZjjDcjK02F09Tbi366VpfvWQ3VH6hDRt0qCEpCnmEFiCCFrhJSJYSQ51wueL+OF3w KqMqaIr6nLMmmzpFV2iW+buFaD7yv+92MhMocvUgYjFQ/2KscNXS8xjMUjg6ET+gJhjd6aWKbXgNA 4yyiiuUywGzj7lCRRu5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3FK3-0000000B1Fj-48xB; Tue, 22 Oct 2024 13:53:19 +0000 Received: from vps0.lunn.ch ([156.67.10.101]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3FIL-0000000B0zA-0l3z; Tue, 22 Oct 2024 13:51:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=EvgeLiQ1i9RqfW0Xm0MuToc51LBco8luwq4fL+Inhzc=; b=xooZKAgd7OkHixgbYVMEcGcidL a+SWF6BNyNSjY6eJy8yQGbXPowzJ4G1vD/u8Lrbngi4UPc8IU6Mww6P7m85HQiZWAIQW97HQ2s5BI tQxjhR9NLctB2XtWz3xWo3JoopalvpzvS+1/PA3XzVs0c4WbTQ4IISKXeVRRcle51beQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1t3FHw-00Aqeu-KD; Tue, 22 Oct 2024 15:51:08 +0200 Date: Tue, 22 Oct 2024 15:51:08 +0200 From: Andrew Lunn To: Inochi Amaoto Cc: Chen Wang , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Inochi Amaoto , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Giuseppe Cavallaro , Yixun Lan , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 4/4] net: stmmac: Add glue layer for Sophgo SG2044 SoC Message-ID: <66f35d1b-fd26-429b-bbf9-d03ed0c1edaf@lunn.ch> References: <20241021103617.653386-1-inochiama@gmail.com> <20241021103617.653386-5-inochiama@gmail.com> <227daa87-1924-4b0b-80db-77507fc20f19@lunn.ch> <65720a16-d165-4379-a01f-54340fb907df@lunn.ch> <424erlm55tuorjvs2xgmanzpximvey22ufhzf3fli7trpimxih@st4yz53hpzzr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <424erlm55tuorjvs2xgmanzpximvey22ufhzf3fli7trpimxih@st4yz53hpzzr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_065133_238341_CCCC9975 X-CRM114-Status: GOOD ( 20.60 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Oct 22, 2024 at 06:21:49PM +0800, Inochi Amaoto wrote: > On Mon, Oct 21, 2024 at 03:27:18PM +0200, Andrew Lunn wrote: > > > It is related to the RGMII delay. On sg2044, when the phy > > > sets rx-delay, the interal mac is not set the same delay, > > > so this is needed to be set. > > > > This is the wrong way to do it. Please look at how phy-mode should be > > used, the four different "rgmii" values. Nearly everybody gets this > > wrong, so there are plenty of emails from me in the netdev list about > > how it should be done. > > > > The phy-mode is alreay set to the "rgmii-id" and a rx delay is already > set (a default tx delay is set by the phy driver). In the scenario > the extra bit is used to fix 2ns difference between the sampling clock > and data. It is more like an extra setting and the kernel can not handle > it by only setting the phy-mode. This sounds wrong. So in DT you have rgmii-id? You say the PHY is doing TX delay. So you pass PHY_INTERFACE_MODE_RGMII_TXID to the PHY? It is not clear from this patch, i don't see any code mentioning PHY_INTERFACE_MODE_RGMII_TXID. Could you point me at that code. Andrew _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv