Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2307219pxb; Mon, 18 Jan 2021 14:16:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsKg1J/UBM5dFsjMwuqU2TDTLEYpSay+MM8V2jsWIAcIup0vYDTovMrWnE1LcET/tyibOd X-Received: by 2002:a17:906:3401:: with SMTP id c1mr1158968ejb.156.1611008169360; Mon, 18 Jan 2021 14:16:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611008169; cv=none; d=google.com; s=arc-20160816; b=cRGLpEe4G6soSOVASi6LbKMFwrk6YsqKAa4G+z6hqEE9x+7SVzyY/ntCllEDAfH/ZT 2Wc6D4lVwlWJ6avtcz8mO6uKB6HTQPvNMw5C/gdzR3H+f5BGJbw0ToFcoLMW6M9/q/3A mGFccDWqgWKEdVIQ8Ej9buxJLj8BdwF+fMtvzNNwICPBUDNrtIUpeLjTm7u77guid6MA tU1qDuHo3v1pzDz8Sm7p3Bn80Uh2f3oUZT+plWp0JPYsXKdMHUDDVg3w9PwItV7pVNLc wwhi+lPUNkTpsYVy8pO61OOPm7FOEG6HJDrw/FfOIxJC1u5AWo3yz2abYCNa8YFGQprt Sc9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=5B9g+MMdkfjDrWyHguWhdW+L/wC5SN7nNmsF2xSXNSM=; b=kylcDK18m46Q3ucQBiOHLHZ363JTw4KtxinCpdthMMHl1LrLTwKCcpM+eh5ta2Kn6M H3nKLmCPh0566FJxZHr1s+uuh4hAOwBgkpKTt18MgrFZ1EUVOMTVivz+LQlto3vWmLl5 oUNLwrRyzsxk3sqlIyz9QD89xXptVNjBwwxLeeqJWasOv+TN+NmFbJHz88zmEHwriN5A BzWQd/ebIRbMOWPMGTh7Exxp6q0NM40qoAk90Rdri179rkezletm+QUN09/1GMGtg1Hw kcCPenitY1RWY5/sUT7TzhWU+kgR6IqxOPw8DRATpq0mMf0LznpYGe5AMNy88xPifxla 3l1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=CnWX9AJY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si7084594ejd.230.2021.01.18.14.15.46; Mon, 18 Jan 2021 14:16:09 -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=@infradead.org header.s=merlin.20170209 header.b=CnWX9AJY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388246AbhARWNt (ORCPT + 99 others); Mon, 18 Jan 2021 17:13:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388051AbhARWNf (ORCPT ); Mon, 18 Jan 2021 17:13:35 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D94FAC061757; Mon, 18 Jan 2021 14:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=5B9g+MMdkfjDrWyHguWhdW+L/wC5SN7nNmsF2xSXNSM=; b=CnWX9AJYZ5WVkbueQhdSbY538L zd6XPx+rOvh0UH4xB/JwYgcpc/fG9we3B9Oos+K7jQkeChYJ32PtVQllfyE5N4500UinIBbAcnQh+ V84mdUhG6IgKhl2V9GB8fRoJgPPgpzYq9aRSt8MZA17iPEh5kRtS/4rTEIlOyhBYnT0+vnz6y57AQ HaExpRbotZ4XugQbQZ6DGqw4/1eJZOWtWAWUo/bwbiyQgmWcCcSEc4V9glTzanggnU/cFGW6XTmhN iBLEzva7KvHwxRspf0u8PDYOqGucRpUHdjXbSNbf57iCkZhJuZi0MyDwkB+WroXPj+otOdzd4674j xOH13W5Q==; Received: from [2601:1c0:6280:3f0::9abc] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1clS-0002tt-Ta; Mon, 18 Jan 2021 22:12:47 +0000 Subject: Re: [net-next PATCH v3 01/15] Documentation: ACPI: DSD: Document MDIO PHY To: Calvin Johnson , Grant Likely , "Rafael J . Wysocki" , 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 Cc: Diana Madalina Craciun , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Laurentiu Tudor , linux-acpi@vger.kernel.org, linux.cj@gmail.com, linux-arm-kernel@lists.infradead.org, Len Brown , "Rafael J. Wysocki" References: <20210112134054.342-1-calvin.johnson@oss.nxp.com> <20210112134054.342-2-calvin.johnson@oss.nxp.com> From: Randy Dunlap Message-ID: <414bb8d0-df20-25f2-07a4-408fe22b0093@infradead.org> Date: Mon, 18 Jan 2021 14:12:36 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210112134054.342-2-calvin.johnson@oss.nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 1/12/21 5:40 AM, 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 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..a2e4fdcdbf53 > --- /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(). > +Later, for connecting these PHYs to MAC, the PHYs registered on the > +mdiobus have to be referenced. > + > +UUID given below should be used as mentioned in the "Device Properties The UUID given below > +UUID For _DSD" [2] document. > + - UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 > + > +This document introduces two _DSD properties that are to be used > +for PHYs on the MDIO bus.[3] > + > +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. s/mdio/MDIO/ (please be consistent, as 3 lines above) > + > +:: > + Scope(\_SB.MDI0) > + { > + Device(PHY1) { > + Name (_ADR, 0x1) > + } // end of PHY1 > + > + Device(PHY2) { > + Name (_ADR, 0x2) > + } // end of PHY2 > + } > + > +Later, during the MAC driver initialization, the registered PHY devices > +have to be retrieved from the mdio bus. For this, MAC driver needs ditto. > +reference to the previously registered PHYs which are provided > +using reference to the device as {\_SB.MDI0.PHY1}. > + > +phy-mode > +-------- > +The "phy-mode" _DSD property is used to describe the connection to > +the PHY. The valid values for "phy-mode" are defined in [4]. > + > + > +An ASL example of this is shown below. > + > +DSDT entry for MDIO node > +------------------------ > +The MDIO bus has an SoC component(mdio controller) and a platform component (MDIO controller) > +component(PHYs on the mdiobus). component (PHYs > + > +a) Silicon Component > +This node describes the MDIO controller,MDI0 controller, MDI0 > +-------------------------------------------- and then one more '-', please. > +:: > + Scope(_SB) > + { > + Device(MDI0) { > + Name(_HID, "NXP0006") > + Name(_CCA, 1) > + Name(_UID, 0) > + Name(_CRS, ResourceTemplate() { > + Memory32Fixed(ReadWrite, MDI0_BASE, MDI_LEN) > + Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) > + { > + MDI0_IT > + } > + }) // end of _CRS for MDI0 > + } // end of MDI0 > + } > + > +b) Platform Component > +This node defines the PHYs that are connected to the MDIO bus, MDI0 > +------------------------------------------------------------------- [deletia] thanks. -- ~Randy You can't do anything without having to do something else first. -- Belefant's Law