Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3790107rdh; Tue, 28 Nov 2023 04:08:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8c0QPh0z6ImSXxQ0dDaqRq4K/woU0uKMxZkOFyQMluP982cNy9BywPfEQA8sh2saxxqmw X-Received: by 2002:a92:c603:0:b0:35c:debc:94f8 with SMTP id p3-20020a92c603000000b0035cdebc94f8mr6371479ilm.10.1701173314695; Tue, 28 Nov 2023 04:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701173314; cv=none; d=google.com; s=arc-20160816; b=Hse1SGCaUXFpUK+xrNpCmUcEM3Q+79xYheKxuxB1K3XTuLB9176ZR7hozNhRbtFVkf dfWmnl3IzwnmI65ElaoMnm84rauC4unHhvUm9PmFwf54yAGKQ9feprhGfrcGzJ+SFSmW enUpICOdvG3xlgCbpdJS5hLD15DMD5+oyjzF9ZGwzUyUwRRyKSzGLP60VioqKskM9nHz 5ZndHg7hBkIxbi0ABCu5EqRudcVsaJdffJF3BlRnvlGlKAC1ibG3QJcI6HbxIegnYHkg g4y7M0eEwkKFx/MteeSJ6qCJQ571iKl43in2KgD+1fXx1xbD5Ck94dQHc/WxpaMFc/nK aruw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:mime-version :references:in-reply-to:from:dkim-signature; bh=iOZrwSPmspp94JeIuHB4gK1Gx/cQjCpWhXKzSprsIjI=; fh=mV6gH+BAWcC0n1vcNvWIeUZDzZcOZtVtkH1QsmQC2Lc=; b=wKMPjJqdZel6YjHNnn689GTr574l/akDv3oydnHFmHkXZUkDPhuQlgzNDb+rObUnf4 /z0W8zHliNdR4jmXIU6OuTTccZvZovG0S6AatZu963F10Sjwoe1aLdn6t1lhrb6ypW6p wqwCv7O2JlwQMkTUg+jrPMxGrWCRElR+tToe4T705OIDm2WNID2qQRxjUNT/4P7HDkUK 29+hTf5HfqH9X+jnRV0C8OOfjueNXEIlN7126SfpNRp7Zqszwh2yWrOE352zWpsdV3vz 6ojQa2JKgjRkWAGnYaSQ7upBawX21d4gJj0XqwKsKA5MtjdTpT5eMj53bQgrLAovdQeo QMfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=HIdGdYur; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id o18-20020a056a0015d200b006cb537d7b47si12474190pfu.309.2023.11.28.04.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 04:08:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=HIdGdYur; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4E01280BEF1A; Tue, 28 Nov 2023 04:08:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344413AbjK1MIS (ORCPT + 99 others); Tue, 28 Nov 2023 07:08:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344268AbjK1MIR (ORCPT ); Tue, 28 Nov 2023 07:08:17 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C49E182 for ; Tue, 28 Nov 2023 04:08:23 -0800 (PST) Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 5F80944432 for ; Tue, 28 Nov 2023 12:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1701173301; bh=iOZrwSPmspp94JeIuHB4gK1Gx/cQjCpWhXKzSprsIjI=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=HIdGdYurwvY4jLzjhJ5FG3GlajPU4BhpSs13VcRRfDnBRdy5qBzXacJu4SeeEje37 3/tPWTxTdQ4kP5lS8lgzbsqUdogzvw0k87bBb1fbuAKhu6mzXj2R5dq9L0rAWRnfbU T+tLmc9NF5OOoymiSZ9F58B5l4SLJbkWo+ogKIc001zuZOsU83BEEjRQ3+AgYdiVXw 6bAQi/Fn7oK6xXOc/saZ2PrZdCTU7K1df/WT7BuN6xoBEucInMaB09YfDuj0ItiPNf Og3+vA1Ix0WZ3qhxtAz23OX4jRSkVnBqo5xwBN1nRUlTBtFEqVtxSs1zYPbbPXTnw8 yBxIJakdNVv8Q== Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-679ff96b259so64325296d6.0 for ; Tue, 28 Nov 2023 04:08:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701173300; x=1701778100; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iOZrwSPmspp94JeIuHB4gK1Gx/cQjCpWhXKzSprsIjI=; b=T6eb5RU3OC0B0hIJmrD7KOAZxT7Q8zb1TDBn2SMlxGTve4yxiaQuUFDwhof2UWVn56 xcoWS1Qcn7FT8jInuy9a744iRhWB1kgX3jZxY4wJNqVjMTLOQYZoVGjV2UURh+HuxDbb u/riKaGobiqfdBHkt5OSw/Nuscr7kpXFTwX5wOdmSQJ1fh9Ue39G/ZTb67Tn8UYnUJvO HszDnt+EDl7HCDeo9SUVsV5OdMKINjK8qCQS+oXA5MzTgPUle9OCGGhBrNxuuKTC3gxs cwwm2ZClJZzW1YdA9U/r94D3QpDfD/8mYua0VsnuZi8NWEA4KvlRot+fTNXs4w20KTnX cBig== X-Gm-Message-State: AOJu0YwQ617f+GgXA+c/Nkmnbp0guuLvYYvqJ2dLnrhqWjK4fAJOWOqX KDoex10i/QUfaKclMazqeLpY3XMVHdat6A7siM7RKbPLbIEHU1BU1Wm4DuyWtBo1/5X+ZP3xV/h x7mjnpxCLRdGWiggXc2Ercyi5MtqNzM1Yxx6CcCElPImbG673V/tVc7aheA== X-Received: by 2002:a0c:c788:0:b0:67a:4bb0:693a with SMTP id k8-20020a0cc788000000b0067a4bb0693amr5088395qvj.55.1701173299936; Tue, 28 Nov 2023 04:08:19 -0800 (PST) X-Received: by 2002:a0c:c788:0:b0:67a:4bb0:693a with SMTP id k8-20020a0cc788000000b0067a4bb0693amr5088373qvj.55.1701173299631; Tue, 28 Nov 2023 04:08:19 -0800 (PST) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Tue, 28 Nov 2023 13:08:18 +0100 From: Emil Renner Berthing In-Reply-To: <2f06ce36-0dc1-495e-b6a6-318951a53e8d@collabora.com> References: <20231029042712.520010-1-cristian.ciocaltea@collabora.com> <20231029042712.520010-13-cristian.ciocaltea@collabora.com> <2f06ce36-0dc1-495e-b6a6-318951a53e8d@collabora.com> Mime-Version: 1.0 Date: Tue, 28 Nov 2023 13:08:18 +0100 Message-ID: Subject: Re: [PATCH v2 12/12] [UNTESTED] riscv: dts: starfive: beaglev-starlight: Enable gmac To: Cristian Ciocaltea , Emil Renner Berthing , "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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 04:08:32 -0800 (PST) Cristian Ciocaltea wrote: > On 11/26/23 23:10, Emil Renner Berthing wrote: > > Cristian Ciocaltea wrote: > >> The BeagleV Starlight SBC uses a Microchip KSZ9031RNXCA PHY supporting > >> RGMII-ID. > >> > >> TODO: Verify if manual adjustment of the RX internal delay is needed. If > >> yes, add the mdio & phy sub-nodes. > > > > Sorry for being late here. I've tested that removing the mdio and phy nodes on > > the the Starlight board works fine, but the rx-internal-delay-ps = <900> > > property not needed on any of my VisionFive V1 boards either. > > No problem, thanks a lot for taking the time to help with the testing! > > > So I wonder why you need that on your board > > I noticed you have a patch 70ca054e82b5 ("net: phy: motorcomm: Disable > rgmii rx delay") in your tree, hence I you please confirm the tests were > done with that commit reverted? > > > Also in the driver patch you add support for phy-mode = "rgmii-txid", but here > > you still set it to "rgmii-id", so which is it? > > Please try with "rgmii-id" first. I added "rgmii-txid" to have a > fallback solution in case the former cannot be used. Ah, I see. Sorry I should have read up on the whole thread. Yes, the Starlight board with the Microchip phy works with "rgmii-id" as is. And you're right, with "rgmii-id" my VF1 needs the rx-internal-delay-ps = <900> property too. > > > You've alse removed the phy reset gpio on the Starlight board: > > > > snps,reset-gpios = <&gpio 63 GPIO_ACTIVE_LOW> > > > > Why? > > I missed this in v1 as the gmac handling was done exclusively in > jh7100-common. Thanks for noticing! > > >> > >> Signed-off-by: Cristian Ciocaltea > >> --- > >> arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts | 5 +++++ > >> 1 file changed, 5 insertions(+) > >> > >> diff --git a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts > >> index 7cda3a89020a..d3f4c99d98da 100644 > >> --- a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts > >> +++ b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts > >> @@ -11,3 +11,8 @@ / { > >> model = "BeagleV Starlight Beta"; > >> compatible = "beagle,beaglev-starlight-jh7100-r0", "starfive,jh7100"; > >> }; > >> + > >> +&gmac { > >> + phy-mode = "rgmii-id"; > >> + status = "okay"; > >> +}; > > > > Lastly the phy-mode and status are the same for the VF1 and Starlight boards, > > so why can't these be set in the jh7100-common.dtsi? > > I wasn't sure "rgmii-id" can be used for both boards and I didn't want > to unconditionally enable gmac on Starlight before getting a > confirmation that this actually works. > > If there is no way to make it working with "rgmii-id" (w/ or w/o > adjusting rx-internal-delay-ps), than we should switch to "rgmii-txid". Yeah, I don't exactly know the difference, but both boards seem to work fine with "rgmii-id", so if that is somehow better and/or more correct let's just go with that. Thanks! /Emil > > Thanks, > Cristian