Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3163111lqo; Wed, 15 May 2024 01:16:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+U1yuTaYErQRMO5PXT3URUXjPQzlfSzwNWHYyg35KPJ6Bs2Jz6ZsKetnQL3SSsd9satSly5PvrzzRrBA1VbvzRFd8AFGSq7vDBaIPGw== X-Google-Smtp-Source: AGHT+IFexVB38IwTIp3wOWC9WzVXMZd24jy5/1B9eeTqEzoflCuyMLmnJEt72S1sokD76rDaavOZ X-Received: by 2002:a17:907:7f08:b0:a5a:63bf:5175 with SMTP id a640c23a62f3a-a5a63bf5227mr852558066b.10.1715761015385; Wed, 15 May 2024 01:16:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715761015; cv=pass; d=google.com; s=arc-20160816; b=BJtRosSihpP4D4waakcI1gmKxWWX54zYI+ZxbhC63Hb/kBrZqxQDip26tQ3iLR4PWV mJr9hn3T+qmbCSiEaBlJAyekTmpVAWkSjIHZF4mjhyQn9/cqIuwTtbYY7YHYL4ur+glx Tmjv0RVLqOKdftl4N3RwvOsVLf9DyGvlZCiwuz9JgXaRJKjoJS2NLB04UClyJAbBIU8E 1imM4ies3DVUekbtJ4ULplHITChRYOe8P9TcizWWtIp3JpQx4BC8i+JdcurV5wVswAn5 WNVxQi432jUN3udB7AxDrFiXgv8VA3obcWZmI5i6+yIs+ctPrV5YP675Duo+K/diGwD/ qcwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date; bh=k3vJivz7tYiYnXEEJjKQLatXMhUo67QkpiIYk3bJhrE=; fh=Oz6R60uTqaMUwTS+1qOQvqMBsSEPz84vQnvd//tG+8E=; b=nCMefIEAAPupS3RiOQ+o0BE7YP4fjQGxtNki0xK7nUx2s7kyEDceklZlHik+JPw6r0 0SSFKiitDbjdFZD70NTjdnw7G7StT4P0opIGnFL+Bt993W1n1NhcuoaN1NZBsk28thlZ IR7D6cIrA2zfyO7f1N/1vHnrtzj1VdqgmVqPhQK8hZzXi6dN1XuIYlOJr9HB0dnmO4KI /zMwKnpwbDp2iWYcrE4ge6KZpChMRMzuMnxPRBAYOuhQ9fx1IW5jPG8FNPSkoGK0Z/SZ bYew3ujA9il2oNn9uARn+uAfMydy4MtVD+rW8UCESH1Na47GRIFrAyc98ua/qC6SOVqN F3kQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=brueckmann-gmbh.de dmarc=pass fromdomain=brueckmann-gmbh.de); spf=pass (google.com: domain of linux-kernel+bounces-179639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=brueckmann-gmbh.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a179464fcsi690282766b.170.2024.05.15.01.16.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 01:16:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=brueckmann-gmbh.de dmarc=pass fromdomain=brueckmann-gmbh.de); spf=pass (google.com: domain of linux-kernel+bounces-179639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=brueckmann-gmbh.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 23B671F21A25 for ; Wed, 15 May 2024 08:16:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C454C4D5A0; Wed, 15 May 2024 08:16:45 +0000 (UTC) Received: from mxout37.expurgate.net (mxout37.expurgate.net [91.198.224.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B49C38394; Wed, 15 May 2024 08:16:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.198.224.37 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715761005; cv=none; b=Pag61lRWsOL36Syds1O3urp8jaZhZ9ly7HfJrbaVHcZOsfmTtEBAi2S4J57plg0hzK2dsduoB/ezIeHMEkGrCFBVfGYPXGc+Wj/YkJOb9Yis3EPS1pwgbLFRrhtwwFJVfJyqosEuIz2L6KpRrUtBVRqd1ZK1ahAYGqhhKHP3n78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715761005; c=relaxed/simple; bh=0CMSPU5h0J/+LSIFiRA0tPZIyssveOFv2H3maVZ1/UE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=nkDJ/R4gsoeCHlMK9NBpszOu67lmjgRA6eg2QeHxNxaNry/ZnarzKFHtffEaWJnQMJc2GL3SylY89Pi8lbXJ7mCJhboiPS+CiCTWa1XjEeR0esJCuP5YhRY2vbUJ1j1gZ+eIWQSb3LCCOt4lm4vfHDoKKT5hi1d5FDLrbYad4rM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=brueckmann-gmbh.de; spf=pass smtp.mailfrom=brueckmann-gmbh.de; arc=none smtp.client-ip=91.198.224.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=brueckmann-gmbh.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=brueckmann-gmbh.de Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1s79oI-00GvF1-Jj; Wed, 15 May 2024 10:16:26 +0200 Received: from [217.239.223.202] (helo=zimbra.brueckmann-gmbh.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s79oH-00FeBY-7h; Wed, 15 May 2024 10:16:25 +0200 Received: from zimbra.brueckmann-gmbh.de (localhost [127.0.0.1]) by zimbra.brueckmann-gmbh.de (Postfix) with ESMTPS id 16524CA6082; Wed, 15 May 2024 10:16:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.brueckmann-gmbh.de (Postfix) with ESMTP id 073C6CA6122; Wed, 15 May 2024 10:16:24 +0200 (CEST) Received: from zimbra.brueckmann-gmbh.de ([127.0.0.1]) by localhost (zimbra.brueckmann-gmbh.de [127.0.0.1]) (amavis, port 10026) with ESMTP id Tando0cXENj8; Wed, 15 May 2024 10:16:24 +0200 (CEST) Received: from [10.0.11.14] (unknown [10.0.11.14]) by zimbra.brueckmann-gmbh.de (Postfix) with ESMTPSA id DE4B5CA6082; Wed, 15 May 2024 10:16:23 +0200 (CEST) Date: Wed, 15 May 2024 10:15:33 +0200 (CEST) From: =?ISO-8859-15?Q?Thomas_Ge=DFler?= To: Andrew Lunn cc: Thomas Gessler , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, MD Danish Anwar , Ravi Gunasekaran Subject: Re: [PATCH 2/2] net: phy: dp83869: Fix RGMII-SGMII and 1000BASE-X In-Reply-To: <38bc6947-391b-478d-ab71-6cc8d9428275@lunn.ch> Message-ID: <338669-229a-5eac-3170-3477e5ae840@brueckmann-gmbh.de> References: <20240514122728.1490156-1-thomas.gessler@brueckmann-gmbh.de> <20240514122728.1490156-2-thomas.gessler@brueckmann-gmbh.de> <38bc6947-391b-478d-ab71-6cc8d9428275@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 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151534::1715760986-FD9A0776-272ED94F/0/0 On Tue, 14 May 2024, Andrew Lunn wrote: > On Tue, May 14, 2024 at 02:27:28PM +0200, Thomas Gessler wrote: > > The RGMII-to-SGMII mode is special, because the chip does not really act > > as a PHY in this mode but rather as a bridge. > > It is known as a media converter. You see them used between an RGMII > port and an SFP cage. Is that your use case? Basically. I would call this an RGMII-SGMII bridge. A "media converter" I would call a device that changes the physical medium, like 1000BASE-T copper/RJ45 to 1000BASE-X fiber/SFP. We have this chip on a daughter card with exposed SGMII lines that can be plugged into customer-specific motherboards. The motherboard will have either an SGMII-copper PHY (this can also be a DP83869) with 10/100/1000 auto-neg enabled but without MDIO exposed to the CPU on the daughter card; or an SFP cage. The SFP module, in turn, can be for 1000BASE-X fiber, 1000BASE-X-to-1000-BASE-T copper, or SGMII copper supporting 10/100/1000 auto-neg. So I would like to support all those configurations, which can be done with this chip. > > SGMII PHY and gets the negotiated speed and duplex from it through SGMII > > auto-negotiation. To use the DP83869 as a virtual PHY, we assume that > > the connected SGMII PHY supports 10/100/1000M half/full duplex and > > therefore support and always advertise those settings. > > Not all copper SFP modules support auto-neg. This is all really messy > because there is no standardisation. Also 1000BaseT_Half is often not > supported. I agree. Is there a better way to implement this use case? The problem remains that in this mode the chip is not really a PHY, but rather a bridge to an external PHY. See also Russell's e-mail. I actually started out by NOT supporting or advertising any of the 10/100/1000BASE-T speeds when in RGMII-to-SGMII mode. This also works for the SGMII auto-negotiation, since all it does is get the negotiated speed/duplex from the connected PHY. However, this leads to a problem when trying to disable auto-neg and force speed with ethtool. phy_sanitize_settings() will then limit the speed to 10M because 100M and 1000M do not match any supported speeds. Thomas