Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2060804rdh; Sat, 28 Oct 2023 21:29:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEs/tutfOqkGnH1evYdVJs/QaC+fBIexkpAPH3iCccdGC6ySBy/aflBInAs8XerXUA7/pFU X-Received: by 2002:a05:6a20:6a1f:b0:174:32c:dfcb with SMTP id p31-20020a056a206a1f00b00174032cdfcbmr10034850pzk.31.1698553741815; Sat, 28 Oct 2023 21:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698553741; cv=none; d=google.com; s=arc-20160816; b=SWWOrE/ijvXAgat1AEtW1D0VUZ5+A7OmTSp3PYrZYeEQZYAXojHXsHyjv7WJX30zNC a4mxBirWq2ImLWNHS79fWUZZGjg6hzWtCEVVgz7IiY5RsmAQDinSDVK6agUJ0ZLXqoFP WEM61ILW5I/w/vyOr6ICSlgu57MlkVdLIK+S6R4tyrq/diPndLh0DSB58UDwLKAZisx4 fbD2PFVN0HQPdJ0NplxIvKPxOEz9sXKc20+fmrLNF/vJ0HB/c2rclEKm+7uSRWgWEQEM PB3LKuJkWxeKNlbTG1ztji8BaP7DqyuwZ7jchys6nWkJ528hX8zcO7xA4TYm5/TQERr6 R8fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ttuphf5E2IufaLfYimLEhFVTKQlyL6fQNiQy3jL1nm8=; fh=25s3loOErHHhz1K9ubO5//IshGSacG8hTjzYtMWmGEo=; b=uEFlZXpAnf6Szb5KHyJ0KIEwXmc8ev6JaA+LF1A9LuEyvsSy8NFvY8c0lIWC0WpCtr tW2e9eBBECVj9aKAlVUGjSOVwWYb1HUVo7EmryM/KLKmL7SIexV+hjoBm+jDadtkekhw bcnVleIDJ6cP2REBURH+Ir4N6fb0dtWPiLejJGPlyxYalCpGrPqan6x0ZfUZy9OK7AV+ Tl7z8hAVnqa/6Qx+rsxsMFbGXkwv915lupM+3oUCrQNEUgK4gnNsn2MbWnRL1bEtMHUq V1Lj91gQQPxqdDwQ5jrOiZ/gLrrLt5O144gyQKMd67s0aePVNgrKKRfScze5zW/QM8lt rJig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RBPXQz2G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id k3-20020a6568c3000000b005b7e3ee181fsi3232608pgt.642.2023.10.28.21.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 21:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RBPXQz2G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 11678805B2CF; Sat, 28 Oct 2023 21:28:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230081AbjJ2E2q (ORCPT + 99 others); Sun, 29 Oct 2023 00:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbjJ2E2X (ORCPT ); Sun, 29 Oct 2023 00:28:23 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80193171E; Sat, 28 Oct 2023 21:27:55 -0700 (PDT) Received: from localhost (unknown [188.24.143.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 21E036607340; Sun, 29 Oct 2023 04:27:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698553673; bh=AC+Ls3ytNnSvtsq4GFfS8dc+BFMLEfoCVREKO8KW7lU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RBPXQz2GQGNqffqr51uwLxSOhlWrlkDw3YEFs3NbSf/nxgGJOX1fcRb6/DIhxT13w gNjyWhoEGy6ckmKdXx87Nqn6KdlEUhVgboS5Gy40r6ymqy5eYtuWeajVDgkqWHVOJg I9Eq0d8Wil0pk8/ZKzljUpTNKrufiMAVWlMujcY4jig24W4WVWezOr+TOm0ymEetan +wqbErUZw9mkSdnV7eMBlLLnQohAi+RhCwneJRwQUHnmc2A1YWDiyDF/Dz2EApxyW0 gE2lcXa3TgbG+ktNl+mvhxtR5uG5p7bAN6zMkjQ4hj6Sc9sw7PqWb6bzfFLk0r7nza Our6kpSl5wJ0Q== From: Cristian Ciocaltea To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Samin Guo , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH v2 11/12] riscv: dts: starfive: visionfive-v1: Enable gmac and setup phy Date: Sun, 29 Oct 2023 06:27:11 +0200 Message-ID: <20231029042712.520010-12-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029042712.520010-1-cristian.ciocaltea@collabora.com> References: <20231029042712.520010-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 28 Oct 2023 21:28:59 -0700 (PDT) The StarFive VisionFive V1 SBC has a Motorcomm YT8521 PHY supporting RGMII-ID, but requires manual adjustment of the RX internal delay to work properly. The default RX delay provided by the driver is 1.95 ns, which proves to be too high. Applying a 50% reduction seems to mitigate the issue. Signed-off-by: Cristian Ciocaltea --- .../starfive/jh7100-starfive-visionfive-v1.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts b/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts index e82af72f1aaf..e043a27f7612 100644 --- a/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts +++ b/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts @@ -18,3 +18,20 @@ gpio-restart { priority = <224>; }; }; + +&gmac { + phy-handle = <&phy>; + phy-mode = "rgmii-id"; + status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + phy: ethernet-phy@0 { + reg = <0>; + rx-internal-delay-ps = <900>; + }; + }; +}; -- 2.42.0