Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1722764ybk; Mon, 11 May 2020 02:41:18 -0700 (PDT) X-Google-Smtp-Source: APiQypIE6GV+wduiSV+M0aa/lUZskuAhkasaaT+MCktf9viwL80OZMx7jHkLWEFQJMtpsHbsHPPs X-Received: by 2002:a05:6402:887:: with SMTP id e7mr13041772edy.178.1589190078527; Mon, 11 May 2020 02:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589190078; cv=none; d=google.com; s=arc-20160816; b=zgUb1EraMucZJL/G/ovO0nJQO8ODtYL+v1E5BGYRgmY7r46dEhYBzdRen2cw59bKDq wlqAIiatR821T+Q1pH7RKT47XaNjfRmLC3OcNgApkRLfYYVDsmkKWSdKdT7Bs7mr+sZv HjmLLxQ2/YLezTkLC+Bm9DwRzRHJRGKOxhQhJon6sA+4pR2cPisJGggrlYLAS6bGOmdN rRGcJha4nuRqZng9tLj/o3i1A2jaVEdb/13yxMADYnppCTKunGZZnjixJPUP3O/N497G jrJDcniuM4DWJpb4Te7X0rEOXyOkG5ozsNCvOIt+tMXH7HtQrref8ET8vr9zD9NLrwE7 ksuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JXYKE2YvBIgyujZ6k0qik2Y4FBN5h7JmUD/1Z324Bzw=; b=b8qrHDKprx3ouJdCYVmxQVBp6MgvUN986NP5plgQXDFTBZ8LinekqxFpi3HWbQJmQV eZ292FDgIcvQTfZQmZmbqR7nzeSwDcp0OsiMULZAc0O/NBPTPWNshVg4NMKRL/htxSOO ONsXxBKEckKF17NaoJJHQ/8419bx8FGN5Z3wJWRdUYbiAvlTSo+dc0DK0zXKCUT4AjTZ bsx6pIFFXxVr5CsB50F/0g2X3PVfsLZ5hmmL9ieMYfP7kemXq47FYhuNyTqUenWucmh4 L2UCx+8V1+2lIU0wwuS6Ncd2XsG9nhgrc+RiYQ0jJ+4Jp/UTTQXl1pujc0RiZDruFe9p cYhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=06Nbqi6U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j27si5708418ejk.201.2020.05.11.02.40.55; Mon, 11 May 2020 02:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=06Nbqi6U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729395AbgEKJjb (ORCPT + 99 others); Mon, 11 May 2020 05:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725790AbgEKJjb (ORCPT ); Mon, 11 May 2020 05:39:31 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6EBC061A0C; Mon, 11 May 2020 02:39:26 -0700 (PDT) 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=JXYKE2YvBIgyujZ6k0qik2Y4FBN5h7JmUD/1Z324Bzw=; b=06Nbqi6ULbmPZiLvQwzGzSEOH 4qSNuekc6jhgvszk86LXQc9whmYGJChSEd1O5sgtpwpWh6Xd080AZOG3ozpuwYWBGVmlb9AOjUKoa mIkk+CKcCB1Vily19TBX7nK8YXr3WIx1JKuZ6N6+GHchRRZGbMIMqFuvZVCBqQ9P3URDA6Zs3xIdL X0RnlxZEKBlbldWHHrcFUh2KYtSKkjAT7ieXMqodj/oxQ8qC2qDO312vIhA9LUz9xfvAIiKt2RATW kZNtT8TBHl9vl4aZld0Cteo2T/nk3oDPcRS2cUYo9ESDve7UO2wVrNBKJ+/WGyRQ/6DyOpKt1fS2x QB+Rdnt7A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:59006) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY4tm-0005bR-H9; Mon, 11 May 2020 10:38:58 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jY4td-0005WV-Ml; Mon, 11 May 2020 10:38:49 +0100 Date: Mon, 11 May 2020 10:38:49 +0100 From: Russell King - ARM Linux admin To: Calvin Johnson Cc: Andrew Lunn , Jeremy Linton , Andy Shevchenko , "Rafael J . Wysocki" , linux.cj@gmail.com, Florian Fainelli , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Greg Kroah-Hartman , Heikki Krogerus , Varun Sethi , "Rajesh V . Bikkina" , ACPI Devel Maling List , Linux Kernel Mailing List , Diana Madalina Craciun , netdev , Marcin Wojtas , Laurentiu Tudor , Makarand Pawagi , linux-arm Mailing List , Pankaj Bansal , "David S. Miller" , Heiner Kallweit Subject: Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id() Message-ID: <20200511093849.GO1551@shell.armlinux.org.uk> References: <67e263cf-5cd7-98d1-56ff-ebd9ac2265b6@arm.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200511080040.GC12725@lsv03152.swis.in-blr01.nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- 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