Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp513397lqb; Thu, 29 Feb 2024 07:24:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWzjqjMyZqbt3g04tbNsXz9R24eldP3GEHr9Vc4H+u1qzDouVMxByPO7zJe9nCbiU0aNJpOhaZfw9ZkhjgApVXyUNOhI4NNpwAlbcptjA== X-Google-Smtp-Source: AGHT+IFqhMTlI3RZSQIhIaAp3CCHYuHE6QShfPNctdOc1uy9XD6rZPoo6U3yEyOud2BBrtFA1U+Q X-Received: by 2002:a05:622a:170a:b0:42e:aa90:ab6e with SMTP id h10-20020a05622a170a00b0042eaa90ab6emr2852014qtk.48.1709220254817; Thu, 29 Feb 2024 07:24:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709220254; cv=pass; d=google.com; s=arc-20160816; b=RT+ztL4ncZhI+VyKR9B36sxGrwlJZcJ3Zq+673L5FlDbq8874wU5pAJajJIHJDVxAM YcwCMUcNbp7pFtBj6Lxnkn0fwrXXZws+2NuR/sJ/Wqn4Kmti93JO9kRQ1Fh5m5k+sXdt jKD7dJQVtnKtjODXYuKssXRb/BdUERkHubVdOb1hK6aJ16tXlGYuhZL+zTACRAg+2ctF kZdbYte6/bOKBioaH1+W+V8SWKRypZSCyUWDJtyjMS1yCoQF/sdySXX1SduRkTUBrrwX uv6dkHKbas4wdgZkRnIeZBVd4CHg0zACD7xCXGoOzLqwdVXrYtsadu89uVAEPKsQ9DNl 5oDw== 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=fpeGkSY3A7dXRsptcNnoUKHKhLiXr1DwW0RmJgm1X0Y=; fh=SqVNk/AEsshgNi9P/J/8peWi9QS/qxYlXeemt/D/8xE=; b=bwAaFq/89zfsvc1PPLLQ+x6vXB2qiP2uiYbx8snrkA+w7Z7rZsYcZnDex2Wb4tJXxN gQjpSNugUXlgMYuy623cmJzC0H38yhhxfEAdQTpUO1H4MbpxmQQQXk7je99KS8I4kPES 8qHTN1i1Pp8L7EoKAYej/WUIJAeJIXT39Qdq+l+JA7/drmRsrZ1oUmQAptnO8Vx6sxZM kwz1iGziedOfm9HOcfFaNf6TwZARFt8yduYlbROtPtr4E4aNGNQy0XHIZHoCGET7kQa+ VvH27m9g3X0bRBBS2nuLNXPPWgjujuH9VZCh6aMgzfM5US3DBjTWFOgMyWPxJIjmnQ+o pX+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=criRIg0d; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-86919-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s24-20020ac87598000000b0042ebb41ec8fsi1191989qtq.156.2024.02.29.07.24.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 07:24:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86919-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=@lunn.ch header.s=20171124 header.b=criRIg0d; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-86919-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 8D28A1C23036 for ; Thu, 29 Feb 2024 15:24:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BC9F13B7A0; Thu, 29 Feb 2024 15:23:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="criRIg0d" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 565F913774E; Thu, 29 Feb 2024 15:23:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709220232; cv=none; b=uLsKZqZDOfR2v0S45dzfp+71xFdjMozAfjjc3xbRELm1vTXPiIoTg/mgNkZGlUYYiZuzzduq6AGblY2OOtLGiHq3kfxVir7QsCv9/yZuV5FYot7CZ55af+nlcvFsjPjdda24g68az5p6pWmbRA8cKlXrGGlX/+x7/Lma6+SymoU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709220232; c=relaxed/simple; bh=VR3w9qMQENCkQog/l/A9YqEp7V7m/a1O1eceAfQHDV8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JiJ3bl9KmuLAFCrjt7CDlv28tr/ZwofocIpiaqmKYnhCGmaGJYemGLhYF6zTV6lC/pQT//w+XQMQpHT/QgZIkw8gaNPYGNOiuQz64uQhcHUrgC+3C6CGPZhNH/4OHRfiCiBjV94z3x3DyeO6XGo3vZKWW8mlgKa+dGhvW3M883w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=criRIg0d; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=fpeGkSY3A7dXRsptcNnoUKHKhLiXr1DwW0RmJgm1X0Y=; b=criRIg0dtEXQf6tdodfSJg5wWp sxJ7KokXv5tBurmJM4/okCh+eo2kWmM+bwf9A3ePMS5J9SiRALkz1FPVjGWDqnfRePCVEiXUZjjSs 24wfIEdBNh+OtS4QQXnEm32Sf2MykHIKqwoVHy7y0EsvIHMk9KzMwSUmx6zXc/YSTtLg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rfiGN-0093GS-LT; Thu, 29 Feb 2024 16:23:59 +0100 Date: Thu, 29 Feb 2024 16:23:59 +0100 From: Andrew Lunn To: Bastien Curutchet Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Pavel Machek , Lee Jones , Richard Cochran , Heiner Kallweit , Russell King , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-leds@vger.kernel.org, Thomas Petazzoni , herve.codina@bootlin.com, maxime.chevallier@bootlin.com, christophercordahi@nanometrics.ca Subject: Re: [PATCH v2 6/6] net: phy: DP83640: Add fiber mode enabling/disabling from device tree Message-ID: References: <20240227093945.21525-1-bastien.curutchet@bootlin.com> <20240227093945.21525-7-bastien.curutchet@bootlin.com> 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: On Thu, Feb 29, 2024 at 08:31:55AM +0100, Bastien Curutchet wrote: > Hi Andrew, > > On 2/27/24 17:18, Andrew Lunn wrote: > > On Tue, Feb 27, 2024 at 10:39:45AM +0100, Bastien Curutchet wrote: > > > The PHY is able to use copper or fiber. The fiber mode can be enabled or > > > disabled by hardware strap. If hardware strap is incorrect, PHY can't > > > establish link. > > > > > > Add a DT attribute 'ti,fiber-mode' that can be use to override the > > > hardware strap configuration. If the property is not present, hardware > > > strap configuration is left as is. > > How have you tested this? Do you have a RDK with it connected to an > > SFP cage? > > I did not test fiber mode as my board uses copper. > > My use case is that I need to explicitly disable the fiber mode because the > strap hardware is > misconfigured and could possibly enable fiber mode from time to time. O.K. So lets refocus this is little. Rather than support fibre mode, just support disabling fibre mode. But leave a clear path for somebody to add fibre support sometime in the future. Looking at the current code, do you think fibre mode actually works today? If you think it cannot actually work today in fibre mode, one option would be to hard code it to copper mode. Leave the configuration between fibre and copper mode to the future when somebody actually implements fibre mode. Andrew