Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4676764iog; Wed, 22 Jun 2022 03:47:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vh31DT8g+4z3d8ClYbjFFQ4vox687TZrKumlL1h7te6Xm87Ug3F/kH0jnyTyQ0mOkOECU7 X-Received: by 2002:a17:906:99c5:b0:6df:8215:4ccd with SMTP id s5-20020a17090699c500b006df82154ccdmr2622543ejn.684.1655894848449; Wed, 22 Jun 2022 03:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655894848; cv=none; d=google.com; s=arc-20160816; b=VyWAWwRXwHxIqv41bZcjsVqPneChfdVVuBmBbdmNthukReFJv8EFU8JTAXjSQtT6PJ fKulmkOCqYYtDSY99nHjDlWpF75/FaJrieuhb8A5d3oMsjRrndRrcXDRzRt1Ii0XD2+/ ihgOIz3EyfjuSGgYyZACdKmlLxCLGnt+zmCI21KCErZK/32QMaxMdzjzzByVY6n8jlwk qhtw1e6kLwa/t5qyZ/yA/Ial9kpnlUfVgU5I5mtxaoWqCb0J5ynDGZ6XW1L/KhBT4x+O 9y1FJC8LWAHIgAjgkZW7e8xgOT9z8jw+hUQfOog2AylDH8BtkUgMeYyAnnaoBjHWvyxQ wnBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/3scupapn9W2y2IwLBRCTxOKFHLpEAemTlHO5CeKx/A=; b=BVs8CmLPpoPkWAA95WSEKHDqZTMm/kMpJg4GnVXd9iVDK9KIW0mKuFYxmCCRD/jzB9 weywL+xOpY2R6ew64YbuItSFS0EvLSLuu1JVfu9TYxuKr2/TaD465IIEsga1XhjHB8Ae Ic1CJcqmDkin61BGtg8G9cb7JBm+UsvfYdFlXao4gGxOdKB1n8EukOA+K8xA7N/F324f 66kinxw/5lWBJp8qt6mn28BCLukV8MJpXNJkwgBzeKxbtBRS/vBKeVw7y2NH5qmNddGW WYIz38m9654kKFxoUGB++t47+KmoNLqcz+TUqpYcAstvwomxLtfijI5GYPwdEG/8vGca nMAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=JRkeP6hK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt18-20020a170907729200b0071165584604si22109243ejc.340.2022.06.22.03.47.02; Wed, 22 Jun 2022 03:47:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=JRkeP6hK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245192AbiFVKWq (ORCPT + 99 others); Wed, 22 Jun 2022 06:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345131AbiFVKWi (ORCPT ); Wed, 22 Jun 2022 06:22:38 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64D0E3B3D1 for ; Wed, 22 Jun 2022 03:22:37 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id b23so10192849ljh.7 for ; Wed, 22 Jun 2022 03:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/3scupapn9W2y2IwLBRCTxOKFHLpEAemTlHO5CeKx/A=; b=JRkeP6hK/0SBN+umjfYDlNvt5CfTBBZdNZh9CMRBuXf5udkHnZYDwm9Qugs9BISi7a c1tNL3TYOLT5YejRanE5NvVB8WoJ/bywqf9w01eTlwm88B+z/bFWIxXVbBQK2dx/AkjW DADt2URp3m+poaK/sxloGFC9fCWx3suat4BDkxsm0iHWOy1HH6XnNecf3W5NfVPo+T88 LWhj1Ss4d92YRytTOVjwmH7jgh+qJNIh2W43PHSGO8UZnBNHxEZ4/o6ibaJUTqo8ds6j dFBb1zhzAg8Bshcy1mIgJX2mGUXxyrQ6wv5dI/VvT6VNm2K595qzOhBO1k0cIESp+ZAz Ha+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/3scupapn9W2y2IwLBRCTxOKFHLpEAemTlHO5CeKx/A=; b=FGfX0CTfk+XynuZ9xvO62v/u15S6uRk3S5PMSFj+FGFGHZ0eirFG6Dies8MIfa0eqG BLOrgwdTGgpVXWilNreVISXTZUL3KtYCKSxdHx+RZt3m6rkNUN2Ej0bBH7EkuS4ugbXa iNdN4YxVDNpG/Mn7mB//DLNvO/D0E9ZlwSSlqmF6FgewpK6Q8pynhawHXQAruAkLaUR9 IFzgiUDisnuGI3K8FXgFehC/JNnhnlG81CUzZJBXLSZDsiKcgJQLktmleKYY9V4wQ0x8 SUxn7GFRyeyH3oZ6RsYi+T3Zok8+tYMnRVcFqNB4s7kKyxYn1IdiZ3WAJg09e9JsprET F2sQ== X-Gm-Message-State: AJIora8ApDz/SO2zpkgftAUjplcBLB0OfJt0IzVVKngqgwpZG39dZ/ZX 0XVZsQdQOzRVwhFRVN9k3FFM/M8H7hb4z53IaDirNg== X-Received: by 2002:a2e:860e:0:b0:25a:6dbe:abb5 with SMTP id a14-20020a2e860e000000b0025a6dbeabb5mr1516302lji.474.1655893355719; Wed, 22 Jun 2022 03:22:35 -0700 (PDT) MIME-Version: 1.0 References: <20220620150225.1307946-1-mw@semihalf.com> <20220620150225.1307946-10-mw@semihalf.com> In-Reply-To: From: Marcin Wojtas Date: Wed, 22 Jun 2022 12:22:23 +0200 Message-ID: Subject: Re: [net-next: PATCH 09/12] Documentation: ACPI: DSD: introduce DSA description To: Andrew Lunn Cc: Andy Shevchenko , Linux Kernel Mailing List , ACPI Devel Maling List , netdev , "Rafael J. Wysocki" , Len Brown , vivien.didelot@gmail.com, Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , pabeni@redhat.com, Russell King - ARM Linux , Heiner Kallweit , Grzegorz Bernacki , Grzegorz Jaszczyk , Tomasz Nowicki , Samer El-Haj-Mahmoud , upstream@semihalf.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C5=9Br., 22 cze 2022 o 11:24 Andrew Lunn napisa=C5=82(a): > > On Wed, Jun 22, 2022 at 11:08:13AM +0200, Marcin Wojtas wrote: > > wt., 21 cze 2022 o 13:42 Andy Shevchenko > > napisa=C5=82(a): > > > > > > On Tue, Jun 21, 2022 at 01:18:38PM +0200, Andrew Lunn wrote: > > > > On Tue, Jun 21, 2022 at 02:09:14PM +0300, Andy Shevchenko wrote: > > > > > On Mon, Jun 20, 2022 at 09:47:31PM +0200, Andrew Lunn wrote: > > > > > > ... > > > > > > > > > > + Name (_CRS, ResourceTemplate () > > > > > > > + { > > > > > > > + Memory32Fixed (ReadWrite, > > > > > > > + 0xf212a200, > > > > > > > + 0x00000010, > > > > > > > > > > > > What do these magic numbers mean? > > > > > > > > > > Address + Length, it's all described in the ACPI specification. > > > > > > > > The address+plus length of what? This device is on an MDIO bus. As > > > > such, there is no memory! It probably makes sense to somebody who > > > > knows ACPI, but to me i have no idea what it means. > > > > > > I see what you mean. Honestly I dunno what the device this descriptio= n is for. > > > For the DSA that's behind MDIO bus? Then it's definitely makes no sen= se and > > > MDIOSerialBus() resources type is what would be good to have in ACPI > > > specification. > > > > > > > It's not device on MDIO bus, but the MDIO controller's register itself > > Ah. So this is equivalent to > > CP11X_LABEL(mdio): mdio@12a200 { > #address-cells =3D <1>; > #size-cells =3D <0>; > compatible =3D "marvell,orion-mdio"; > reg =3D <0x12a200 0x10>; > clocks =3D <&CP11X_LABEL(clk) 1 9>, <&CP11X_LABEL= (clk) 1 5>, > <&CP11X_LABEL(clk) 1 6>, <&CP11X_LABEL(c= lk) 1 18>; > status =3D "disabled"; > }; > > DT seems a lot more readable, "marvell,orion-mdio" is a good hint that > device this is. But maybe it is more readable because that is what i'm > used to. No worries, this reaction is not uncommon (including myself), I agree it becomes more readable, the longer you work with it :). IMO the ACPI node of orion-mdio looks very similar. Please take a look: Device (SMI0) { Name (_HID, "MRVL0100") // _HID: Hardware ID Name (_UID, 0x00) // _UID: Unique ID Method (_STA) // _STA: Device s= tatus { Return (0xF) } Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0xf212a200, // Address Base 0x00000010, // Address Length ) }) } You can "map" the objects/methods to what you know from DT farly easily: _HID -> compatible string _STA -> 'status' property _CRS & Memory32Fixed -> 'reg' property (_CRS can also comprise IRQs and other kind of resources, you can check [1] for more details). Clocks are configured by firmware, so they are not referenced in the tables and touched by the orion-mdio driver. > > Please could you add a lot more comments. Given that nobody currently > actually does networking via ACPI, we have to assume everybody trying > to use it is a newbie, and more comments are better than less. I can add more verbose description of the example and probably a reference to https://www.kernel.org/doc/Documentation/firmware-guide/acpi/d= sd/phy.rst ("DSDT entry for MDIO node"). [1] https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configur= ation.html#crs-current-resource-settings Best regards, Marcin > > Thanks > Andrew