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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 103F7C433E6 for ; Fri, 22 Jan 2021 19:52:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D391223B16 for ; Fri, 22 Jan 2021 19:52:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728807AbhAVTv7 (ORCPT ); Fri, 22 Jan 2021 14:51:59 -0500 Received: from mail-ot1-f46.google.com ([209.85.210.46]:38508 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729001AbhAVTXO (ORCPT ); Fri, 22 Jan 2021 14:23:14 -0500 Received: by mail-ot1-f46.google.com with SMTP id s2so3975086otp.5; Fri, 22 Jan 2021 11:22:57 -0800 (PST) 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=AcWL/Daw/XNoId/ExdNCO9ieLMb3o6Tm1Cik9cvjN0Y=; b=KUtkAnRLFQpVFxbEEtYDyCj7N56rrgcYPN8N7bqTDkEr8ucG5dTuVE4QGC/QSau+oK geuOFHKplFc265ckq1YTCTLwRBM7KrpaCiyJ8M+tV/YlxibX7yYuPVxZ/B8+e1xaGfe+ y/3TPqJxfQAyxrJnSuy1nOFiTfLamz96lNQnRGd/yXsYuRVuleHFIItEkBYoZdKlXrPM fILgG55w33OLPZCycqRhsU+Tm/bKhCYjUX8Gv7cyqwnHn91TZe9J5HSYpEFepVJ/g77w jRlonfsD4IAsUdxjQ8g01/fKWjldaKOCd3tBoh/MIx6HzCzhaWvdPt5ubDuDAleW8duJ pnPg== X-Gm-Message-State: AOAM530NVKAX7+cHvnm/sdLyogeYVZ5MhOI9VSixDMYWpt+6XVyMva5S DMWAfJv/EUsyrgSieFRZkxWdyR98+0Mw2H+xC73H1XR6JM4sRw== X-Google-Smtp-Source: ABdhPJzweY2mg/zFWP93YsFHVJt5xaD20MtLkVatRFMIokm+C6mB13HNhebPzAWgGsPX6kHU3X2VmvszA6UQsk6dJgw= X-Received: by 2002:a05:6830:2313:: with SMTP id u19mr1341091ote.321.1611343352346; Fri, 22 Jan 2021 11:22:32 -0800 (PST) MIME-Version: 1.0 References: <20210122154300.7628-1-calvin.johnson@oss.nxp.com> <20210122154300.7628-2-calvin.johnson@oss.nxp.com> In-Reply-To: <20210122154300.7628-2-calvin.johnson@oss.nxp.com> From: "Rafael J. Wysocki" Date: Fri, 22 Jan 2021 20:22:21 +0100 Message-ID: Subject: Re: [net-next PATCH v4 01/15] 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 , 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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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. > + > +:: > + 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 "the MAC driver" I suppose? > +reference to the previously registered PHYs which are provided s/reference/references/ (plural) > +using reference to the device as {\_SB.MDI0.PHY1}. "as device object references (e.g. \_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]. > + One empty line should be sufficient. > + > +An ASL example of this is shown below. "The following ASL example illustrates the usage of these properties." > + > +DSDT entry for MDIO node > +------------------------ Empty line here, please. > +The MDIO bus has an SoC component(MDIO controller) and a platform Missing space after "component". > +component (PHYs on the MDIO bus). > + > +a) Silicon Component > +This node describes the MDIO controller, MDI0 > +--------------------------------------------- > +:: > + 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 "The PHY1 and PHY2 nodes represent the PHYs connected to MDIO bus MDI0." > +------------------------------------------------------------------- > +:: > + Scope(\_SB.MDI0) > + { > + Device(PHY1) { > + Name (_ADR, 0x1) > + } // end of PHY1 > + > + Device(PHY2) { > + Name (_ADR, 0x2) > + } // end of PHY2 > + } > + > + "DSDT entries representing MAC nodes -----------------------------------" Plus an empty line. > +Below are the MAC nodes where PHY nodes are referenced. > +phy-mode and phy-handle are used as explained earlier. > +------------------------------------------------------ > +:: > + Scope(\_SB.MCE0.PR17) > + { > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package (2) {"phy-mode", "rgmii-id"}, > + Package (2) {"phy-handle", \_SB.MDI0.PHY1} > + } > + }) > + } > + > + Scope(\_SB.MCE0.PR18) > + { > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package (2) {"phy-mode", "rgmii-id"}, > + Package (2) {"phy-handle", \_SB.MDI0.PHY2}} > + } > + }) > + } > + > +References > +========== > + > +[1] Documentation/networking/phy.rst > + > +[2] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf > + > +[3] Documentation/firmware-guide/acpi/DSD-properties-rules.rst > + > +[4] Documentation/devicetree/bindings/net/ethernet-controller.yaml > -- > 2.17.1 > 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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 A7AD5C433E6 for ; Fri, 22 Jan 2021 19:24:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67C2C23B02 for ; Fri, 22 Jan 2021 19:24:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67C2C23B02 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bN65A9DHIOcBiTe2xji4bwWwiATRwxxAYRmgZvijdPA=; b=zMqYjIy1I21fISLZFNYHlgVqL trZb1fIh/UVSKphAgqsP/efrVipHkB6dz5wRg7vO84QQ35ym0R1CMDJSAI0L7LhEqVOvRx2UuMSnK jSiiHwKgaXcwC6TyuwiRIR3exFOd+X/p+yyo7stBNYGDS5GDfePF7eJn4Nn+lL1j5nc6D2TitPnA0 A9U2rFNIYcCxIY3kP71Q6o1lK3Yo9mggRZRxjm50I1s8yN/VMevJxWuSGv/5Ue1yhEmIVOiegznYS G4C9c3Y1Hfh6GkTDSlX7yzw1ySpX0DnHfae8KBi5N7lkOikFKBUsgjpMdV7UI7+cuiHFnDLYoyHTW tCp81es8Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l320x-0000b4-Kd; Fri, 22 Jan 2021 19:22:35 +0000 Received: from mail-ot1-f51.google.com ([209.85.210.51]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l320v-0000aC-K4 for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 19:22:34 +0000 Received: by mail-ot1-f51.google.com with SMTP id f6so6170261ots.9 for ; Fri, 22 Jan 2021 11:22:33 -0800 (PST) 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=AcWL/Daw/XNoId/ExdNCO9ieLMb3o6Tm1Cik9cvjN0Y=; b=ls8jbMMyW+Ltmm1Po5sH5mEs0QSAEpee8kaPhwN1JR6Zx91sLsHBFsvdEoUYlSgGWC M6YNuM2rML5kVk5yIoDfCNDILbokKr49q1rhZ56sPG1n42hfpEW9Kx1i0jJipTVUs/2O ZHe7csq3AHbqt2e2voKZrAwrUBWZ51L5CGwhyfNOrw4jase0EWPVCgfAXribTXhoFMF/ mNhipb+S6/SKQTIPUl0ebTy9IC9bcsax/PF7ir4wmr/ZYO/Xkrn1IbNjLKyvH3Dx9jpY MRbVzJ3Zn8raJApIFz52ygaVEQ3ca1vh5Vs61EB8qAkF9qSHhJ/dT2hhmIHGjy5W19Cz c2xQ== X-Gm-Message-State: AOAM530IH9A/ZB2RWV4zVxZGt+TbdlwnHd1Tn+OGb5dnSp/zjdDisaY7 b42Kt9kWULcm77phq/DWD4/Q/i7tw2qnftIZBek= X-Google-Smtp-Source: ABdhPJzweY2mg/zFWP93YsFHVJt5xaD20MtLkVatRFMIokm+C6mB13HNhebPzAWgGsPX6kHU3X2VmvszA6UQsk6dJgw= X-Received: by 2002:a05:6830:2313:: with SMTP id u19mr1341091ote.321.1611343352346; Fri, 22 Jan 2021 11:22:32 -0800 (PST) MIME-Version: 1.0 References: <20210122154300.7628-1-calvin.johnson@oss.nxp.com> <20210122154300.7628-2-calvin.johnson@oss.nxp.com> In-Reply-To: <20210122154300.7628-2-calvin.johnson@oss.nxp.com> From: "Rafael J. Wysocki" Date: Fri, 22 Jan 2021 20:22:21 +0100 Message-ID: Subject: Re: [net-next PATCH v4 01/15] Documentation: ACPI: DSD: Document MDIO PHY To: Calvin Johnson X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_142233_690808_F9AE68D6 X-CRM114-Status: GOOD ( 29.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Heikki Krogerus , "Rafael J . Wysocki" , Grant Likely , Ioana Ciornei , Florian Fainelli , Saravana Kannan , Jon , Russell King - ARM Linux admin , Diana Madalina Craciun , ACPI Devel Maling List , Andy Shevchenko , Laurentiu Tudor , Len Brown , Madalin Bucur , Pieter Jansen Van Vuuren , Marcin Wojtas , Linux ARM , Florin Laurentiu Chiculita , netdev , Randy Dunlap , "Rafael J. Wysocki" , Linux Kernel Mailing List , Jeremy Linton , Cristi Sovaiala , "linux.cj" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > + > +:: > + 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 "the MAC driver" I suppose? > +reference to the previously registered PHYs which are provided s/reference/references/ (plural) > +using reference to the device as {\_SB.MDI0.PHY1}. "as device object references (e.g. \_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]. > + One empty line should be sufficient. > + > +An ASL example of this is shown below. "The following ASL example illustrates the usage of these properties." > + > +DSDT entry for MDIO node > +------------------------ Empty line here, please. > +The MDIO bus has an SoC component(MDIO controller) and a platform Missing space after "component". > +component (PHYs on the MDIO bus). > + > +a) Silicon Component > +This node describes the MDIO controller, MDI0 > +--------------------------------------------- > +:: > + 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 "The PHY1 and PHY2 nodes represent the PHYs connected to MDIO bus MDI0." > +------------------------------------------------------------------- > +:: > + Scope(\_SB.MDI0) > + { > + Device(PHY1) { > + Name (_ADR, 0x1) > + } // end of PHY1 > + > + Device(PHY2) { > + Name (_ADR, 0x2) > + } // end of PHY2 > + } > + > + "DSDT entries representing MAC nodes -----------------------------------" Plus an empty line. > +Below are the MAC nodes where PHY nodes are referenced. > +phy-mode and phy-handle are used as explained earlier. > +------------------------------------------------------ > +:: > + Scope(\_SB.MCE0.PR17) > + { > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package (2) {"phy-mode", "rgmii-id"}, > + Package (2) {"phy-handle", \_SB.MDI0.PHY1} > + } > + }) > + } > + > + Scope(\_SB.MCE0.PR18) > + { > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package (2) {"phy-mode", "rgmii-id"}, > + Package (2) {"phy-handle", \_SB.MDI0.PHY2}} > + } > + }) > + } > + > +References > +========== > + > +[1] Documentation/networking/phy.rst > + > +[2] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf > + > +[3] Documentation/firmware-guide/acpi/DSD-properties-rules.rst > + > +[4] Documentation/devicetree/bindings/net/ethernet-controller.yaml > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel