From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88E0EC47255 for ; Mon, 11 May 2020 10:49:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5511920801 for ; Mon, 11 May 2020 10:49:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UAHsguKk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="e9OxMr3U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5511920801 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PboU0NmSWD2EZGWc6ZgzyPfLWEcUkNsL3nfx5uWVjBY=; b=UAHsguKkHcBYkc tC7L9NNNpFdEW8ngixPFe/6+vxfW2cXqqJIMPzoB7emza1NB0aTSOHqYq6U4N+o6RLnevo3FKjvuG 0vxMDIpSeE1/LrE8R0yeQBzIubNyDlg2pBSo7qrn72SuuZVsRoiLsTwbUNmSsexHmemvhRNpr6UYE n0iMcvnUomSz4EiYVS3+yzk0FTO6NYyYW3QXgHbvO39LlIOkbrvzYUh6KZA4rrMYvaSDnBz6ikcrI cNNKldj1gOFaOfzv3o0WyxQH/KecWuVbLGRFSbQhWqBPYM11aVYGMnCXJFPk/yXmizX4iVJhiJAK3 5nZiW1lio1Sy7yfxx2Hg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jY5za-0005Lk-2z; Mon, 11 May 2020 10:49:02 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jY5zT-0005Km-Vi for linux-arm-kernel@lists.infradead.org; Mon, 11 May 2020 10:49:01 +0000 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=mTITpNPfukEgYQY/aZeV8dmdxeGfrIXiQ1V83L9EXho=; b=e9OxMr3UR5uP2v5h6BEsy7HbZ QjFVipY0199A/KDdzmtFfyUE7VxfZ9biF83dCHJCNDeOTNllJzWZIy9r7kwgj9uzbMvRtkT+jvsfd uR4HTMXLN5O/8HqL8zpd1wKViFRU3YpPC5429IW0W7/df7fiRv6smRT6PkpsIEg+d+Wqq27RP+MlL Fs5oCuTndab1kvfUQQYMhWRb0YBjuT4587zJHlgHed6n9PgppU5IUfBQWeq6Iaz71K/9gMtMosqhv klHnHSmMAGj65JAkAN635Q+nKdiZKoNg8UYhlaDfhYlBLuCOMHDsvqpjnxU1eDcerqYI7YUqj+ulk 4i0eLXI6Q==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:38852) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY5yx-0005tq-2M; Mon, 11 May 2020 11:48:23 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jY5yr-0005Zc-QZ; Mon, 11 May 2020 11:48:17 +0100 Date: Mon, 11 May 2020 11:48:17 +0100 From: Russell King - ARM Linux admin To: Calvin Johnson Subject: Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id() Message-ID: <20200511104817.GP1551@shell.armlinux.org.uk> References: <83ab4ca4-9c34-4cdd-4413-3b4cdf96727d@arm.com> <20200508160755.GB10296@lsv03152.swis.in-blr01.nxp.com> <20200508181301.GF298574@lunn.ch> <1e33605e-42fd-baf8-7584-e8fcd5ca6fd3@arm.com> <20200508202722.GI298574@lunn.ch> <97a9e145-bbaa-efb8-6215-dc3109ee7290@arm.com> <20200508234257.GA338317@lunn.ch> <20200511080040.GC12725@lsv03152.swis.in-blr01.nxp.com> <20200511093849.GO1551@shell.armlinux.org.uk> <20200511102930.GA24687@lsv03152.swis.in-blr01.nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200511102930.GA24687@lsv03152.swis.in-blr01.nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200511_034859_469721_2280E2F8 X-CRM114-Status: GOOD ( 29.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Heikki Krogerus , "Rafael J . Wysocki" , Cristi Sovaiala , Ioana Ciornei , Florian Fainelli , "Rajesh V . Bikkina" , Pankaj Bansal , Diana Madalina Craciun , ACPI Devel Maling List , Andy Shevchenko , Florin Laurentiu Chiculita , Madalin Bucur , Makarand Pawagi , Varun Sethi , Marcin Wojtas , linux-arm Mailing List , Laurentiu Tudor , Greg Kroah-Hartman , Linux Kernel Mailing List , Jeremy Linton , linux.cj@gmail.com, netdev , "David S. Miller" , Heiner Kallweit Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 11, 2020 at 03:59:30PM +0530, Calvin Johnson wrote: > On Mon, May 11, 2020 at 10:38:49AM +0100, Russell King - ARM Linux admin wrote: > > On Mon, May 11, 2020 at 01:30:40PM +0530, Calvin Johnson wrote: > > > On Sat, May 09, 2020 at 01:42:57AM +0200, Andrew Lunn wrote: > > > > On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote: > > > > > Hi, > > > > > > > > > > On 5/8/20 3:27 PM, Andrew Lunn wrote: > > > > > > > > There is a very small number of devices where the vendor messed up, > > > > > > > > and did not put valid contents in the ID registers. In such cases, we > > > > > > > > can read the IDs from device tree. These are then used in exactly the > > > > > > > > same way as if they were read from the device. > > > > > > > > > > > > > > > > > > > > > > Is that the case here? > > > > > > > > > > > > Sorry, I don't understand the question? > > > > > > > > > > I was asking in general, does this machine report the ID's correctly. > > > > > > > > Very likely, it does. > > > > > > > > > The embedded single mac:mdio per nic case seems like the normal case, and > > > > > most of the existing ACPI described devices are setup that way. > > > > > > > > Somebody in this thread pointed to ACPI patches for the > > > > MACCHIATOBin. If i remember the hardware correctly, it has 4 Ethernet > > > > interfaces, and two MDIO bus masters. One of the bus masters can only > > > > do C22 and the other can only do C45. It is expected that the busses > > > > are shared, not a nice one to one mapping. > > > > > > > > > But at the same time, that shifts the c22/45 question to the nic > > > > > driver, where use of a DSD property before instantiating/probing > > > > > MDIO isn't really a problem if needed. > > > > > > > > This in fact does not help you. The MAC driver has no idea what PHY is > > > > connected to it. The MAC does not know if it is C22 or C45. It uses > > > > the phylib abstraction which hides all this. Even if you assume 1:1, > > > > use phy_find_first(), it will not find a C45 PHY because without > > > > knowing there is a C45 PHY, we don't scan for it. And we should expect > > > > C45 PHYs to become more popular in the next few years. > > > > > > Agree. > > > > > > NXP's LX2160ARDB platform currently has the following MDIO-PHY connection. > > > > > > MDIO-1 ==> one 40G PHY, two 1G PHYs(C45), two 10G PHYs(C22) > > > > I'm not entirely sure you have that correct. The Clause 45 register set > > as defined by IEEE 802.3 does not define registers for 1G negotiation, > > unless the PHY either supports Clause 22 accesses, or implements some > > kind of vendor extension. For a 1G PHY, this would be wasteful, and > > likely incompatible with a lot of hardware/software. > > > > Conversely, Clause 22 does not define registers for 10G speeds, except > > accessing Clause 45 registers indirectly through clause 22 registers, > > which would also be wasteful. > > > Got your point. > Let me try to clarify. > > MDIO-1 ==> one 40G PHY, two 1G PHYs(C45), two 10G PHYs(C22) > MDIO-2 ==> one 25G PHY > This is the physical connection of MDIO & PHYs on the platform. > > For the c45 PHYs(two 10G), we use compatible "ethernet-phy-ieee802.3-c45"(not > yet upstreamed). > For c22 PHYs(two 1G), we don't mention the c45 compatible string and hence the > access also will be using c22, if I'm not wrong. You seem to have just repeated the same mistake (it seems to be a direct copy-n-paste of what you sent in the email I replied to) - and then gone on to say something different. Either you're confused or you're not writing in your email what you intend to. You first say "MDIO-1 ==> two 1G PHYs(C45)". You then say lower down "For C22 PHYs (two 1G)". Both these statements can't be true. Similarly, you first say "MDIO-1 ==> two 10G PHYs(C22)". You then say lower down "For the c45 PHYs(two 10G)". Again, both these statements can't be true. Given that this discussion in this thread has been about C22 vs C45, I would have thought accuracy in regard to this point would have been of the up-most importance. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel