Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp974035pxb; Thu, 28 Jan 2021 05:16:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM8M83qG+8csLTGL1//RlfmI5TrAQWr2vrRI8CnHcwXdDO8fINs9tQzqirTD6n/G5SirNs X-Received: by 2002:adf:e3c2:: with SMTP id k2mr16155276wrm.337.1611839779772; Thu, 28 Jan 2021 05:16:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611839779; cv=pass; d=google.com; s=arc-20160816; b=Bg73eSGbHzZi9wHrTimikS2ePz9wzLPAI8bTeVJAEWIVhswNf8EIPQefvFCw9AIyHB Cml8uCuuv2RM6Xf56PFrIF1dEuBQvyX6V8K16rtTWeabMe0cQi/8KT+RBvN7DKYsW/LX bb/vSPihDcZxxWK7kzA3PayV/TSXYWUV6wb/81r4qHYppVI8yinwEBlHREWCd0Uo81hJ hZ8sLrY5uS6t6FTWVU6mtFN4mXt4LTedgBS3WJfgULHKN8we8TxrMFgzvbiCHWBBejjx mr1oR83BarQzt140N480CXD3lJPFQ4j63Fsir+/DkTGAU9H10KTDuPnOR3ODFNX185zU WV0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=FFL9xMbTnUYlgO3InFoT8PXuCaRRCzZp56bA96+//hM=; b=caHZH9X11I69bVnPWd23inbsQ/A2+7t3PUyOAWpKY8lKefepmazZ43+Jo0Hn3yLuV/ WtKY9Q+N0ZnmZnsvDm5Iu3iDQCN9FwRRslnj5DTa4tFW6CWU8WFpAlXhhJ8N1bqzvDRe YAHPELRvtpiVN0POxuyItChlpsQemYL3zH4rHf76xXfQRo6jd0mzRjvw8RZ4Qs2M+TNV w4ogqUOKftpYfVVyVZZq+yW6QMDuSKerHwbljKStNC5tVRfMi1BGvLe0tX4caF+FYVGF tWbYmK92uqgnd/+JMLE4LUQrmNyPjVML9UBboIZkyrGJP7QUeKODda7I0I9dkS8LBapu RdMw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=OkjMWGa9; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zo20si2463092ejb.302.2021.01.28.05.15.53; Thu, 28 Jan 2021 05:16:19 -0800 (PST) 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=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=OkjMWGa9; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232064AbhA1NNe (ORCPT + 99 others); Thu, 28 Jan 2021 08:13:34 -0500 Received: from mail-eopbgr60089.outbound.protection.outlook.com ([40.107.6.89]:19470 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229684AbhA1NNR (ORCPT ); Thu, 28 Jan 2021 08:13:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fZFk8ghWYyNlrUwABfxH8Tqe8160Nd/5RPE6vHA+WtFsTpU8ZJdmbHXYEwqco1JnYMmra8FdJAtrsFmQRNQMR7e2iSB4DAnw47yauDqIkUw1/9ydJ6NgS+9TF23/QYbif8KrpWcdw+/A/SQDOBq91zx8Gbi4chKtQy1PVx5dDAKWAbWvHih6KSNqrWgHcLtsDZ3ss5M6cQTIlEWr/Y/LSVryEjitEWcfh7c4KHXKP6QOSRYFdKzLCBNNNVNKtCs4s2W2kPoEmuzxdZLgOUH25ViVtqRZf7XH1zgQs0EMWn/U5pz5dMIViH6JkR1z8qwnXZRDOf8R3B1uFkWqneNu7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FFL9xMbTnUYlgO3InFoT8PXuCaRRCzZp56bA96+//hM=; b=nHulS5ic9WK73A6WvoCOhs+2YdzzttCP6eYUKIcafG4tRbE7p+la7Wr2EmZbcCGX+9GrYKRDrJxe2dTnMDyAfQEXCiT6NmyWqfE/bT8LWFmbX6sw6kwy4R6x0/Ki6WNev3C2B6y+UZ/zaUWtEX0UFKoM/RvNV0aEplsLwsJ9GbZrT+yE0J4h+Hm2b6UOEa3U9D2eS1wUxPDO4YTFESO5+gOLwxfdtQ/MahjA7/DzLY6XN93YlK1wf4asewodqVwd3see9Ru3jw72ytuGy08MOT4UGIyo0AqavvNqkd9FolflbtbBOXuEVuJiMQtgSiA3so6kgc2ljBxl1/Aq0sLdHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FFL9xMbTnUYlgO3InFoT8PXuCaRRCzZp56bA96+//hM=; b=OkjMWGa9bWuQiGFsEj3NCyZITbvr2shtjZ/kiypjhRSrkmCMzRhziroW1DMt+/EPTida7nrwaHj4rfDRZUt5lKX5gwd+RuMW753nDCO+v0FTj2P6EMfCc/ZzM5FrRX/XQzUNVRFtHpMoKas9fnY6tLVPiI+V58vvv60gP5QmWhg= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) by AM0PR04MB6436.eurprd04.prod.outlook.com (2603:10a6:208:16b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Thu, 28 Jan 2021 13:12:24 +0000 Received: from AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42]) by AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42%5]) with mapi id 15.20.3784.015; Thu, 28 Jan 2021 13:12:24 +0000 Date: Thu, 28 Jan 2021 18:42:05 +0530 From: Calvin Johnson To: "Rafael J. Wysocki" Cc: Grant Likely , Jeremy Linton , Andrew Lunn , Andy Shevchenko , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap , "linux.cj" , Diana Madalina Craciun , ACPI Devel Maling List , Linux ARM , Linux Kernel Mailing List , netdev , Laurentiu Tudor , Len Brown , "Rafael J. Wysocki" Subject: Re: [net-next PATCH v4 01/15] Documentation: ACPI: DSD: Document MDIO PHY Message-ID: <20210128131205.GA7882@lsv03152.swis.in-blr01.nxp.com> References: <20210122154300.7628-1-calvin.johnson@oss.nxp.com> <20210122154300.7628-2-calvin.johnson@oss.nxp.com> <20210128112729.GA28413@lsv03152.swis.in-blr01.nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR04CA0170.apcprd04.prod.outlook.com (2603:1096:4::32) To AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR04CA0170.apcprd04.prod.outlook.com (2603:1096:4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Thu, 28 Jan 2021 13:12:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2075884f-b82a-4448-e08a-08d8c38e5a45 X-MS-TrafficTypeDiagnostic: AM0PR04MB6436: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eZ+5AhTR8773GS8VY28cgtuJeccbHjuEZEa8qhdBpgeozmUUwAEE90CHnQxr8jCEoSm5viDzdm7EGXiob69f9KTxK30l2IFF6tmK59+Qh2MkB+ePKESjGQlEZ/nmE2Dj6Jym5UVLTesurbclsmcJ+1G1BslvmXdWxO/j3EBL4JI+BYSbNJLlYEvoJjMp8CjIFR4Yv5HR+Fu3x8nNzaurPyLBHDP+WsrKN6slRfiMafmsvIKS525yCBypDqix1ZtzFMsHNoxHyT1O2QVZlLWJ0gplmEAQzDy1J3zpyZXxvJSCbWwU7ov5zdU5J0sWk9vCMxuQO/tj9kajMuizB0TWVgRRl19ZA9A/5lzKvRhxcxswPX6mSG3ldfnpTPjh8oXorY3/1LDoFn0tEMiUAvKL9wUHk8DaiMMdv2OIhmlaAwx/RVU4+jVAq7OgMdJQxmYYopFF0ApzZZ3JsZVDp2mUS+Mn7oLzhUeDUxYQsU8uUkufdE/7yfoexj9weVd/rQ0ia6IoD50V90M+U5pxLNSvfP7WqRtGpHh7xxeihg3nc8ItBFzKJMhGgBDgiS57gIHrfptb+g9pjo8/q/vR3ZODQtGJ8gHBgrKxzL/D8/av86Ye72UT/KL6teHb/u8QdPWfE2IgRVW0YW5FtpUP/7M4AA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB5636.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(346002)(366004)(39860400002)(396003)(376002)(55016002)(966005)(478600001)(6916009)(2906002)(9686003)(6666004)(8936002)(4326008)(8676002)(86362001)(1006002)(33656002)(55236004)(66946007)(1076003)(66556008)(956004)(66476007)(26005)(16526019)(186003)(83380400001)(6506007)(7696005)(5660300002)(7416002)(54906003)(52116002)(44832011)(316002)(53546011)(110426009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?4M3zupXTS8FHhGiRNVOp/ygcjr8n0ipH/sCa2cWKRDec7y1018d0uKHFtFL2?= =?us-ascii?Q?2NOxoyHMnHP+BycF7Dwx98Z3nViYdP5RFB+xO2b5X7kR8l+kXYp26i8wxmxr?= =?us-ascii?Q?WaztXJBVL4EljS+CNYKF+AuShoIrbfDFwQtBCD9ijmuj5mgwZse9QJ6iVJvv?= =?us-ascii?Q?W9PuzpSeiufiTbxtbWYubEEKOW5ZBjbHTVThGEtnf4vkcmu0MMZv/g5p/uIm?= =?us-ascii?Q?ddlaPu+xXNkkV/tGv8of9p8+NeZ5twKw45cr74Lo2yikPjQKL4MLPZawYAU1?= =?us-ascii?Q?N3npNnUcFX6hXiQD3KbsB03trIlg482yWUQbMUPgVwi2/J93rUQv9v4ECazT?= =?us-ascii?Q?MrxdGKPRB5We9rJPg3QeABXO+sHQEygAZYvEEIFavsSzq8vNe0OGM1Zz7zQQ?= =?us-ascii?Q?TDAVSz+gFgRtCYqMh/gF5+3gzPgVSN7nywnFUsOe13FOeznLY6WsuTB5qejV?= =?us-ascii?Q?94UN5qvd56rwqkHGaG4teLEqsRxDgnQALKD+QzvsG8PEBry3v535PajQ58Vg?= =?us-ascii?Q?oQXhm/MgD1O4u7yYTjF9WiRP2OJMYVDOgf29e+dZmoQNE8wMbsGTuApBtpB4?= =?us-ascii?Q?uVJyn6J2vnlSkDNYOHz/sEXlPeBm1sVpVE4RHJ0nu+AsmK3zRqtiVxv3a2Nj?= =?us-ascii?Q?AJgCeA3y/GntPGWLnqDu482TV3VVvAqX5GbkMCDWvZVO7h7tMoQwch9EcS73?= =?us-ascii?Q?6B+8REUdZlMra4K9aMOVD7ww2FjbE/m86AfScx4tMvlyr0bU/jRinwvFQXGi?= =?us-ascii?Q?fLsuaW5Tj7o9FIAMhaq7Bxsc0rF0MOax6ZdGCKfkIYT8CxuBa1zBy7NxGl5j?= =?us-ascii?Q?cUkX5jSoqhHt9Czjyx61eWI87j41d+AxC1ZeS4auzSovMcyG7RmueROazKDd?= =?us-ascii?Q?uHzykMhDBBBwsEWANFUivYHInLuVQbjZ6t2RC+R0FP4CSgqm9BG1FfuzOixO?= =?us-ascii?Q?1rts6Y72rS+HhmHCDgNTSQe3vUR4h1cVf7XkMi0K04HFUPwPjqIuIMawyf00?= =?us-ascii?Q?J4R7mKrw+Aue2QofJGn8RiXwfBfeLjUaZ0yKo0S7qDhKdrteaFml5U7ZfvDw?= =?us-ascii?Q?Pe0h9ibx?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2075884f-b82a-4448-e08a-08d8c38e5a45 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5636.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2021 13:12:24.5853 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: I+3WG14I+5FX3oNkOIOMTjliwISLP9ohEZdVYTG9H2cR2mJpHYAU/KaxcDSVZ74YmOr0nupnnlOGcjm2RMQ1zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6436 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 01:00:40PM +0100, Rafael J. Wysocki wrote: > On Thu, Jan 28, 2021 at 12:27 PM Calvin Johnson > wrote: > > > > Hi Rafael, > > > > Thanks for the review. I'll work on all the comments. > > > > On Fri, Jan 22, 2021 at 08:22:21PM +0100, Rafael J. Wysocki wrote: > > > On Fri, Jan 22, 2021 at 4:43 PM Calvin Johnson > > > wrote: > > > > > > > > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > > > > provide them to be connected to MAC. > > > > > > > > Describe properties "phy-handle" and "phy-mode". > > > > > > > > Signed-off-by: Calvin Johnson > > > > --- > > > > > > > > Changes in v4: > > > > - More cleanup > > > > > > This looks much better that the previous versions IMV, some nits below. > > > > > > > Changes in v3: None > > > > Changes in v2: > > > > - Updated with more description in document > > > > > > > > Documentation/firmware-guide/acpi/dsd/phy.rst | 129 ++++++++++++++++++ > > > > 1 file changed, 129 insertions(+) > > > > create mode 100644 Documentation/firmware-guide/acpi/dsd/phy.rst > > > > > > > > diff --git a/Documentation/firmware-guide/acpi/dsd/phy.rst b/Documentation/firmware-guide/acpi/dsd/phy.rst > > > > new file mode 100644 > > > > index 000000000000..76fca994bc99 > > > > --- /dev/null > > > > +++ b/Documentation/firmware-guide/acpi/dsd/phy.rst > > > > @@ -0,0 +1,129 @@ > > > > +.. SPDX-License-Identifier: GPL-2.0 > > > > + > > > > +========================= > > > > +MDIO bus and PHYs in ACPI > > > > +========================= > > > > + > > > > +The PHYs on an MDIO bus [1] are probed and registered using > > > > +fwnode_mdiobus_register_phy(). > > > > > > Empty line here, please. > > > > > > > +Later, for connecting these PHYs to MAC, the PHYs registered on the > > > > +MDIO bus have to be referenced. > > > > + > > > > +The UUID given below should be used as mentioned in the "Device Properties > > > > +UUID For _DSD" [2] document. > > > > + - UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 > > > > > > I would drop the above paragraph. > > > > > > > + > > > > +This document introduces two _DSD properties that are to be used > > > > +for PHYs on the MDIO bus.[3] > > > > > > I'd say "for connecting PHYs on the MDIO bus [3] to the MAC layer." > > > above and add the following here: > > > > > > "These properties are defined in accordance with the "Device > > > Properties UUID For _DSD" [2] document and the > > > daffd814-6eba-4d8c-8a91-bc9bbf4aa301 UUID must be used in the Device > > > Data Descriptors containing them." > > > > > > > + > > > > +phy-handle > > > > +---------- > > > > +For each MAC node, a device property "phy-handle" is used to reference > > > > +the PHY that is registered on an MDIO bus. This is mandatory for > > > > +network interfaces that have PHYs connected to MAC via MDIO bus. > > > > + > > > > +During the MDIO bus driver initialization, PHYs on this bus are probed > > > > +using the _ADR object as shown below and are registered on the MDIO bus. > > > > > > Do you want to mention the "reg" property here? I think it would be > > > useful to do that. > > > > No. I think we should adhere to _ADR in MDIO case. The "reg" property for ACPI > > may be useful for other use cases that Andy is aware of. > > The code should reflect this, then. I mean it sounds like you want to > check the "reg" property only if this is a non-ACPI node. Right. For MDIO case, that is what is required. "reg" for DT and "_ADR" for ACPI. However, Andy pointed out [1] that ACPI nodes can also hold reg property and therefore, fwnode_get_id() need to be capable to handling that situation as well. Andy, any suggestion? [1] https://lore.kernel.org/netdev/CAHp75Vef7Ln2hwx8BYao3SFxB8U2QTsfxPpxA_jxmujAMFpboA@mail.gmail.com/ Thanks Calvin