Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp974606lqj; Mon, 3 Jun 2024 06:47:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqCyZiGvcEJkJ/OALCEHmo43nTDFrPK0nVIEL2OYGs/RxgpTeNC3vD7wKF3ybg3kFy4el4Wv4LnWWVfzqnSR9v/OU1lG922tY1TGl04Q== X-Google-Smtp-Source: AGHT+IFru6hEFTc2PpHnLQbprK0Y8kcUQ061nGX7ozkFp517mV8xMhvzwjAoIPTmbar7nps3ZeS1 X-Received: by 2002:a05:6e02:1a88:b0:374:a422:bb3 with SMTP id e9e14a558f8ab-374a4220fbdmr13298085ab.13.1717422425377; Mon, 03 Jun 2024 06:47:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717422425; cv=pass; d=google.com; s=arc-20160816; b=uY4se4G5LKMrwxKfe8O5/s8TTRzlQibToqivHvMBLPqdCBAxwzMMs+rF5Rm6gQvNiF DsSxLS+stBjzQ0mne+5lzSBA31uoDXznXUv52iqKPy9x6xNwx9EgngnS1BiIJQgmx7fT vEIerFOpQLR1QiC5+wuwbHfogHjFtffcTxpJp2/C5E4av1c28OSU4m1H/3mruD/dLzwM PbXQgW1BANsZU/FOCcZZbEyUIP+vARpq7QhOhUTQpf5qqhaN/jqMf3XClHd7O/SIj/Me uXDgOC8FXZxEwaCw7v8ZEszMfj5Q75DvMCsRYTbJ4qBd/ixSrx+yrSfbnk61q6Ak9qHv xaZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=M5ah77INyaKh5P58D9AxRt+KkH3818+oFIrbjxKeZn4=; fh=OgZAIOTfvcXrjgmSUc3m3l4hTUI9QlNQRlhVbGfEGII=; b=M2UyUsXtGWKkZzxpK7Ma6b7W4kEudEnkAXqvrcEMYfBkhOoe8CCOSSvyD8936dlOsi CQSrmtkMoQWmtaiukfJ57H0zVy6yg0DVE7UUFxtWZ7rkOZsKn7LJuoNEpyNbjSt8b37z iowrsbYFhtOJwijU/aNu+GMHsiHXpq/KAgOYkN8lsy+HtN0sdegwJw9lTHRUrhlU+n5B L+U+KKJJnQICEZG9hzwBpElLNVC2oNEVcSP9AG6gvB380SrNM8/sTI2BdjjftBn5gqI8 WJoMZQUaCGcM7dc8+JdguzuYyYMHDvr3gBTlwhzwodHtZc8is4YdFQb7dWlVy5o+CW3C lUQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=HQNIuOPp; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-199238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35a0e6a9asi6613946a12.391.2024.06.03.06.47.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 06:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=HQNIuOPp; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-199238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F330B2895E6 for ; Mon, 3 Jun 2024 13:42:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7983112EBCC; Mon, 3 Jun 2024 13:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="HQNIuOPp" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 D61FA12D767; Mon, 3 Jun 2024 13:41:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717422119; cv=none; b=Hbd81G59Y3Ot4yHfoCLfsiHoHaPRPv0pX9xeY0R1B9adeavl/ULGqjwMiUfI9GZ9bpJTey0rFreRgep+dZ5i+EpbcYIm7qT/deieU3OX9sPmrf6w27Stohy/0b7vdeGOusrXXmwWjEH1reXz3QGNAdkHd9C5IauA0lnAMPF5V44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717422119; c=relaxed/simple; bh=OhRPQVA+nlxtKCwbRW1dsWRDMm4egZj4cJ4Hhi74VsU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GngKyfBXQ3EpElaw/lIoNCLRHpF8Ob74/srqjG94VdO9/8QipgG+jHkEzXEPMDtlp38l+MbXYC2/koAk8Mj0Dj18FT9GfqzFSuBHgsTOHTGEuxhbp40OJDdkWNxPGuQqAeIgIzdjkmX1t31RYWHCS5uV1XBEGyMT5XwjslV6uJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=HQNIuOPp; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=M5ah77INyaKh5P58D9AxRt+KkH3818+oFIrbjxKeZn4=; b=HQNIuOPpNyUPOdCjHpx4IOa0dA 1d1T3e6XNFKcNIxNLB1yd+IcAdrHeeja7KY6gJQ8l7EnkmT8TkcE9fRwvoZiKrE4UuKeIbXS+p1Pz hIqFe9H/0nX7W2GCfUdm2Kj8nfTTCEL5bkiwai7t1IBmiyMRVfN4c/Gn+p+NAp6YMPrzOhP5Pm4/3 yte5ny25yih4EIAs2voq8DE2Gft6jYXx5j1s90s5LHVA0s4t0yptm2gA2ZiR883rRPOuUzK6K6qE5 iDr0MVNU3OSf0zG9M9/YIIIHxz6Y/jDLlcpKPwEgFuEAlfHJ8ylbsk5n9oMsIIBzwYU5aAvNZ/6Wn GlQqp5Wg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:52728) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sE7wW-0002oi-0I; Mon, 03 Jun 2024 14:41:44 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sE7wW-0000UV-T1; Mon, 03 Jun 2024 14:41:44 +0100 Date: Mon, 3 Jun 2024 14:41:44 +0100 From: "Russell King (Oracle)" To: Daniel Golle Cc: Sky Huang , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Qingfang Deng , Matthias Brugger , AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Steven Liu Subject: Re: [PATCH net-next v6 5/5] net: phy: add driver for built-in 2.5G ethernet PHY on MT7988 Message-ID: References: <20240603121834.27433-1-SkyLake.Huang@mediatek.com> <20240603121834.27433-6-SkyLake.Huang@mediatek.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: Sender: Russell King (Oracle) On Mon, Jun 03, 2024 at 02:31:46PM +0100, Daniel Golle wrote: > On Mon, Jun 03, 2024 at 02:25:01PM +0100, Russell King (Oracle) wrote: > > On Mon, Jun 03, 2024 at 08:18:34PM +0800, Sky Huang wrote: > > > Add support for internal 2.5Gphy on MT7988. This driver will load > > > necessary firmware, add appropriate time delay and figure out LED. > > > Also, certain control registers will be set to fix link-up issues. > > > > Based on our previous discussion, it may be worth checking in the > > .config_init() method whether phydev->interface is one of the > > PHY interface modes that this PHY supports. As I understand from one > > of your previous emails, the possibilities are XGMII, USXGMII or > > INTERNAL. Thus: > > > > > +static int mt798x_2p5ge_phy_config_init(struct phy_device *phydev) > > > +{ > > > + struct pinctrl *pinctrl; > > > + int ret; > > > > /* Check that the PHY interface type is compatible */ > > if (phydev->interface != PHY_INTERFACE_MODE_INTERNAL && > > phydev->interface != PHY_INTERFACE_MODE_XGMII && > > phydev->interface != PHY_INTERFACE_MODE_USXGMII) > > return -ENODEV; > > The PHY is built-into the SoC, and as such the connection type should > always be "internal". The PHY does not exist as dedicated IC, only > as built-in part of the MT7988 SoC. That's not how it was described to me by Sky. If what you say is correct, then the implementation of mt798x_2p5ge_phy_get_rate_matching() which checks for interface modes other than INTERNAL is not correct. Also it means that config_init() should not permit anything but INTERNAL. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!