Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3509935rdh; Mon, 27 Nov 2023 16:41:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW9OqFzoTTSZlD4ruAMgIuyhRDu+W5/Fby1ru6GPBMKy5G1HHasa0qJpZVfqloeC/0JRji X-Received: by 2002:a05:6a00:218a:b0:6c3:74d6:595a with SMTP id h10-20020a056a00218a00b006c374d6595amr13226831pfi.13.1701132066564; Mon, 27 Nov 2023 16:41:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701132066; cv=none; d=google.com; s=arc-20160816; b=tuH5V4TdGM2LUsgjLgUUL86C5ML6bXhm3E7oeDj5laIjGCJ5f049gdtTS8Q4ceiJHR Twsa0/f2J1hB+sBXSo75/yd/wHJoxAwktGe5QSYs16ysaGKZio267ym7wJJWuVIQTNES Tb/eXzEyYfE6/vxRaSfbJnFa1wV6BHgsRc2LHX0hqjOTAXZBW9uwiBGg2daEYVbBXokT OcicfTe+lzSxmoEhMNd49V7uyOX6NUvmEzjzOPVQTYm3lDAtXzU5xM3tr7rB4YosiYxz 63DXKAq7DoysTdSmOuLOtD1+KM0jynGBtUhRd5/Ycu2qUEhz3Lk/FzHAstjV2OcOxAOQ n11Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4s46AN2IfjLhhxVFz+WXkiU+DYgjAoF4DRvMIsYHau8=; fh=k70yp9d+wfM/LiD8TytBxARgaLs0fu6FENaxSOkubZM=; b=Fbg7obVOSm78RDlC/3MhS8f4HhBvBPsR/KKjhuC81sOvkCA6vMDuQ0G70IfJw1UQDn KOa3iZYIa2fzHEYmfrfzkIAxSLBO/yCwDZmdOlfRIki61Hg8Er56h5697cLHXiypatR0 nLtTtSBYUJLbzxSpjsA3KK0jrzfKxL6BnosDXw32AhDsEDfq+KrpQ2ep6SaunDw/mDlW 49KL8RaAAdqYxjyCWxR1/8ZFRdahJn+OpJaKW48bf+EINls7+PyFtYvJG+BZUDGJbuNv zCAvFOq28UXy3qmEC+82A/Lj3DDYWuGvSUk9ArulntGRzrLoe9omeULnqADi9Y4yun+Y /iAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VmzBZg6C; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id a6-20020a654186000000b005bd42f65dc5si10546432pgq.285.2023.11.27.16.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 16:41:06 -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=@collabora.com header.s=mail header.b=VmzBZg6C; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id EF0E3815C207; Mon, 27 Nov 2023 16:41:03 -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 S234088AbjK1Akq (ORCPT + 99 others); Mon, 27 Nov 2023 19:40:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjK1Akp (ORCPT ); Mon, 27 Nov 2023 19:40:45 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5842FD45; Mon, 27 Nov 2023 16:40:51 -0800 (PST) Received: from [100.116.17.117] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 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 EBEE06602F33; Tue, 28 Nov 2023 00:40:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701132049; bh=h7YSTfO06hlkQSwOKq0bWn+ONs0St86lF+pU8MQKvuI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VmzBZg6CWKaixb4KhvHQgi7BX64H30ILpSwJn84YmYWZ/X9EQUVAtEmmGPbQpqjCJ HlT7k94u4qqZtBcttWVg+gCoMWQfTU58LRK9PgNINlDI92FYyfON2ZP2c7zMhbFGUq VtsKwOMjNIUtJW6ZTM6LsA6pmm6EnetWS5jxDZ6wPURQsBAzHiCw+prW9MpZHFbbgx D2IA6oWvtQXonHcb96Ec7wfwr49e/9EQCZ1huEjNJI0s2tbgruvzMtdY8cO8/g5kRd IUJOvu14Vz0cBTusg/X8G9ZIeIgdyGUPNFETVGWOlhz5XnDIp9Z88xnPCahH5UHD8F DW51oTFSIXKvQ== Message-ID: <2f06ce36-0dc1-495e-b6a6-318951a53e8d@collabora.com> Date: Tue, 28 Nov 2023 02:40:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 12/12] [UNTESTED] riscv: dts: starfive: beaglev-starlight: Enable gmac To: 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 References: <20231029042712.520010-1-cristian.ciocaltea@collabora.com> <20231029042712.520010-13-cristian.ciocaltea@collabora.com> Content-Language: en-US From: Cristian Ciocaltea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=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]); Mon, 27 Nov 2023 16:41:04 -0800 (PST) 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. > 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". Thanks, Cristian