Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2958448lqt; Tue, 23 Apr 2024 06:54:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBg2TxyXH6vnufwXwZ+vYnNXBEzj7GfR859c2pe/EjxzVvRCiV6LtA6neqFgFsgo0vCiussTrZpYhNOz1552WoRDDC+ftY0TNN5JQ1xQ== X-Google-Smtp-Source: AGHT+IEqAPo3ysKOza3Y8pQJYsH2J2+166GY083caU2s9GPVgyG3jokQz/6695gyJLAbmz+PaZAa X-Received: by 2002:a05:6a20:2586:b0:1a9:c403:1598 with SMTP id k6-20020a056a20258600b001a9c4031598mr14678449pzd.21.1713880473913; Tue, 23 Apr 2024 06:54:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713880473; cv=pass; d=google.com; s=arc-20160816; b=FSe02XfUU1CFQaV3/9ZkKEhcaG3w30TuUZgtq3fX1Pw6cKUVJDx5yugPB0GH3oHAhG JaSBgy9qbgZ7QPylcRUXDdwQtLYEphXiMjXvJzf9B0YyrF6q+fCtubFdvR8zRz90vt1a 1oIrpvjOFYn2pyVZOy5SaT+ePzSOoWuNeN35qpbxPgCzHbk3QiyBZ+Fjd/h/aju8vrXu zwj8uF0jcUoNXJSNdMhE4a1fL7j8w49h5aNWATBds2h+vRiEpFxbQpqrVL5bc4rSFlw7 9jSFFV/nlM+wKBIvjjlqXfQwoa1PXRaae6KWNEqcMK7ruqvMjIEA8eyF71cJDxiIpAUQ AfEw== 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=s3YKQMPPOSe3cbXRolJIM4F6EaHHPmGqQ7p73KakavQ=; fh=xV2r/+TC7FtCE0s2dIog/uJsw+QOs9TkYcURHvSeFM4=; b=Og2PXqTxhc1zc2Y+lkgr/jfdGze+0KiMQb7UkL8ltsCcJYWiAIhTb7QEcQkn/vyZAP XNC+oEETTOd4s6ffL+uBed0EHy5XOkvbgAGzUrTJ8rGUISlvuPGOZm6Me5ZrAEtgt4Ue M7DHCZVlPealgxW7g8XvGpoG7p8ClFxM87URfknaxruQQyRybvi9AwaViKY57ZEbpMbu Gl+y4u/KFtUja4haf3D/QLsqlW3sxG1Z8QiPIuIhP0JWVtBV60JOIShISHEFMR3fh/ef cZgwQiTcaG1ATXWTHF54JXWyYIQZLyHq5ogNR/ArycqwFSilpfQbdEyCswin6Rkclq2o +ofg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KED5v42A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 4-20020a630004000000b005f7e11f0557si6773860pga.892.2024.04.23.06.54.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 06:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KED5v42A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155276-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1D9E1B2828A for ; Tue, 23 Apr 2024 13:23:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EECBE135A72; Tue, 23 Apr 2024 13:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KED5v42A" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 186FA745E2; Tue, 23 Apr 2024 13:23:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713878590; cv=none; b=rRDtUZTxggv25GvDNQs/MGNCCt5llfDNvc9r4Nr9s6jJP3jvr1ej/P1liWN/QOkH8XSIcKrKquykmvxBwOHbQJ+SX3JovPZxFYQYGuXfjERKwV10dMY0g4mGM9DVj3yShNTatdcFH5QA05jHjPBywYn/5q3/Yfy1FJTaTCi4mhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713878590; c=relaxed/simple; bh=Y3e+kyYzGZmeqX9U2y8Sf5GaMC6t/3cbauRRDhpXMhE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DxnE/6XIP8bu/Phj7qrqQmLKKbuwGBv3UQUW50Kh/tbJCOhB025Ly4X29E7JAkszPFd6zn4q8mmNcWdxwYF8ku7+vofBHOyS5YR1HvOwXL4UWlt2HdD1oXzb3CGbfjBwy7T1vRpmRWfbfbqGdJ2nrzdi0dyHu8h2RZDuIJHCkhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KED5v42A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D2E8C116B1; Tue, 23 Apr 2024 13:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713878589; bh=Y3e+kyYzGZmeqX9U2y8Sf5GaMC6t/3cbauRRDhpXMhE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KED5v42A/DIYWTinaT6HqZ0EzXjUr/GomwKAiORVTHqV3Qh9fIy66439eRBhYoqwv EOvMe9pDnPvmkhEXh6PL9LftXU9Mm0nYAvr45JyMrwFuqCjWZCFqQkjaFxXuNVHEAc BZ5Ns8FatnJO7xpQ33PIzjx8BbzxQCM7SJpXPCCMoR4kNj1V+KLUMIaMCvUfLHFCb2 84cs3gH35Qbnp/Cm5Rz6VJkaAO8bx7IO752OdXImQvv+1jg2vOsoUWDte9/imL10cl SUYBichI0SnZxDT5+Ayzxur9FAw3WU7lNP6a8XDHtcld32dGJa98fiGJEh8DcP1pE+ ncXSNdg3AEguA== Date: Tue, 23 Apr 2024 14:23:04 +0100 From: Simon Horman To: Stefan Eichenberger Cc: 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, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, 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: <20240423132304.GS42092@kernel.org> References: <20240416121032.52108-1-eichest@gmail.com> <20240416121032.52108-3-eichest@gmail.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: <20240416121032.52108-3-eichest@gmail.com> 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). This allows us to disable SGMII > autonegotiation on Ethernet controllers that are not compatible with > this mode. > > Signed-off-by: Stefan Eichenberger > --- > drivers/net/phy/mxl-gpy.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c > index b2d36a3a96f1..4147b4c29eaf 100644 > --- a/drivers/net/phy/mxl-gpy.c > +++ b/drivers/net/phy/mxl-gpy.c > @@ -114,6 +114,7 @@ struct gpy_priv { > * is enabled. > */ > u64 lb_dis_to; > + bool sgmii_match_tpi_speed; > }; > > static const struct { > @@ -262,8 +263,17 @@ static int gpy_mbox_read(struct phy_device *phydev, u32 addr) > > static int gpy_config_init(struct phy_device *phydev) > { > + struct gpy_priv *priv = phydev->priv; > int ret; > > + /* Disalbe SGMII Autoneg if we want to match SGMII to TPI speed */ nit: Disable