From patchwork Tue Mar 19 19:54:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1058654 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FrUxadNl"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44P3fV4xT7z9s9N for ; Wed, 20 Mar 2019 06:54:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726627AbfCSTyX (ORCPT ); Tue, 19 Mar 2019 15:54:23 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43841 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727192AbfCSTyX (ORCPT ); Tue, 19 Mar 2019 15:54:23 -0400 Received: by mail-wr1-f66.google.com with SMTP id d17so190135wre.10; Tue, 19 Mar 2019 12:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9V091vQmc1PyT0v9uVA/sPyptxTH5eplCepjaU2kl7c=; b=FrUxadNl/PvThBTktenueW4XkNIFJFE2n5e3zfBxN5RjsK8tBnsP7eO84jMyosjLM/ Mn9GZsLFObVLWmoBf3Yqwz6XGvpkO9kv4rfKL4hdYoCslIfs/74Ze6FiMZjInG/2ld1y tf2qatc82SNKyl3VVPewqSt2dIjKAy7VRfr5lzb4d7RQhA8A21OOschQVkWrjHxeN6ZZ 7WPdVyIQhSAjVCq6BoInqtvM3U2s9j5wFXmycqFBdjvnT/8wn+ROU7pu4O9JFqwvdovp MUCyS1/sD61/Q6QLNrZbADNGCDGVCsk9Cmshe8m9rH2srtq06Z08YCH65vPnDkWM/UW7 UJFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9V091vQmc1PyT0v9uVA/sPyptxTH5eplCepjaU2kl7c=; b=a4+PiGhYKSx2Wvy/loCPmOkZYll4rVgcK65E82tVcrU5QPRR0Zj8GNs1D/F9+uqwRC IXtsiZsb7rJkV7hYiN72abr6h1cRs/Gvsz6MVI9FuNaBf857O8OeXNIDukatbBgPPHiK 9/0hBAkWW8O4es+S9GKY3DOBYqxISy2JyRZpTl20ER8RX+uTlD5dnw9+po249yVOX9Ds 7NPUiGLhLhP62dXXwtSPrjCEWSywzzi44LplWsHE7IXoCcsI1xMy13zQwDBI/doBVqX0 cdEAsZDArbFXEF+c0PQhM8E2i8Vgabs+92i6kIO3C2PkD6G9eyiUCWg4e56cKbiraNSH 2w0A== X-Gm-Message-State: APjAAAW/kj3q145wSCl8PrX4xvdZYBRXAGsCPvpxQQVicZl1xWlIWY5P eHvZX9QGnKWpK/DVfq07k35T3pzf X-Google-Smtp-Source: APXvYqzb4m4ZA8lQzjqRhoUd3t/b5pWgXdFkGWPAPbru0kyjOr7Xvapwp4c69QvqxbpFWyeSBeLycg== X-Received: by 2002:a5d:4750:: with SMTP id o16mr18239218wrs.238.1553025260945; Tue, 19 Mar 2019 12:54:20 -0700 (PDT) Received: from debian64.daheim (p5B0D734D.dip0.t-ipconnect.de. [91.13.115.77]) by smtp.gmail.com with ESMTPSA id y2sm87540wmy.38.2019.03.19.12.54.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 12:54:19 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.92) (envelope-from ) id 1h6KoV-0003KI-5E; Tue, 19 Mar 2019 20:54:19 +0100 From: Christian Lamparter To: netdev@vger.kernel.org, devicetree@vger.kernel.org Cc: Florian Fainelli , Vivien Didelot , Andrew Lunn , Rob Herring , Mark Rutland Subject: [PATCH v3 1/3] dt-bindings: net: dsa: qca8k: fix example Date: Tue, 19 Mar 2019 20:54:17 +0100 Message-Id: <20190319195419.12746-1-chunkeey@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In the example, the phy at phy@0 is clashing with the switch0@0 at the same address. Usually, the switches are accessible through pseudo PHYs which in case of the qca8k are located at 0x10 - 0x18. Signed-off-by: Christian Lamparter Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/dsa/qca8k.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt index bbcb255c3150..5eda99e6c86e 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt @@ -55,12 +55,12 @@ Example: reg = <4>; }; - switch0@0 { + switch@10 { compatible = "qca,qca8337"; #address-cells = <1>; #size-cells = <0>; - reg = <0>; + reg = <0x10>; ports { #address-cells = <1>; From patchwork Tue Mar 19 19:54:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1058657 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NW3yPe7S"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44P3fY6yllz9sBr for ; Wed, 20 Mar 2019 06:54:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbfCSTyX (ORCPT ); Tue, 19 Mar 2019 15:54:23 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33166 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbfCSTyW (ORCPT ); Tue, 19 Mar 2019 15:54:22 -0400 Received: by mail-wm1-f68.google.com with SMTP id z6so5290321wmi.0; Tue, 19 Mar 2019 12:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9qLEKHNpfGhngVt1jz04CC9RECO7mL0Ep3Wu5Grdh1U=; b=NW3yPe7S8EwAJLcfoV5RIw31RnDVQ5Aa19db5dtYRvGfvjo/ezwEOzRVfkk7gRZXwf fMgnis2GjpGyXdOQH+BYEqM2USNJ8HZKEhqPfp9ibAvWcga0BnJa5ma1B0+6IcWWEHvh mAoJXv7qASl5dvYLqE6DUvIkqRzk2HE4jLKXkrwTFU+dmMgLwKHjOg6mTO4oSLPn5q2t PcOJD9I1SRxCBu8N25MH4eQZ2LTQGs7/h/Qt+PGLmG/L6fexj9iY3BjtYYKy0YO51m9O 97YSM+RtgeVOeKBh8PPq/NBSg/tR77jcXTCcq1ymzuWkZyL+T8JEYCe7I0+iHDl90np6 MQXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9qLEKHNpfGhngVt1jz04CC9RECO7mL0Ep3Wu5Grdh1U=; b=DjDNRllK1rdqOmoR5L3bDevnk2KFl9eAp+jbs4hqseO6MqEL+7TJ+dJ5RdJvkA/5Ww nFEMlsHJl3gslbyEf3lS81ua/EVgE0uZ1Ncog3slh3+zxW36EiGy/37JH0vg+x6lQoA/ WpAQ33JL9oqpsVoBBbw6VjFPE9XsNCLM8vZKKS+2hrXwTeTnLroFSFyppHWDrokj2ZCa /h3yXg477RZ81+3D2dnNWVhs0HGYlF7xUIUWho9R41ZDOkVBdUh2O0ViDBrw7x0SzTiN aIfWV1J6aOfUVlJPxOiPV8cxX1g7wPpDNVyLbCn0Dp5u6qGHq2WlCmC596156+nsDoCL 2Qcg== X-Gm-Message-State: APjAAAUkCtWJZ1jdKUqHjRZ9MYZURtPcpaCe1qL2SXA1eaHemue8k4ae GVnaqNsWHUo7KuwCw4UvA34QXm7R X-Google-Smtp-Source: APXvYqwzpJjnjCCtRzMRdiBs1Dr6OBglBuUBFa+pqdOvoeXJeJr4nhFS1fL0T/XKZYlmqqV1HKdAcA== X-Received: by 2002:a1c:658a:: with SMTP id z132mr3342026wmb.92.1553025260505; Tue, 19 Mar 2019 12:54:20 -0700 (PDT) Received: from debian64.daheim (p5B0D734D.dip0.t-ipconnect.de. [91.13.115.77]) by smtp.gmail.com with ESMTPSA id r6sm13254877wrx.48.2019.03.19.12.54.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 12:54:19 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.92) (envelope-from ) id 1h6KoV-0003KL-5v; Tue, 19 Mar 2019 20:54:19 +0100 From: Christian Lamparter To: netdev@vger.kernel.org, devicetree@vger.kernel.org Cc: Florian Fainelli , Vivien Didelot , Andrew Lunn , Rob Herring , Mark Rutland Subject: [PATCH v3 2/3] dt-bindings: net: dsa: qca8k: support internal mdio-bus Date: Tue, 19 Mar 2019 20:54:18 +0100 Message-Id: <20190319195419.12746-2-chunkeey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190319195419.12746-1-chunkeey@gmail.com> References: <20190319195419.12746-1-chunkeey@gmail.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch updates the qca8k's binding to document to the approach for using the internal mdio-bus of the supported qca8k switches. Signed-off-by: Christian Lamparter Reviewed-by: Florian Fainelli --- .../devicetree/bindings/net/dsa/qca8k.txt | 69 +++++++++++++++++-- 1 file changed, 64 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.txt b/Documentation/devicetree/bindings/net/dsa/qca8k.txt index 5eda99e6c86e..93a7469e70d4 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt @@ -12,10 +12,15 @@ Required properties: Subnodes: The integrated switch subnode should be specified according to the binding -described in dsa/dsa.txt. As the QCA8K switches do not have a N:N mapping of -port and PHY id, each subnode describing a port needs to have a valid phandle -referencing the internal PHY connected to it. The CPU port of this switch is -always port 0. +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. + +Don't use mixed external and internal mdio-bus configurations, as this is +not supported by the hardware. + +The CPU port of this switch is always port 0. A CPU port node has the following optional node: @@ -31,8 +36,9 @@ For QCA8K the 'fixed-link' sub-node supports only the following properties: - 'full-duplex' (boolean, optional), to indicate that full duplex is used. When absent, half duplex is assumed. -Example: +Examples: +for the external mdio-bus configuration: &mdio0 { phy_port1: phy@0 { @@ -108,3 +114,56 @@ Example: }; }; }; + +for the internal master mdio-bus configuration: + + &mdio0 { + switch@10 { + compatible = "qca,qca8337"; + #address-cells = <1>; + #size-cells = <0>; + + reg = <0x10>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "cpu"; + ethernet = <&gmac1>; + phy-mode = "rgmii"; + fixed-link { + speed = 1000; + full-duplex; + }; + }; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@5 { + reg = <5>; + label = "wan"; + }; + }; + }; + };