From patchwork Wed Jan 4 07:38:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 710840 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ttjNP1WdYz9ryQ for ; Wed, 4 Jan 2017 18:38:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965161AbdADHiZ (ORCPT ); Wed, 4 Jan 2017 02:38:25 -0500 Received: from nbd.name ([46.4.11.11]:60157 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934929AbdADHiS (ORCPT ); Wed, 4 Jan 2017 02:38:18 -0500 From: John Crispin To: Andrew Lunn , "David S. Miller" , Florian Fainelli , Vivien Didelot Cc: netdev@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Subject: [RFC 1/4] Documentation: devicetree: add multiple cpu port DSA binding Date: Wed, 4 Jan 2017 08:38:01 +0100 Message-Id: <1483515484-21793-2-git-send-email-john@phrozen.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1483515484-21793-1-git-send-email-john@phrozen.org> References: <1483515484-21793-1-git-send-email-john@phrozen.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Andrew Lunn Extend the DSA binding documentation, adding the new properties required when there is more than one CPU port attached to the switch. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Andrew Lunn --- Documentation/devicetree/bindings/net/dsa/dsa.txt | 67 ++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt index a4a570f..fc901cf 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.txt +++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt @@ -337,13 +337,25 @@ Optional property: This mii-bus will be used in preference to the global dsa,mii-bus defined above, for this switch. +- ethernet : Optional for "cpu" ports. A phandle to an ethernet + device which will be used by this CPU port for + passing packets to/from the host. If not present, + the port will use the "dsa,ethernet" property + defined above. + +- cpu : Option for non "cpu"/"dsa" ports. A phandle to a + "cpu" port, which will be used for passing packets + from this port to the host. If not present, the first + "cpu" port will be used. + + Optional subnodes: - fixed-link : Fixed-link subnode describing a link to a non-MDIO managed entity. See Documentation/devicetree/bindings/net/fixed-link.txt for details. -Example: +Examples: dsa@0 { compatible = "marvell,dsa"; @@ -416,3 +428,56 @@ Example: }; }; }; + + dsa@1 { + compatible = "marvell,dsa"; + #address-cells = <2>; + #size-cells = <0>; + + dsa,ethernet = <ð0port>; + dsa,mii-bus = <&mdio>; + + switch@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0 0>; /* MDIO address 0, switch 0 in tree */ + + port@0 { + reg = <0>; + label = "lan4"; + }; + + port@1 { + reg = <1>; + label = "lan3"; + cpu = <&cpu1>; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan1"; + cpu = <&cpu1>; + }; + + port@4 { + reg = <4>; + label = "wan"; + }; + + port@5 { + reg = <5>; + label = "cpu"; + }; + + cpu1: port@6 { + reg = <6>; + label = "cpu"; + ethernet = <ð1port>; + }; + }; + };