Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4709388pxk; Wed, 30 Sep 2020 09:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOTyDoSPLGflp5Mrsf5HZLjErMEg8+9ZgMnlw5jAYVLnarAq0zkqy0Moq/2JFjMNHAoBZ0 X-Received: by 2002:aa7:c444:: with SMTP id n4mr3766014edr.200.1601483937826; Wed, 30 Sep 2020 09:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601483937; cv=none; d=google.com; s=arc-20160816; b=g6M9Uhp7M2ELhA+9T+IFGDiTo+ZsyDy0m+13t8g3LQXmnCzNVXxgoNPoidFPC2tOkD Tps2QHpy4SwiDAjwEJGTkvRd0cL4atb19f+k3wW5fByqyPlLaA0WHBMJkpclYB75CWFN Ek/TlKgMz6gwESTfqi0HuHNb7ALgJZYu/Tq7RCtIo0ODhLzyGXZhrqjewYjlUziBIMNA GzH0/uyK5t7HCTwEGpcMttyO9Yh/u+NN1CxC7z02DyRbNqtoJCNf65xBAy1CWTtlo2R5 DTOxbjsrFff1YcP+cOQWUIaRY1EK4MgBG1CckEEUI1VleCuQAJt/czmX1uuI1i/He+s4 yyTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=OUlkoyLtEVGqiuJFMrya04j2YTL8vOQrHdCRqhIRvYM=; b=PenIvsHU5dEzaYS/tC6iZjWy23VracY7rVmjfhAx9AlYrYmIOg2n0yAb02cCgFcmrs +Wpyn/SW/VgIXGbAOn4DpxSeKgU5cUAKjCwywlh3fjJzGU2+GBBvl1G8bmnj/OCBzOgu k8k8re987Og/ioRdS028VkxzwLZ+UUrL0WyzwobWoaOCo2HOx7bNEv181jzqztOY5fX0 OrenMsdf6gpWteJfqjnE1KVD8a5Y6KK4/Zg8JUGt5NrUR1NSjEK5/O5DHJ+cj+MaMGJU Drj0jmjijz7m2vvuyK/sNu6fnKPjK1zum++2Mf8spUwdllpUatf8lrcsBA2lJThgoyBZ 2mDQ== ARC-Authentication-Results: i=1; mx.google.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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x27si1522549ejb.677.2020.09.30.09.38.33; Wed, 30 Sep 2020 09:38:57 -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; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728232AbgI3QhW (ORCPT + 99 others); Wed, 30 Sep 2020 12:37:22 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:44654 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgI3QhW (ORCPT ); Wed, 30 Sep 2020 12:37:22 -0400 Received: by mail-ot1-f68.google.com with SMTP id a2so2418472otr.11; Wed, 30 Sep 2020 09:37:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OUlkoyLtEVGqiuJFMrya04j2YTL8vOQrHdCRqhIRvYM=; b=ESQlnl3z0w2dm5EN5o4ZStT+q1LsTbKh6Nucu9m2v4H/DJTBFvuvPxtp3+qRgtlWA9 Xz+nmWAiqEGmCP48D/dmpIJlmay5wyFIm6VnaP3YJoB3ZzkjEYRKV/FHO1BHDkP/fooe 8UL1laE9YI41L2NKL7Db5bYuxYDy9/Tp24/QGOriy6yxOu0Lhp3lEKsQI+IEhpQille5 kNPWNbFkpn0f0hgH+s6ZP/8Lz/Nbtp7nMvehHBs6hXTwK0Lke4XfckzqfIxJnKnjIIvO YvQNK/nhHLEMdlquIJxjKzD4ZmC5sfSSGso1FWt4K0gmxovkCRIkaIZ+ItcWHNxNxDfo FBKA== X-Gm-Message-State: AOAM533o+Lq0mjU1GzuLZyVGEDALCCrDFqMq8AnYhrn9wElDfbXyJ8ud fyZRue2QnUQWLL6mqN3QTsWEo9vRr9myfUluuL4= X-Received: by 2002:a05:6830:1f16:: with SMTP id u22mr2003370otg.118.1601483841231; Wed, 30 Sep 2020 09:37:21 -0700 (PDT) MIME-Version: 1.0 References: <20200930160430.7908-1-calvin.johnson@oss.nxp.com> <20200930160430.7908-2-calvin.johnson@oss.nxp.com> In-Reply-To: <20200930160430.7908-2-calvin.johnson@oss.nxp.com> From: "Rafael J. Wysocki" Date: Wed, 30 Sep 2020 18:37:09 +0200 Message-ID: Subject: Re: [net-next PATCH v1 1/7] Documentation: ACPI: DSD: Document MDIO PHY To: Calvin Johnson Cc: 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 , Linux Kernel Mailing List , linux.cj@gmail.com, netdev , ACPI Devel Maling List , Linux ARM , Diana Madalina Craciun , Laurentiu Tudor , Len Brown , "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 6:05 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 > --- > > Documentation/firmware-guide/acpi/dsd/phy.rst | 78 +++++++++++++++++++ > 1 file changed, 78 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..f10feb24ec1c > --- /dev/null > +++ b/Documentation/firmware-guide/acpi/dsd/phy.rst > @@ -0,0 +1,78 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +========================= > +MDIO bus and PHYs in ACPI > +========================= > + > +The PHYs on an mdiobus 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. > + > +phy-handle > +----------- > +For each MAC node, a property "phy-handle" is used to reference the > +PHY that is registered on an MDIO bus. It is not clear what "a property" means in this context. This should refer to the documents introducing the _DSD-based generic device properties rules, including the GUID used below. You need to say whether or not the property is mandatory and if it isn't mandatory, you need to say what the lack of it means. > + > +phy-mode > +-------- > +Property "phy-mode" defines the type of PHY interface. This needs to be more detailed too, IMO. At the very least, please list all of the possible values of it and document their meaning. > + > +An example of this is shown below:: > + > +DSDT entry for MACs where PHY nodes are referenced > +-------------------------------------------------- > + Scope(\_SB.MCE0.PR17) // 1G > + { > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package (2) {"phy-mode", "rgmii-id"}, > + Package (2) {"phy-handle", Package (){\_SB.MDI0.PHY1}} What is "phy-handle"? You haven't introduced it above. > + } > + }) > + } > + > + Scope(\_SB.MCE0.PR18) // 1G > + { > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package (2) {"phy-mode", "rgmii-id"}, > + Package (2) {"phy-handle", Package (){\_SB.MDI0.PHY2}} > + } > + }) > + } > + > +DSDT entry for MDIO node > +------------------------ > +a) Silicon Component What is this device, exactly? > +-------------------- > + 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 > +--------------------- > + Scope(\_SB.MDI0) > + { > + Device(PHY1) { > + Name (_ADR, 0x1) > + } // end of PHY1 > + > + Device(PHY2) { > + Name (_ADR, 0x2) > + } // end of PHY2 > + } > -- What is the connection between the last two pieces of ASL and the _DSD definitions above?