Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1218042rdh; Fri, 27 Oct 2023 07:56:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCxXu3ECTVW1h3JVzvU7c6XedNzaJdFWTqX958HL4y9a6wsYkQ7cXH8Y+xfxHFIVUppmEX X-Received: by 2002:a05:6830:4d8:b0:6b9:6a43:1f7c with SMTP id s24-20020a05683004d800b006b96a431f7cmr2811207otd.26.1698418616226; Fri, 27 Oct 2023 07:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698418616; cv=none; d=google.com; s=arc-20160816; b=ZevK5RDb/0Uzmnc/TWLJBmTYvTsumWjZbdyicAjDHVtiRAM91jJ50plOQeCtujH83o lrJchIWMVcNm5zYw6jhWezVOKCTtbFPMwTmcFmYYncDO8NQ6XZXl2FRTRkiHvHfP9RDF DP91Wku73RmB/Y2JPNY8HmDwwwVW6SOjlswPwn5dRBHiXs1lm3b7H6Y5iP0JNyRvoQIq kaQ544UIPPfWvij7oC6Q/zj4J4R+JCDxMndl9QQUA73/1j3BqHrjNMZ4unlfIOjh2DJE gwor5VO4j7q77sl3uGf4KsrHvqeaHJGDS6oAcF2Q9+jBGzYCwPpKecCbrF9GpPhfpiEH gwCw== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=LcsfdkH239v59CyPQDOJbyT4Q+5ds727J7rjCSqpc2o=; fh=iO6rh6hZy/lCxWDRwELctxnLb85d6egk7uCuE5MGGyw=; b=hdRHPSgIHqbLnimLm6v1IY0GJFt5gUfCoxqqhOTmwzCddekijP7Y2ZSBVjpY31Mai3 /xKdKet5LIWwIrFn8W9I0XP0O0h67RMoLzGsnFwesfHsgOS9uQVydH+iDZZLsBmrFOxI 3Wclu8FjqPNFmehc3aZiVBC0tgUJ2nA7EV42swOyMRsx/ccF0gw5MyDuQXpoUNQMEOms dqi54mfNI7VTJQ0eqp3yZMT+aRhOPd+Qa23iindyfD2detWfdyVM7votQaTVf94j88RE V0vMU36HYfrfZieumAs8NFoNMK/Z7PANZf5fbyyn2vaLDdgHIaOcOflBlxoUTv6NSZjr VlEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WjuUPCwE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g123-20020a815281000000b0059c267a4887si2421057ywb.318.2023.10.27.07.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:56:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WjuUPCwE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id D51BF8096A44; Fri, 27 Oct 2023 07:56:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346132AbjJ0O4C (ORCPT + 99 others); Fri, 27 Oct 2023 10:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346131AbjJ0O4A (ORCPT ); Fri, 27 Oct 2023 10:56:00 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A375012A; Fri, 27 Oct 2023 07:55:57 -0700 (PDT) Received: from [192.168.1.90] (unknown [188.24.143.101]) (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 2DF43660732A; Fri, 27 Oct 2023 15:55:54 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698418555; bh=pC/2ckA4eIWbV5Hbrpc+VBynF0iUF/+d8KlgFpe55xM=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=WjuUPCwE1Gcpq9PFx2gnR501PN6fY7fzv2/6mj25FJztfY1Z5J7kyJ4e/nNUqjIy1 uO/ysTkxYiMaLCVl1XL3eK5jy15uni5zBxT3UqwsgPYz2xxLRvJQ5QRScJEPIaA8Ll 44lkQ5GoWzJEYt6jyickaJfc8VqSgUJOXLGCoKnNy8nlY0V18RATa1ZfQN2ZOjBxdv drnGacZUnH3+E+HN9iwkp72SN41/AnYxiNsnFaDFHN2lCA6xKajSDEuVUABwhkNIkl jmkbd3StyhrBWPng+/Q0PdUm3rO/WC+PgtgjSrLfgbxeAFhkbLCpg8ybkW2rVd/yUo NFU+44OB0VAIg== Message-ID: Date: Fri, 27 Oct 2023 17:55:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 07/12] dt-bindings: net: Add StarFive JH7100 SoC Content-Language: en-US From: Cristian Ciocaltea To: Andrew Lunn Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Emil Renner Berthing , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Albert Ou , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Sagar Kadam , Yanhong Wang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@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: <20230211031821.976408-1-cristian.ciocaltea@collabora.com> <20230211031821.976408-8-cristian.ciocaltea@collabora.com> <586971af-2d78-456d-a605-6c7b2aefda91@collabora.com> <350b400f-210a-a2cf-0828-25beb1b93a43@collabora.com> In-Reply-To: <350b400f-210a-a2cf-0828-25beb1b93a43@collabora.com> Content-Type: text/plain; charset=UTF-8 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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 27 Oct 2023 07:56:12 -0700 (PDT) On 2/17/23 17:25, Cristian Ciocaltea wrote: > On 2/17/23 15:30, Andrew Lunn wrote: >>>> I would actually say it shows we don't understand what is going on >>>> with delays. "rgmii" is not every often the correct value. The fact it >>>> works suggests the MAC is adding delays. >>>> >>>> What value are you using for starfive,gtxclk-dlychain ? >>> >>> This is set to '4' in patch 12/12. >>> >>>> Try 0 and then "rgmii-id" >>> >>> I made some more tests and it seems the only stable configuration is >>> "rgmii" >>> with "starfive,gtxclk-dlychain" set to 4: >>> >>> phy-mode | dlychain | status >>> ---------+----------+-------------------------------------------- >>> rgmii    |        4 | OK (no issues observed) >>> rgmii-id |        4 | BROKEN (errors reported [1]) >>> rgmii    |        0 | UNRELIABLE (no errors, but frequent stalls) >>> rgmii-id |        0 | BROKEN (errors reported) >>> >>> [1] Reported errors in case of BROKEN status: >>> $ grep '' /sys/class/net/eth0/statistics/* | grep -v ':0$' >> >> Thanks for the testing. >> >> So it seems like something is adding delays when it probably should >> not. Ideally we want to know what. >> >> There is a danger here, something which has happened in the past. A >> PHY which ignored "rgmii" and actually did power on defaults which was >> "rgmii-id". As a result, lots of boards put "rmgii" in there DT blob, >> which 'worked'. Until a board came along which really did need >> "rgmii". The developer bringing that board up debugged the PHY, found >> the problem and made it respect "rgmii" so their board worked. And the >> fix broke a number of 'working' boards which had the wrong "rgmii" >> instead of "rgmii-id". > > Thanks for the heads-up. > >> So you have a choice. Go with 4 and "rgmii", but put in a big fat >> warning, "Works somehow but is technically wrong and will probably >> break sometime in the future". Or try to understand what is really >> going on here, were are the delays coming from, and fix the issue. >> >>        Andrew > > I will try to analyze this further. As the non-coherent DMA work this series depended on has been completed, I started to investigate further the "rgmii-id" issue. I couldn't spot anything wrong in the Motorcomm PHY driver, but eventually got this working by adjusting rx-internal-delay-ps. Will do some more testing before submitting v2. Thanks, Cristian