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=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 9CFACC4727C for ; Wed, 30 Sep 2020 16:37:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 466BB2072E for ; Wed, 30 Sep 2020 16:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601483845; bh=lB/2IC01HE5kNfdL21jx3TAgvATZ7cui6IwENyBTerc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=l6q0WP2W8btTQc9isMlYsoBPmyETSPOQiaaho/gbF4MvrAXD7+ypFp7rz5wQmUaCL vSCfOIrscvr4lv5n9RnBnj2G25cFx5PTSrhhe5RjHboeFTeds+5ML1iye4WW+xCP8n Lb2lpr0Qj/bn0mpFX76uSsPTgaOi3zBc40kNy1bY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725799AbgI3QhW (ORCPT ); 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-Google-Smtp-Source: ABdhPJxoSipjS3ozLe1NqMaf+FoZd1hAoezCYXKNO3iSyEN5PLcZjJoJ2ESCIRIztwncvkdadoYCdNLp4xBFyzFs8/U= 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-acpi@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?