Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3650903iog; Tue, 21 Jun 2022 03:10:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sMF6l/35gObX/qbIhzhMxd+wJx9lpqzfCOW+Vtf5I3G8xwoJlAdJCQr+NmzWhGn/g7blXp X-Received: by 2002:aa7:cf91:0:b0:435:6e07:2825 with SMTP id z17-20020aa7cf91000000b004356e072825mr19718429edx.381.1655806235280; Tue, 21 Jun 2022 03:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806235; cv=none; d=google.com; s=arc-20160816; b=HM6YPf9fVfYRseC1WWyzQdXVIC7PxDB4IB0dRIejehJBEcDYYTKMtqGmtZYypj6c2y X4uGP+/b8bRR+bim+HIt3YbSTMqlh3UzTI8TvkGhz6e8Cx5HNJBT0rmFyJEaFw+K7D6I MUY3Tbwokix3Py9ctROveuPSGpVqKmJYdgxkNU68miIsF4/RnRkdjFAyrhMqe9VbyluI g90dzY2JLSFIlT7eXlFJqbML+9N3+108O+Ry8/0VBnGRbrmymJ6YoysrcBy5wjhbR2lk RuNqUrQhl1Xp/p4Dq/wjcAk6cmFQeO4baJDkbZJ7X0ndUpiUYjf7JFNji/l98MMwPPqL mqNA== 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=WgpvJ+ZYQ9wNJ1RH7x/Iyee2F28bg23N2XRimN8MYRQ=; b=cRIVjkJ7eQRm7rz9iAlLaz/Zf4rCRbtkeTEcXr43ITsa+Mw+WnK/L2DwpLqyA4ELcx TIkevVF76uYDpAeMa3wSn9r9aIvuHkxJbgLqDWLFgHpm7e+f32x7zxPCQont2xhR/rPN qU5kVnQkR/l7DGFR/ZpzFN7/a1J/8lHEtPh6iIJcsOODhFozC5FHxYa9xwXp28ucqj1P 1Wjrvwucblce0GGK907u/bAewHObsR47o8li6qqqrsFikJOgUjZZUKHImZaRvBMttoIk sArfgkw0HxR7pujLoHS/bAeLYK4Ry8kYaW6UF7xqgL0hYBeJiTPkJKREnWCj3ZhAfPUd zl3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=ktPF7cOn; 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 d41-20020a056402402900b004355db1bceesi12910317eda.51.2022.06.21.03.10.09; Tue, 21 Jun 2022 03:10:35 -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=ktPF7cOn; 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 S1347709AbiFUKDB (ORCPT + 99 others); Tue, 21 Jun 2022 06:03:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245415AbiFUKC7 (ORCPT ); Tue, 21 Jun 2022 06:02:59 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEC94BD0 for ; Tue, 21 Jun 2022 03:02:57 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id g4so9109929lfv.9 for ; Tue, 21 Jun 2022 03:02:57 -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=WgpvJ+ZYQ9wNJ1RH7x/Iyee2F28bg23N2XRimN8MYRQ=; b=ktPF7cOnTQ+f5ss8vA4ne+IqJ1N2aK8YJDV120+3TE5Y/PumvHgTI9YFgKCc/emtfo Rpk77hxnFVp2OoD6JZTZahD5WNhRB58jXTzOyhiGI26jAuV0LO2rsYzX++z/fM1OTXPe RvxfAcSAdUUJr28uLmAby0mBoPAvpNkCR/jGF056uSrC9GxTDf84J4UvIMjPZ/z/OVKr YDXRK3FKeW9eCGLazvBoG9I5pbF0iliNKlnaV6bPxaVInkUTftHN9losZCQKB5WVxwz0 CEByZvkr8RrFrC80CCL3NKulB9MQXNa9Lh31KJaecljsfW2TK0XIlIiHubuZfpeb4y2v U5ng== 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=WgpvJ+ZYQ9wNJ1RH7x/Iyee2F28bg23N2XRimN8MYRQ=; b=3CM0VhcitrKf0VfqYBniKkrL7O0NkUZKfRpcsIrR3LGtTugVuJu7u5s3wBHVbTwG+D QrQPa1zyTdlJoh1pPZ/m6pwXjsd4lRy+DGjaJZQGBzt2G5v6nZ/y7rsmAIBvInYfVTw3 WzQ3SeGozeRwWprMOMqkedUh7acj7fnGhtEh/zqhEv5lK911/A46yV3+AOFDlCMYn5rd 063wxn5/n04YhxnZFzeWyFazK2YWk1C9PgMCq5aq3u3Fjg3fzGclDffWNypPgJlpKkiU bSCOmP+Xxv2LUIfmCnyWHF+ULTh5pJdTxWP8iPNDpQOEov/Oj6LzCKQFrb2IK1clYq6L 9usA== X-Gm-Message-State: AJIora9/abuwIrXyeZUB39S/aI00lbv6yUp8ojCROW6NmR4xzMKU+HaW 9Cq9x+sRkII3pe0gShqcJkUdMNvcuUZN0vR5QvVtvA== X-Received: by 2002:a05:6512:118f:b0:47f:6a1a:20d4 with SMTP id g15-20020a056512118f00b0047f6a1a20d4mr7197196lfr.428.1655805776035; Tue, 21 Jun 2022 03:02:56 -0700 (PDT) MIME-Version: 1.0 References: <20220620150225.1307946-1-mw@semihalf.com> In-Reply-To: From: Marcin Wojtas Date: Tue, 21 Jun 2022 12:02:46 +0200 Message-ID: Subject: Re: [net-next: PATCH 00/12] ACPI support for DSA To: Andy Shevchenko Cc: Linux Kernel Mailing List , ACPI Devel Maling List , netdev , "Rafael J. Wysocki" , Len Brown , Andrew Lunn , 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_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 pon., 20 cze 2022 o 19:21 Andy Shevchenko napisa=C5=82(a): > > On Mon, Jun 20, 2022 at 05:02:13PM +0200, Marcin Wojtas wrote: > > Hi! > > > > This patchset introduces the support for DSA in ACPI world. A couple of > > words about the background and motivation behind those changes: > > > > The DSA code is strictly dependent on the Device Tree and Open Firmware > > (of_*) interface, both in the drivers and the common high-level net/dsa= API. > > The only alternative is to pass the information about the topology via > > platform data - a legacy approach used by older systems that compiled t= he > > board description into the kernel. > > > > The above constraint is problematic for the embedded devices based e.g.= on > > x86_64 SoCs, which are described by ACPI tables - to use DSA, some tric= ks > > and workarounds have to be applied. Addition of switch description to > > DSDT/SSDT tables would help to solve many similar cases and use unmodif= ied > > kernel modules. It also enables this feature for ARM64 ACPI users. > > > > The key enablements allowing for adding ACPI support for DSA in Linux w= ere > > NIC drivers, MDIO, PHY, and phylink modifications =E2=80=93 the latter = three merged > > in 2021. I thought it would be worth to experiment with DSA, which seem= ed > > to be a natural follow-up challenge. > > > > It turned out that without much hassle it is possible to describe > > DSA-compliant switches as child devices of the MDIO busses, which are > > responsible for their enumeration based on the standard _ADR fields and > > description in _DSD objects under 'device properties' UUID [1]. > > The vast majority of required changes were simple of_* to fwnode_* > > transition, as the DT and ACPI topolgies are analogous, except for > > 'ports' and 'mdio' subnodes naming, as they don't conform ACPI > > namespace constraints [2]. > > ... > > > Note that for now cascade topology remains unsupported in ACPI world > > (based on "dsa" label and "link" property values). It seems to be feasi= ble, > > but would extend this patchset due to necessity of of_phandle_iterator > > migration to fwnode_. Leave it as a possible future step. > > Wondering if this can be done using fwnode graph. > Probably yes. It's a general question whether to follow iterating over phandles pointed by properties, like DT with a minimal code change or do something completely different. Best regards, Marcin