Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3706273ybp; Sun, 13 Oct 2019 12:22:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwA8Ue6PudqolVN+MDCADtGDpHrN7hkgpk2+9+g9ECA6xwa1u8P1mxI2YjRPN+lTHny7jQV X-Received: by 2002:a50:ee92:: with SMTP id f18mr25557094edr.56.1570994530979; Sun, 13 Oct 2019 12:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570994530; cv=none; d=google.com; s=arc-20160816; b=hL8+PbVvb9zOwoNFgQHrMtRUvzdwWQij6w0Wc9Ibc0hqUqbKLk22hI1M93kcLF6Dkn T/Wf39+n8SE3SXwV1EUbSO7by+62znHu2ya5fykB6ejvcyWVvkKQFwgNlbBnejXeXjGk meftT+oP3caF+iTledlgmswNXTHGjRsKn2ObK1gO7WRfQfsOokH06taaC4n7boapvW6Z QqTrHo3oZy9ixpxIaH29cXdo6hECD9XaiwBDpq/Br5Bwb1mTPvffxUXokEhVgvQqwV1f DpBpXYSzeU77XBwXcc8NjjAyEqsdgS5u0jMpdHu7/FanMdlylyVmCFwUPIX5ccxJyKjP 08NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=lRxf/vrG9t+cMEQuqxixOE+c6Dr/iWC77uPoe58nNNw=; b=en05bGjV+Q61yI/ohzc6jinv5GDMW+d716CR6nz7NoNv7u3f8ASWePWlal3CzuzJt9 3dLPznA/uvHM+F0yA4JWEL1rH5joLVmzoegnj26S/28g9MxjTbHSKAca+MQFX/3I5CXg BylTJcmIA9fd7Gq6Lk4/sMfwoTPuRVKpZa8Hqkd+AbDNP7x9zE8VO9PpY23HMzkK3Q+F Ilwk7CJvHwu8pwneMmanMDXe8Kj3ywrtKJEbzdHBg1vN4DAFS2vhM28uEPGbk8G2EJn5 wg7wzjaCQiGS3kEjMOcCav7GkyXrGxVOHcx0FkLGYMyM3RotcCrBLi3IinIIHsw2TvVb 3AGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SGgntrP+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x47si11152783eda.396.2019.10.13.12.21.46; Sun, 13 Oct 2019 12:22:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SGgntrP+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729494AbfJMTUA (ORCPT + 99 others); Sun, 13 Oct 2019 15:20:00 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35755 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728982AbfJMTT7 (ORCPT ); Sun, 13 Oct 2019 15:19:59 -0400 Received: by mail-pf1-f194.google.com with SMTP id 205so9136619pfw.2; Sun, 13 Oct 2019 12:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lRxf/vrG9t+cMEQuqxixOE+c6Dr/iWC77uPoe58nNNw=; b=SGgntrP+Yup2ENd2fVKPff1wGrEmryh+1fCrncAsrikd8e/Zv5U+MRWQjaRWvSgzIf KbGwvo4VXV9KBF87iDQg5td72rnePTD/8dUMXkThgsJqxyXarShHHjIEHQtnCgcKLSLj OEc4AKKg0ybxc2l37/axgwlTKXC0mCkXNjEJ/2Ky+NuHHZ+YA+So8cCcUIq8thXGJZeO IJUTWwL2je6M/QY7Xjion2ZYGYDVN3jg19p/HahQGwgCIPo5zraGRx2NLi3/XzJUYut1 S8qOa3kvMgWuGk2EP0QBpqxn/rdpckje1xED3tOilCi9MzEB4F5NdNw1dYfw6n5WsLyf ZI+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lRxf/vrG9t+cMEQuqxixOE+c6Dr/iWC77uPoe58nNNw=; b=KxC7yPPd6guaZeqlEMzijpNK2neQZ6RfeiTV/cXRvsjHY9j+VLLvq0l13xlfY0FoUU C4a8NZ6NIvvtdBmp7NXGE0laUArWdA9z5JXqN3tpW4I/jsDCF8U8nHpQYrXQ7mu9Pi5J 2pYzoosiIfj3o6BROZqb29KSLoxmI/8K8TGHhqA8kZhe52L+d8MIsRANsV7vzo3U8TI8 +0t5N4McyQYTRBGn7i/gQrafX2M45zufJL7ns7KoABUq51Zt9cD51GcwUKOfrIybWDT+ PonylpMQW/coVi3yiMmpCeTowwwjiXM+rgA3livhuiLoTnlK64LF+PJD+QaDyIOYS4ik lRAA== X-Gm-Message-State: APjAAAV0Lzt0UZfEFQG/kFjexqEKTDdihR7JwbZQi+cMNcWuhAZZ5ZX5 qFdZeA/tkrENgeoKzUwMEBn6+A+f X-Received: by 2002:a63:1b07:: with SMTP id b7mr11328013pgb.166.1570994398196; Sun, 13 Oct 2019 12:19:58 -0700 (PDT) Received: from [192.168.1.3] (ip68-111-84-250.oc.oc.cox.net. [68.111.84.250]) by smtp.gmail.com with ESMTPSA id 20sm16619394pfp.153.2019.10.13.12.19.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Oct 2019 12:19:57 -0700 (PDT) Subject: Re: [PATCH v1 3/3] ARM: dts: bcm2711: Enable GENET support for the RPi4 To: Stefan Wahren , matthias.bgg@kernel.org, "David S . Miller" Cc: Nicolas Saenz Julienne , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , Eric Anholt , Mark Rutland , Rob Herring , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191011184822.866-1-matthias.bgg@kernel.org> <20191011184822.866-4-matthias.bgg@kernel.org> From: Florian Fainelli Message-ID: <15b182b4-488a-c023-91ff-e0e253dc41f9@gmail.com> Date: Sun, 13 Oct 2019 12:19:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/2019 11:41 AM, Stefan Wahren wrote: > Hi Florian, > > Am 11.10.19 um 21:31 schrieb Florian Fainelli: >> On 10/11/19 11:48 AM, matthias.bgg@kernel.org wrote: >>> From: Matthias Brugger >>> >>> Enable Gigabit Ethernet support on the Raspberry Pi 4 >>> Model B. >>> >>> Signed-off-by: Matthias Brugger >>> >>> --- >>> >>> arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 22 ++++++++++++++++++++++ >>> arch/arm/boot/dts/bcm2711.dtsi | 18 ++++++++++++++++++ >>> 2 files changed, 40 insertions(+) >>> >>> diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts >>> index cccc1ccd19be..958553d62670 100644 >>> --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts >>> +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts >>> @@ -97,6 +97,28 @@ >>> status = "okay"; >>> }; >>> >>> +&genet { >>> + phy-handle = <&phy1>; >>> + phy-mode = "rgmii"; >> Can you check that things still work against David Miller's net-next? >> Tree, in particular the BCM54213PE PHY might be matched by the BCM54210E >> entry in drivers/net/phy/broadcom.c and I just fixed an issue in how >> RGMII delays were configured: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=fea7fda7f50a6059220f83251e70709e45cc8040 >> >> This might require you to change the 'phy-mode' property to what is >> appropriate. > > i applied your changes, kept the phy-mode above and the interfaces cames > up. But there is a lot of packet loss using ping. After applying this > downstream patch [1] the packet loss doesn't occur. Packet loss is symptomatic of a mis-configured RGMII interface between the MAC and the PHY. > > Is the packet loss a possible cause of the wrong phy-mode and mentioned > patch only a workaround? The patch at [1] is not doing much with respect to RGMII delays, so it will just keep whatever was configured prior to Linux taking over the PHY. The addition of the BCM54213PE entry makes use of the bcm54xx_config_init() callback, which does not call bcm54xx_config_clock_delay() for the BCM54213PE PHY model, which is why it "solves" the packet loss by preserving whatever was already configured. I would suggest checking with the Pi folks whether 'rgmii' is really the right mode of operation here (that is, the PHY is not adding TXC or RXC delays at all), or it just happens to work by virtue of the PHY device defaulting to a certain mode *and* the PHY device driver in Linux not attempting to correctly change the RX/TX clock delays based on the phy_interface_t value (aka: maintain the status quo). Thanks for checking! > > [1] - > https://github.com/raspberrypi/linux/commit/360c8e98883f9cd075564be8a7fc25ac0785dee4 > -- Florian