Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp121472lqb; Tue, 16 Apr 2024 10:23:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXm3G3QJqJyDziaYayvD2yzv1lU8T/xdru285yInksL6QCOar57bWNQbw2uvzW2XpXFSZ9JxNw2xcHpDp4Whp/+GfbJi4zOW1nJrA3Dqg== X-Google-Smtp-Source: AGHT+IGjyjY2zl2L8d35WlABXtk59k24f99vLrQtxwS2kK2b3a5jfSPlxmf9IyhfqSMQJELUyRs/ X-Received: by 2002:ae9:e015:0:b0:78d:6a13:cd1d with SMTP id m21-20020ae9e015000000b0078d6a13cd1dmr14311147qkk.19.1713288201601; Tue, 16 Apr 2024 10:23:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713288201; cv=pass; d=google.com; s=arc-20160816; b=Q3AYp7YU9lWFFsKcaWLIQDvvwqG9R/yy7YSF1Sq4mz6hytuk6C74w0IzvsWiv871n2 KK8YBuQE76i0ASZT3YzM7G+N8VzVdb94PvflfUlEATsqSOM7lgdNxHzKFRbY+LPV1RJn nXd7Lh8YQZwT2ldx+8y7Zhn5YIqm6NI1f2vKNcsJ9rO60KQPFfV1hMlUSQZVVen69Ikq i49gfLch64Gi9IibOb4Y4dGNoifAPQ1+vcrqGtwIUDzgBXwy+yoo4pYZd/a0QpsBqvBm cO02epfNYSmmqwejj6CHDliD8jdURq0exYbqeic9R00N6ky81xLNZtBAu4BUXsrdE8nO zitA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xfOLZpMeXfJa6rDqZGEVapwFnrzCpl98X6KMQ4708WQ=; fh=bdAHSpkin8StUfUcOUBQ81z7I8A3YE1h//Uxxjjksf0=; b=bJ0jSsSFe3cIXgzJqKBR3s8s35PtrCh/QNlgTuox2ydjHA1qLLi9o/QFuY3RxeDOPb UJIKGqz1gK/VsUwZjVd2n8Dv4S50voMitPGnxFF9O3re+4X9zqeZP+LWW4UBerK48bNC nDPtgNXNM//Yv0VQ2V0eS15VMmOUlaeqzl2Ixuwqj6eJjDtnWn2mcaUZeXqtOnbZ1A4Q TYweKzQe8yjmBEu8oZ9P44OyLo5y4gjCqXFttbUqbmR+ZDYYzqwJC6R3tm54BL9t6nhK ftT2xAjemXwmtD8+GLKx6kOOgf5wK8m+kNlNrmAaKjhsuUXPnS67nfi1Qm3msCUprNNJ H7fA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C2YJ9Wb5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-147299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bk42-20020a05620a1a2a00b0078d63f2df9fsi14125984qkb.514.2024.04.16.10.23.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 10:23:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=C2YJ9Wb5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-147299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 10C531C21017 for ; Tue, 16 Apr 2024 17:23:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23B171332B8; Tue, 16 Apr 2024 17:23:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C2YJ9Wb5" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A18681F956; Tue, 16 Apr 2024 17:23:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713288190; cv=none; b=E3lESUj6OtDRbLsJLa0yn9068nlWmNQWCfCXpdtuQMIvIYs4cSej1cW8odhUDXXft/rjllpoVzHluGNbgffSKUK6F8Ct5P1M76Ucs8ZdRoEMIDvpkaXuOestpJBKR1nTRTUInABRI3zh17j7Yv9bRWCv11bacz2ABtanO9VAQaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713288190; c=relaxed/simple; bh=ArUCSRqNmGEw8rmmjqJGD98DKnfu9AYGkJRy6KCgyfo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dSqtka/4sFB/O43mBsIHVzp1aIHTdNIzyvFK8HQFqR1vf4DIK2IaiQ+OwIMnXLCw+DqAspVNQuzfgwYoHfe3tGWDBVTF3bu1Y1cTcVf5t2P68Fu7bWiLx0qkmwMHddfSVr9T2f69OS/DKlm631UuRMazkDCfpKwqEQRbPD7mF2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C2YJ9Wb5; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-346406a5fb9so3645264f8f.1; Tue, 16 Apr 2024 10:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713288187; x=1713892987; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xfOLZpMeXfJa6rDqZGEVapwFnrzCpl98X6KMQ4708WQ=; b=C2YJ9Wb5ci9a0aSLdZZ124XJI3HqCoQQ3UOaaXeIzOHoZZ4AicINoHnUcxUsESfnA8 X7gNw1sf1mR1xmZG1O43XReAJYhaFdIy6F7qzAOI/TKFCt7UGs4pDtlSse7mGrknbw9q xBsfj6yxuO8W/M/gww21PYb92WzRZY/9njVnk4U549pvSUkR9IhcAN0ZKFe+JqkIqAef ydjR+//5zaYqJBEnQ70lo1u2G/03LcKCIY4n80eSWcui7IwLkgTi5GkQE02O6AUeC++t njEaW+X2jTquvcMSP4ZPwcNQZiZtPGB/UXQbt2GIoovIlK5NQ69uQaNTy+Yn0UnxY8LJ fP3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713288187; x=1713892987; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xfOLZpMeXfJa6rDqZGEVapwFnrzCpl98X6KMQ4708WQ=; b=Rr4ww4g6PfYz7Ask4bquKrm/Z9fcMZk+GgQWda0yqwUIrMr9rzLeO+Lbl1+Qs9Hta1 VHE/TN5rLmkDX5lMgGgFjkSHXtgrsIMELfAGZNhk/r2SkDPsxV5dvmK+/ZMa3U2R3IKS TmhciETgEmoe+YYpzZNXN1BXqhUxbm64eT8SDmcxq3Zcmf4A9yVSzMeo+/kad6szmmz3 W+CF453nwAhsM16Tu46IyY1oVivG0JkXp2MOO21ggjSQM0cAf7YzkWLTYQ2v99AkOX/3 Fxg/k7IuH5ULiWgqVe5gSe9JGiu6/QjeCvycScBH/FESU1bbhddtqZq/GKTGumasOlR0 mjvw== X-Forwarded-Encrypted: i=1; AJvYcCV9F2PMe5FQCNoP8ynhNSk3honwGdMAOq3GzUgpUIpjqvqyAMB01O5B9xB3scNgQrupAmiTTusRICdPx0bdPSy7NRyUempynCx9fI8Zh3rAH5xEbvZXhe4iipixBinztYS6KBSlcGgD7+AYIyYobPS5I+AHyb6CphN30zbs885KBA== X-Gm-Message-State: AOJu0YxjnJTgoRGkzy21+95Pieq1AOi/hcihDrX2BSFQQiH5i8rPwrW5 ioxoawTRB/Q8T4hBvadEkpfu4cmas4s1xJx+DC1MoQimUSK1xnQc X-Received: by 2002:a05:600c:4f14:b0:418:a0eb:5343 with SMTP id l20-20020a05600c4f1400b00418a0eb5343mr1241748wmq.23.1713288186586; Tue, 16 Apr 2024 10:23:06 -0700 (PDT) Received: from eichest-laptop ([2a02:168:af72:0:ac34:e164:f0a1:f75a]) by smtp.gmail.com with ESMTPSA id iv11-20020a05600c548b00b004189c69a414sm2488458wmb.41.2024.04.16.10.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 10:23:06 -0700 (PDT) Date: Tue, 16 Apr 2024 19:23:03 +0200 From: Stefan Eichenberger To: "Russell King (Oracle)" Cc: Andrew Lunn , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lxu@maxlinear.com, hkallweit1@gmail.com, michael@walle.cc, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/2] net: phy: mxl-gpy: add new device tree property to disable SGMII autoneg Message-ID: References: <20240416121032.52108-1-eichest@gmail.com> <20240416121032.52108-3-eichest@gmail.com> <3f7f278f-e490-47f1-971c-ecf44a70cee4@lunn.ch> <5ed39628-4ac0-4c4e-9a16-fd4bf9a6db29@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Russell and Andrew, On Tue, Apr 16, 2024 at 05:24:02PM +0100, Russell King (Oracle) wrote: > On Tue, Apr 16, 2024 at 06:02:08PM +0200, Andrew Lunn wrote: > > On Tue, Apr 16, 2024 at 05:43:16PM +0200, Stefan Eichenberger wrote: > > > Hi Andrew, > > > > > > Thanks a lot for the feedback. > > > > > > On Tue, Apr 16, 2024 at 03:46:19PM +0200, Andrew Lunn wrote: > > > > On Tue, Apr 16, 2024 at 02:10:32PM +0200, Stefan Eichenberger wrote: > > > > > Add a new device tree property to disable SGMII autonegotiation and > > > > > instead use the option to match the SGMII speed to what was negotiated > > > > > on the twisted pair interface (tpi). > > > > > > > > Could you explain this is more detail. > > > > > > > > SGMII always runs its clocks at 1000Mbps. The MAC needs to duplicate > > > > the symbols 100 times when running at 10Mbs, and 10 times when running > > > > at 100Mbps. > > > > > > Currently, the mxl-gpy driver uses SGMII autonegotiation for 10 Mbps, > > > 100 Mbps, and 1000 Mbps. For our Ethernet controller, which is on an > > > Octeon TX2 SoC, this means that we have to enable "in-band-status" on > > > the controller. This will work for all three speed settings. However, if > > > we have a link partner that can do 2.5 Gbps, the mxl-gpy driver will > > > disable SGMII autonegotiation in gpy_update_interface. This is not > > > supported by this Ethernet controller because in-band-status is still > > > enabled. Therefore, we will not be able to transfer data at 2.5 Gbps, > > > the SGMII link will not go into a working state. > > > > This is where i expect Russel to point out that SGMII does not support > > 2.5G. What you actually mean is that the PHY swaps to 2500BaseX. And > > 2500BaseX does not perform speed negotiation, since it only supports > > 2500. So you also need the MAC to swap to 2500BaseX. > > Yes, absolutely true that SGMII does not support 2.5G... and when > operating faster, than 2500base-X is normally used. > > How, 2500base-X was slow to be standardised, and consequently different > manufacturers came up with different ideas. The common theme is that > it's 1000base-X up-clocked by 2.5x. Where the ideas differ is whether > in-band negotiation is supported or not. This has been a pain point for > a while now. > > As I mentioned in my previous two messages, I have an experimental > patch series that helps to address this. > > The issue is that implementations mix manufacturers, so we need to > know the capabilities of the PHY and the capabilities of the PCS, and > then hope that we can find some common ground between their > requirements. > > There is then the issue that if you're not using phylink, then... > guess what... you either need to convert to use phylink or implement > the logic in your own MAC driver to detect what the PHY is doing > and what its capabilities are - but I think from what you've said, > you are using phylink. Thanks for the patch series and the explanation. In our use case we have the mismatch between the PHY and the mvpp2 driver in 2500BaseX mode. If I understand the patches correctly, the PHY should just return in its query_inband function that it does not support inband when 2500BaseX is configured as it is done for the Marvell phy driver. I will try to test this on my end and give feedback, unfortunately it will become next week as I won't have access to my test setup until then. @Russell: I hope it is nothing serious with your health and wish you a fast recovery! Best regards, Stefan