Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2264103pxj; Sun, 13 Jun 2021 14:28:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2a8kygikSt6IV/aKvXUijDevvSyOWLbZTYTY//yR9XVCvo14XrRvUgH+Jp2GStSCEWtVk X-Received: by 2002:a05:6402:111a:: with SMTP id u26mr13655760edv.260.1623619727303; Sun, 13 Jun 2021 14:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623619727; cv=none; d=google.com; s=arc-20160816; b=v1HZW65+l+rw8d3I3iVUkU4Kw3ZOI0n+iGfAf513Bb4cR1hakPUwbqDa7KR4vCWXN5 ycBEFWa6VunFAEC/aX44dlrEXCuPRP8AdCSB3qlGJkOweExkZ5RvdcO4z7frPHInqPv+ kYZd5qHZlGGQgzNiOGD11F88cpFsY8Ovi/RUS6htxUBIjs3K9feb3vN3sngUVp0b5i11 hYspLfLWKvY8/FE/dUOpiOzR/Lez9VFykxDTmg5sXHL9el1qS3I0qq7UODqIw2guLgtJ YWi897tleBrNTpCrNaGu6XQhUsDlci1IT89X1utBZhrVGwHLSfWdyEt5RUpyvsvBr9cr XZwg== 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=C1mExJCPgpNZd6cbu2tb/gKgZ1aY7W1ClExqPNOLIuM=; b=gVkUQjNHLxWTVFMaFZRYArTgPRPMHvX2xAWJvAEdvX5KCOHbysFLW0+Vj5bOWfLN0G bTq0Y3omvaLFWzWGbCQKj/oBCrR2jP2T5gt+Iy27Cb4cFZJy5cjP6ZAr5n0gyWCV0OE9 b8jHK587oU9+Bwz50hx4t8zIDV6Wwn1OxUggwNAGBG5kZPF0dnyxeIFDU3+lYNHAHTDa up61tczzyLskOnNC+D8EnLiTGlxqbppQa3Mt+d2pyqbchMpF5j0i8C/f3l1Yq6/mQb4c 4aOHSUToe31iFKUKm6+W9Uc2G/cJ9HUxQ1Ulv3CH7EVsvIlGE27awoZppAOaQGgew0EN V1dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=o6BAwb9i; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si9845127edq.83.2021.06.13.14.28.23; Sun, 13 Jun 2021 14:28:47 -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; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=o6BAwb9i; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232087AbhFMVZK (ORCPT + 99 others); Sun, 13 Jun 2021 17:25:10 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:39813 "EHLO mail-qk1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232136AbhFMVZI (ORCPT ); Sun, 13 Jun 2021 17:25:08 -0400 Received: by mail-qk1-f175.google.com with SMTP id j184so36655027qkd.6 for ; Sun, 13 Jun 2021 14:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=C1mExJCPgpNZd6cbu2tb/gKgZ1aY7W1ClExqPNOLIuM=; b=o6BAwb9ioitFPZC+O4R1JfrJ7u/Pry4ztI6ZM3Dp71fihRrQe9mbOsxp5FZk+oO01A U1MjiGhae9OU+m0eNPSaB+ibVPgbB8UnDKFm7xqDLH7wQ/p2t1fA3rcaZseHe4Pgt0Mc aQ8cbvrxihCZo6fmJIxMwIfTkkTMDKOqFWipfSZvQOrGS0YTwZ6F3CJ4ICV/DHN1yjML CzsW07h6O38Q6kRoQ6bq41WauJ9aYiUebkR/LKBxt9PDb4NScclamAxH8DWMv5QESy/5 OiHg57McCFZFu8Lbies3hgXOww6VnzGY2NrW1/i+ukY3jk2mu7D1kNYGAFK+DTmJ2Q0a nWCQ== 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:content-transfer-encoding; bh=C1mExJCPgpNZd6cbu2tb/gKgZ1aY7W1ClExqPNOLIuM=; b=djnTH3dniaF6M/oFEc+Ujn5sN5AyVo9VAxZ7KahXXFoXRidbzGR0KGYmqBwtivTcxr dps8K78osx72f6tb9Ev22Hx4sYzsD6Cq5Nc8MOnO25VLf81WPRWkvROt/V+S+FtqWutA 7UkuU5rZtwld5mGLF7TTmF7BpH9FUswl6lAlzePAaR8pRsMYAGWbmhf+wNoVVH/nOYyz 4U7hyfEqi9DhA7HNzIOH9Ovwj1dqU30K8THwcxIo/Y/CN38y6s8D7rT9VVjoxy4dWm1e lkMm7Kko8KOv2uaC6UTcpSQ3px8CJ6ccpZyHCollZ+Dk7gGCnvwE+KkCC7SycPC+HnTF eNCw== X-Gm-Message-State: AOAM53359R0a+berxoKzV03SuLCZJQNghncHNHQYEtlsXn5zymkHpI7J gQo1F+lOp95d1Zn7JlXieHIAIh9jmzZuw6bh4K3S8tJOGFM5GA== X-Received: by 2002:a37:a041:: with SMTP id j62mr13554877qke.155.1623619317071; Sun, 13 Jun 2021 14:21:57 -0700 (PDT) MIME-Version: 1.0 References: <20210613183520.2247415-1-mw@semihalf.com> <20210613183520.2247415-3-mw@semihalf.com> In-Reply-To: From: Marcin Wojtas Date: Sun, 13 Jun 2021 23:21:44 +0200 Message-ID: Subject: Re: [net-next: PATCH 2/3] net: mvpp2: enable using phylink with ACPI To: Andrew Lunn Cc: Linux Kernel Mailing List , netdev , "David S. Miller" , Jakub Kicinski , Russell King - ARM Linux , Grzegorz Jaszczyk , Grzegorz Bernacki , upstream@semihalf.com, Samer El-Haj-Mahmoud , Jon Nettleton Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, niedz., 13 cze 2021 o 21:47 Andrew Lunn napisa=C5=82(a): > > > +static bool mvpp2_use_acpi_compat_mode(struct fwnode_handle *port_fwno= de) > > +{ > > + if (!is_acpi_node(port_fwnode)) > > + return false; > > + > > + return (!fwnode_property_present(port_fwnode, "phy-handle") && > > + !fwnode_property_present(port_fwnode, "managed") && > > + !fwnode_get_named_child_node(port_fwnode, "fixed-link")); > > fixed-link and managed are not documented in > Documentation/firmware-guide/acpi/dsd/phy.rst. True. I picked the port type properties that are interpreted by phylink. Basically, I think that everything that's described in: devicetree/bindings/net/ethernet-controller.yaml is valid for the ACPI as well - the kernel already is using 'fwnode_' in most (if not all) cases. Would you like me to add "managed" and "fixed-link" description/examples to the mentioned file? > > Also, should you be looking for phy-mode? > In the beginning of the mvpp2_port_probe, there's: phy_mode =3D fwnode_get_phy_mode(port_fwnode); if (phy_mode < 0) { dev_err(&pdev->dev, "incorrect phy mode\n"); err =3D phy_mode; goto err_free_netdev; } So we won't reach further checks in case anything is wrong with it. Best regards, Marcin