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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A040EE49AA for ; Tue, 22 Aug 2023 15:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236927AbjHVPUv (ORCPT ); Tue, 22 Aug 2023 11:20:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233491AbjHVPUu (ORCPT ); Tue, 22 Aug 2023 11:20:50 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19340CD9; Tue, 22 Aug 2023 08:20:42 -0700 (PDT) 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=j7dccOxm/oPivTdOBSmOXPPu0sVwTdHd1TVVg6mfImQ=; b=jtLyJAjm9RaGoQDTEOw/dfKFkT 6DW7BdJSJcJQUt4xUWRDvj7XoY2GOUltc9Th4srekp3SDPZeVRUW9GRQyyWm096X0Ya0EoCOye164 jJKhrXWzAtjxxqPDWdr0trqb4PFFaMKIHEzFpw5joJCtwj/AwtjpZUp/QatWKRs5EWtQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qYTBL-004nDz-T5; Tue, 22 Aug 2023 17:20:35 +0200 Date: Tue, 22 Aug 2023 17:20:35 +0200 From: Andrew Lunn To: Keguang Zhang Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Thomas Bogendoerfer , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Serge Semin Subject: Re: [PATCH v2 3/4] net: stmmac: Add glue layer for Loongson-1 SoC Message-ID: <150ae6c1-8a2f-4fd7-b012-a53a909919d4@lunn.ch> References: <20230816111310.1656224-1-keguang.zhang@gmail.com> <20230816111310.1656224-4-keguang.zhang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > What about the other three RGMII modes? Plain rgmii is pretty unusual, > > rgmii-id is the most used. > > > According to the LS1B datasheet, only RGMII and MII are supported. > And I can confirm that MII mode does work for LS1B. What does your device tree look like? What are you setting phy-mode to in the rgmii case? As i said, "rgmii" is pretty unusual, you normally need "rgmii-id". Something in the system needs to add 2ns delays to the RGMII clock lines. Generally in device tree you pass phy-mode = "rgmii-id"; The MAC configures itself for RGMII, and passes PHY_INTERFACE_MODE_RGMII_ID to the PHY when it is attached. The PHY then inserts the delays. What is inserting the delays in your system? Andrew