Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp267284lqi; Wed, 6 Mar 2024 17:13:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX6muImCMdNdTSuLiVHKTdtnp7AH+JxyhU3MDb1n49SpFLBF6hy9n9tHRlJ3sRXyEjYbwZhlm/LoJOb156PvJTjO4ziZPUyos6+xnZghA== X-Google-Smtp-Source: AGHT+IE8DGtra9dL+EMvohi3bikFiO6Y1BKLeXwD/VudqPBuo/TzuPrU1T/HQtrTE7EpbJap9FtU X-Received: by 2002:a17:906:564b:b0:a44:3056:1ec1 with SMTP id v11-20020a170906564b00b00a4430561ec1mr32268ejr.6.1709774005040; Wed, 06 Mar 2024 17:13:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709774005; cv=pass; d=google.com; s=arc-20160816; b=VsbolVg0ajI+zB7X+bzG+IgVpp10Lha0rvXyr0hHTDbNoKoDMjGZOigWyBJUGtQPjA IoWbvrNzN0Cm/eXnO61xbk3kc4cUsRi1go+M+kYYqitOHwolq/y+6E+to0QYv/aJBksk uaXLU98eesd4s5nC1uxP3yvJOHg1iKaj71fdGStrqihr8BmDhyeWXVBp0nHNO7RPjwc5 C9n4BPfSyHK7+z9elEW6MHHlCS/+mNDspfqoSic73Prjjcp55MTEPXhU4iG4zw5kHyaV dVPoEO1BKv0FD1qYjiDZYfLBO4Xdk11V+FW6Ck9Ca1SyQMR/qF766UdAs4tu34ylehRT NQVg== 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=5sGcklaR+Uln4FMN2IExD3g52cHOSe/gl+dclElMBzY=; fh=iT69aLAFCaAL1ECVELFGqnZRVt9iikoJcvzeKR1Ry4g=; b=MMVjmoMdClmFlx+FF5C5wcx2+hiL0w5DUKSy0xtV5NEHPeu8DJDls4o+i3PAw7+OY6 4zIQU+6HX0qFWC7hCAO7fHeknIKDXWoupWYN8OVJI3dAgZBfP3IVNCU7AXftII8SPnSV hM8k9comzVnxDzR1yWvRIEj1gPxFEMvBgEgMN5WhlPHcJE5ql3zF+Z8h1EQNOxAp+Nsy C+fL57lfIlcJrdHZlOAAS0sv4I5xPT3tP7Rh9qf62YfI0P3lFaZTaYrmc7gj8TgfkUw7 UqwGbD/1gWpdw1fZNoA6QnHDyydmWZoq48qJnlQVcotH8227EXMb7s5/MlEIgs4f8uD6 BueA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=3EgwL5aR; 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-94816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lg3-20020a170906f88300b00a45c0e7aa44si736969ejb.961.2024.03.06.17.13.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:13:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94816-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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=3EgwL5aR; 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-94816-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94816-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9B5D51F23BBC for ; Thu, 7 Mar 2024 01:13:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFEF54C9B; Thu, 7 Mar 2024 01:13:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="3EgwL5aR" 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 3F8E9441F; Thu, 7 Mar 2024 01:13:09 +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=1709773992; cv=none; b=RBiOLc9LzT2RGOHUCqNwl3/mEwMf+2ueSV0T9XI3MQXSJ+ZzPklAscwYuYkw2JLdSlsE3NfZ+CSGHa0V6DPX+r2khwqaRbn82/3bT1ugHdf9oVG9M7lFNYN44wA3NO44hsjKOtOf6I5HHQEwf1Ep6NNLyruWQUhQSwiIuGBn1ds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709773992; c=relaxed/simple; bh=de5ZxAMOpyhXT1T1JXFC47CP0MDYZQKgsWVDcCrzfKA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ea+PzW0nKyy86QCjwLbrnW4NepvgFseE1cDBHiHcQRc2IBrV+mmsFU2sCqEHc7I6Cv752j6VnNXJL43m1LRszcuzksSdthf1cCuvUJ9IGxU3dvgfKC8EgXudsLfYR0xIA00uzKwyWjtv95/Q7fGUiJVbX5JND2kJmpyb8SaWH9w= 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=3EgwL5aR; 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=5sGcklaR+Uln4FMN2IExD3g52cHOSe/gl+dclElMBzY=; b=3EgwL5aRkD3ZspkODCgvMOs2F0 CnMNXkVS2G1a/Xb0vAnpC/2Qv86zbsN8r4VMq4C0xXqdvfiM4bgc0dteoTwl2pNPJSjDGybNI7jyo worW4tIwuPDd3rMAwuLmmoZixnIlKbDq+DNbYoBQ5hdLjiQNtHVZrGMkrSchiQ6GU9O8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ri2K4-009XtG-NZ; Thu, 07 Mar 2024 02:13:24 +0100 Date: Thu, 7 Mar 2024 02:13:24 +0100 From: Andrew Lunn To: Parthiban Veerasooran Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, saeedm@nvidia.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, horatiu.vultur@microchip.com, ruanjinjie@huawei.com, steen.hegelund@microchip.com, vladimir.oltean@nxp.com, UNGLinuxDriver@microchip.com, Thorsten.Kummermehr@microchip.com, Pier.Beruto@onsemi.com, Selvamani.Rajagopal@onsemi.com, Nicolas.Ferre@microchip.com, benjamin.bigler@bernformulastudent.ch Subject: Re: [PATCH net-next v3 06/12] net: ethernet: oa_tc6: implement internal PHY initialization Message-ID: <8c2b95f4-75a7-4d6d-ab9c-9c3498c040d8@lunn.ch> References: <20240306085017.21731-1-Parthiban.Veerasooran@microchip.com> <20240306085017.21731-7-Parthiban.Veerasooran@microchip.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: <20240306085017.21731-7-Parthiban.Veerasooran@microchip.com> > +/* PHY Clause 22 and 29 registers base address and mask */ > +#define OA_TC6_PHY_STD_REG_ADDR_BASE 0xFF00 > +#define OA_TC6_PHY_STD_REG_ADDR_MASK 0x3F [Goes and looks a 802.3] Clause 29 is "System considerations for multisegment 100BASE-T networks" I don't see any mention of registers in there. TC6 says: "Clause 22 standard registers and Clause 22 extended registers (Clause 29) are directly mapped into MMS 0 as shown in Table 7." Going back to 802.3, we have 22.2.4: The MII basic register set consists of two registers referred to as the Control register (Register 0) and the Status register (Register 1). All PHYs that provide an MII Management Interface shall incorporate the basic register set. All PHYs that provide a GMII shall incorporate an extended basic register set consisting of the Control register (Register 0), Status register (Register 1), and Extended Status register (Register 15). The status and control functions defined here are considered basic and fundamental to 100 Mb/s and 1000 Mb/s PHYs. Registers 2 through 14 are part of the extended register set. The format of Registers 4 through 10 are defined for the specific Auto-Negotiation protocol used (Clause 28 or Clause 37). The format of these registers is selected by the bit settings of Registers 1 and 15. So clause 29 is not making much sense here. Can anybody explain it? > +static int oa_tc6_mdiobus_register(struct oa_tc6 *tc6) > +{ > + int ret; > + > + tc6->mdiobus = mdiobus_alloc(); > + if (!tc6->mdiobus) { > + netdev_err(tc6->netdev, "MDIO bus alloc failed\n"); > + return -ENODEV; > + } > + > + tc6->mdiobus->priv = tc6; > + tc6->mdiobus->read = oa_tc6_mdiobus_direct_read; > + tc6->mdiobus->write = oa_tc6_mdiobus_direct_write; This might get answered in later patches. PLCA registers are in C45 address space, VEND1 if i remember correctly. You don't provide any C45 access methods here. Does TC6 specify that C45 over C22 must be implemented? The standard does say: Vendor specific registers may be mapped into MMS 10 though MMS 15. When directly mapped, PHY vendor specific registers in MMD 30 or MMD 31 would be mapped into the vendor specific MMS 10 through MMS 15. So i'm thinking you might need to provide C45 access, at least MMD 30, via MMS 10-15? Andrew