From nobody Tue Dec 16 07:29:03 2025 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: quoted-printable Content-Type: text/plain; charset="utf-8" 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/loongar= ch/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 =3D "okay"; =20 - phy-mode =3D "rgmii"; + phy-mode =3D "rgmii-id"; bus_id =3D <0x0>; }; =20 &gmac1 { status =3D "okay"; =20 - phy-mode =3D "rgmii"; + phy-mode =3D "rgmii-id"; bus_id =3D <0x1>; }; =20 diff --git a/arch/loongarch/boot/dts/loongson-2k1000-ref.dts b/arch/loongar= ch/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 =3D "okay"; =20 - phy-mode =3D "rgmii"; + phy-mode =3D "rgmii-id"; phy-handle =3D <&phy0>; mdio { compatible =3D "snps,dwmac-mdio"; @@ -58,7 +58,7 @@ phy0: ethernet-phy@0 { &gmac1 { status =3D "okay"; =20 - phy-mode =3D "rgmii"; + phy-mode =3D "rgmii-id"; phy-handle =3D <&phy1>; mdio { compatible =3D "snps,dwmac-mdio"; diff --git a/arch/loongarch/boot/dts/loongson-2k2000-ref.dts b/arch/loongar= ch/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 =3D "okay"; =20 - phy-mode =3D "rgmii"; + phy-mode =3D "rgmii-id"; phy-handle =3D <&phy2>; mdio { compatible =3D "snps,dwmac-mdio"; --=20 2.43.0