Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp522458lqb; Wed, 29 May 2024 03:01:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFbI8bLoHPlOm9Ew3JNz9WS9G5jJ6RrKqr9f/KaEzgAoxPqeTmIWHP71JpyPCqZMiPbLOtaSvNxm7/yIX7IY5vZUoR5/xsX1GgFMN+ig== X-Google-Smtp-Source: AGHT+IFWoiJ1Zjqq/HW/NPQIBsZnnG/wiHwBfPcklO+SqLHufLv8uLJO7rLStsw+0x80jOiekjgF X-Received: by 2002:a50:aac8:0:b0:578:2148:61f5 with SMTP id 4fb4d7f45d1cf-578519c2a24mr9991158a12.30.1716976872892; Wed, 29 May 2024 03:01:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716976872; cv=pass; d=google.com; s=arc-20160816; b=FyjmtS02i/jhIhkwlRvJdiPe1QVGqPPsXhGtsszRONcILqmQ020M5PB4EAxXalg7oI l49k2p/msASyKnX8urGBIIYk4vpJEFOPwHp69HOAhOGwc3G+j9UST3R38LXFVk2VVQLI xfb7W08zio3z9qi5dmmw/wYQZL9rpfqE2dQyYZlvn21u4vKge7M1W5rUhSeWl4qk5sbF koNJfavbaV1FrgB2/BzWkQ7Z+HgfuoGSiV6T0Xs4c4yvdDvoTz1Z3HLj5GPvQIJ4Wfg5 aQckhXwmDZddkwaRsTDd+3pyIJ0vp8mLa1Ryhefg532P4X3cwtvNPPs5NcmdtmMIRffl xinQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=5VCY2276LrGrgOyFGlGWqWI/IRTPW7vhUvRb7HYUUrY=; fh=y7VKX694VLH2eb03/y0ljujQLJGtNdYVa6lu5bfy0Mc=; b=T/UCePLVGXtrKcossVnlWup3rY4PvSwxV0fPsAglbrwyLFJ+xWpDS+kCSLuAV5K8Yk Rc/ZMVXI5MkN4o8RDXVxwdmIHrFy0jM6BhKfcQvUGecqtmFYsEMY6S5/2DDGxRf06VCX JgYUmeI4h0Ugc50N0Z4AVJLt5Hu6N7fuZ/yh4SCYPuq0s+Lhu/gGZsLF7Yf2+qUECa/K vb7XEg0gOG+fRWCnwfXrid+7l0EPzP3P+Mjv1h1+roIuBG4yYgFwTvh0+LXwr0UmRiD6 C0keMx52a2cqOaCPqXx8xSL/k/bqnteFxKq6plfWD9PFxzuvoBV5+TfKR24O+JwLTr13 D7og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-193903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193903-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-579d9304fa5si3031510a12.273.2024.05.29.03.01.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 03:01:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-193903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193903-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 32BB51F25376 for ; Wed, 29 May 2024 10:01:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87C58176FD8; Wed, 29 May 2024 10:00:48 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0E1F017A902; Wed, 29 May 2024 10:00:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716976848; cv=none; b=cwbpd+JjaZgkDw+f/KSknAfAQIJRr1lmB6GWDuuiHe91moVRKseGw1vioEPWqnMe4xQtRjovCu12DAWIEvkuhobaDNsGj8ISg7fR9wqygkM9vJpAek5flgTWqT9WpIRCP1UxY7ES755yNdKVzgtW81C2SMCgxXu5Q7P73UQOtNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716976848; c=relaxed/simple; bh=6+6AnpQgR3pDE8mI5akLFxEbAHbXPqAvUTnwheuwBVE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Bk9iyBenKmTM0mahu5w5Kt++6IeyzkUbtbs7hOXzOOo8Zn1jjT9D1QH++fvJLQ28MV7PVdJhRJHWe5iyTFqVMaHdUf2LtOrtlNSfXhh01wIlFEC/QLuALTDNZ/XznWxaVAVnCW8AAvrX+6vjpR2J0r5ojLD1yCSQgEmUfnnNiUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80677C2BD10; Wed, 29 May 2024 10:00:45 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, Huacai Chen Subject: [PATCH] LoongArch: Fix GMAC's phy-mode definitions in dts Date: Wed, 29 May 2024 18:00:25 +0800 Message-ID: <20240529100025.2865868-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The GMAC of Loongson chips cannot insert the correct 1.5-2ns delay. So we need the PHY to insert internal delays for both transmit and receive data lines from/to the PHY device. Fix this by changing the "phy-mode" from "rgmii" to "rgmii-id" in dts. Signed-off-by: Huacai Chen --- arch/loongarch/boot/dts/loongson-2k0500-ref.dts | 4 ++-- arch/loongarch/boot/dts/loongson-2k1000-ref.dts | 4 ++-- arch/loongarch/boot/dts/loongson-2k2000-ref.dts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/loongarch/boot/dts/loongson-2k0500-ref.dts b/arch/loongarch/boot/dts/loongson-2k0500-ref.dts index 8aefb0c12672..a34734a6c3ce 100644 --- a/arch/loongarch/boot/dts/loongson-2k0500-ref.dts +++ b/arch/loongarch/boot/dts/loongson-2k0500-ref.dts @@ -44,14 +44,14 @@ linux,cma { &gmac0 { status = "okay"; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; bus_id = <0x0>; }; &gmac1 { status = "okay"; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; bus_id = <0x1>; }; diff --git a/arch/loongarch/boot/dts/loongson-2k1000-ref.dts b/arch/loongarch/boot/dts/loongson-2k1000-ref.dts index 8463fe035386..23cf26cc3e5f 100644 --- a/arch/loongarch/boot/dts/loongson-2k1000-ref.dts +++ b/arch/loongarch/boot/dts/loongson-2k1000-ref.dts @@ -43,7 +43,7 @@ linux,cma { &gmac0 { status = "okay"; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&phy0>; mdio { compatible = "snps,dwmac-mdio"; @@ -58,7 +58,7 @@ phy0: ethernet-phy@0 { &gmac1 { status = "okay"; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&phy1>; mdio { compatible = "snps,dwmac-mdio"; diff --git a/arch/loongarch/boot/dts/loongson-2k2000-ref.dts b/arch/loongarch/boot/dts/loongson-2k2000-ref.dts index 74b99bd234cc..ea9e6985d0e9 100644 --- a/arch/loongarch/boot/dts/loongson-2k2000-ref.dts +++ b/arch/loongarch/boot/dts/loongson-2k2000-ref.dts @@ -92,7 +92,7 @@ phy1: ethernet-phy@1 { &gmac2 { status = "okay"; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&phy2>; mdio { compatible = "snps,dwmac-mdio"; -- 2.43.0