Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4801227pxj; Wed, 12 May 2021 13:38:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2TzfCGKUMMVp5hvPfv1vnxakPiovMv39CPZEzrcnhrZQQti5sG+eQtZY6QzPx8t/rte0d X-Received: by 2002:a17:906:3458:: with SMTP id d24mr40630475ejb.54.1620851895643; Wed, 12 May 2021 13:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620851895; cv=none; d=google.com; s=arc-20160816; b=SERdn+jk/s/VrMVFKqRhwXXDFrHGOnVQHvUH4Uce2PGeaCAUUjs56kEpS2Xs76wW+6 yAPJRB6j+EB+kgYy6xKu+Egza8AVB/rwmNjrPL7Sa9b1DUvHvP4NqaLYCWd9OxQTttsg HbrZHbby33VWeGWHu5A8+zLyS4+FVZx6pY1EqjU0Iuljodsuu6fqWnljNAncJHHU10LU F/CRl7UIJkmhIBseK3IMu/w4TqB9w46rVaALLpEz17Nd9S1DZiAoTClTsqvqIsGs6rXC QGCopxWLR9dHxI4V5905Dp+FIe4a06kuEKZ5HFbqMAgeFe+wsKz6dUA7pH5gydDm/jkI MoUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Yb2F6IpQtcrjLpnZ8OUqSNETCWUG2Y/cxmrONnX/qQ0=; b=Tap/EJj3aqmdMaaBBb7RBhBklISRQSqW6HaHGogQUhXuCg9B/aJNdwTOyKQNQ1Ie3U n0qmNjjVlaxRE9z8ibVkpIYHkBppMGDPiHjE1tJ77ccUqe73JAnxoIt6QsvEKDPcQRKH CXiiQDuw0fCL0ZXmUZlaBnHxrTJCVaIZ0qWEzI5ypiIfeUtiMdiSnPSfA0PmQr7VcqMK hL1tL4FjHkiDlrtvA9IssdlZIwX9XQqiEZERHOVIQEzRgZADKR4s5YkMDgtEVvUY5NnE f+i2/RHQxMWlnCWRg80hw2FAHO/vDcEaIm6qtY+1JfGsgSEnWnRjKdWwytyLYe25avFj vIIg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si484397edd.145.2021.05.12.13.36.40; Wed, 12 May 2021 13:38:15 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386788AbhELUWL (ORCPT + 99 others); Wed, 12 May 2021 16:22:11 -0400 Received: from mail-ot1-f47.google.com ([209.85.210.47]:40525 "EHLO mail-ot1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385225AbhELUHa (ORCPT ); Wed, 12 May 2021 16:07:30 -0400 Received: by mail-ot1-f47.google.com with SMTP id t4-20020a05683014c4b02902ed26dd7a60so11526553otq.7; Wed, 12 May 2021 13:06: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:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Yb2F6IpQtcrjLpnZ8OUqSNETCWUG2Y/cxmrONnX/qQ0=; b=mJwSG8HRzyUm6D0CaR70aVwF0UK/fWVWzawWiuVacm4DQz4xPZoBErRL4snCUcXZW+ U9hAk4sbaOo+c+xMWaZT4CWuYh6ot5E90HUQiY/J6rTqs1RyxRRuDZITA30gAevobNTh bIkq7J7lLqJwYZO7wz9IOdAYZLavsrl7A2Cq7EemUDmH6vJc5n291aw5Ccc1BFfkTbh7 ZTgFcagmE/avgVjfG8THkXFqzpYKSDbW0tIGCczacyIIC4izNl08nKsDkksdp9jPSM15 cQUjSb8RBjLAT4Q9upjCdV/AiEqySWrokklddZQppJXPXPw/k3e3V3yeM8Vu2xL4zu+H 5bDA== X-Gm-Message-State: AOAM532LvOymdZZq8QxpHCPEeFi3xNjo78t+RedaQP1wfE/jQeY8TS+y 8WEUsozcJqOLBSp2IMYtrQ== X-Received: by 2002:a05:6830:1556:: with SMTP id l22mr32038786otp.34.1620849981456; Wed, 12 May 2021 13:06:21 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id q26sm185669otn.0.2021.05.12.13.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 13:06:20 -0700 (PDT) Received: (nullmailer pid 2225064 invoked by uid 1000); Tue, 11 May 2021 16:23:00 -0000 Date: Tue, 11 May 2021 11:23:00 -0500 From: Rob Herring To: Ansuel Smith Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Heiner Kallweit , Russell King , "open list:NETWORKING DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Subject: Re: [RFC PATCH net-next v5 21/25] devicetree: bindings: dsa: qca8k: Document internal mdio definition Message-ID: <20210511162300.GA2221810@robh.at.kernel.org> References: <20210511020500.17269-1-ansuelsmth@gmail.com> <20210511020500.17269-22-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511020500.17269-22-ansuelsmth@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 04:04:56AM +0200, Ansuel Smith wrote: > Document new way of declare mapping of internal PHY to port. > The new implementation directly declare the PHY connected to the port > by adding a node in the switch node. The driver detect this and register > an internal mdiobus using the mapping defined in the mdio node. > > Signed-off-by: Ansuel Smith > --- > .../devicetree/bindings/net/dsa/qca8k.txt | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt > index 1daf68e7ae19..3973a9d3e426 100644 > --- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt > +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt > @@ -21,6 +21,10 @@ described in dsa/dsa.txt. If the QCA8K switch is connect to a SoC's external > mdio-bus each subnode describing a port needs to have a valid phandle > referencing the internal PHY it is connected to. This is because there's no > N:N mapping of port and PHY id. > +To declare the internal mdio-bus configuration, declare a mdio node in the > +switch node and declare the phandle for the port referencing the internal > +PHY is connected to. In this config a internal mdio-bus is registred and registered Otherwise, Reviewed-by: Rob Herring > +the mdio MASTER is used as communication. > > Don't use mixed external and internal mdio-bus configurations, as this is > not supported by the hardware. > @@ -150,26 +154,61 @@ for the internal master mdio-bus configuration: > port@1 { > reg = <1>; > label = "lan1"; > + phy-mode = "internal"; > + phy-handle = <&phy_port1>; > }; > > port@2 { > reg = <2>; > label = "lan2"; > + phy-mode = "internal"; > + phy-handle = <&phy_port2>; > }; > > port@3 { > reg = <3>; > label = "lan3"; > + phy-mode = "internal"; > + phy-handle = <&phy_port3>; > }; > > port@4 { > reg = <4>; > label = "lan4"; > + phy-mode = "internal"; > + phy-handle = <&phy_port4>; > }; > > port@5 { > reg = <5>; > label = "wan"; > + phy-mode = "internal"; > + phy-handle = <&phy_port5>; > + }; > + }; > + > + mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + > + phy_port1: phy@0 { > + reg = <0>; > + }; > + > + phy_port2: phy@1 { > + reg = <1>; > + }; > + > + phy_port3: phy@2 { > + reg = <2>; > + }; > + > + phy_port4: phy@3 { > + reg = <3>; > + }; > + > + phy_port5: phy@4 { > + reg = <4>; > }; > }; > }; > -- > 2.30.2 >