Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5195017ybg; Mon, 21 Oct 2019 22:58:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCi88sAylMDdCQ0ti/7y6YYbgoofUmLGhpt1QHekL5jOrbyQX60X3VbbckfXxeCNxGHmns X-Received: by 2002:aa7:d1d2:: with SMTP id g18mr6332848edp.269.1571723936732; Mon, 21 Oct 2019 22:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571723936; cv=none; d=google.com; s=arc-20160816; b=CN4iGj8PMdcg9MiFnFvnPODAbi8pcrA/HvEDEGZ7KAHp/fhufJkaYletByGFwxcBwk oO7O92VyTRZGMukDZaLSDYTtwQekdFhwgRGSpQU2RubwrXCr+4pXqXfYyIq23OOf1Z57 DIFi06t6vhudE/NfpFiS9g2W+5vkWzi0CAL/gGv7KcuQ0uvGVEj170MWviqYE7E9C823 wFVL7+uISy9b6aL8q0SUhBzQE5xNkxDoEAnkYtNxk36iqx4puKkb/ivhQyzEemMGuEPA qZ7AZM/8s08/ghuyVK3BYZHMyb69VBXjbqp4QG/DExa4J7TYnZZJY5ErpWB6N1Jvto5O BORw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LT2eeDl+w+emLU13VXYXa40ra84rwwK2yMvV28jrhRo=; b=yaqAGtbzmZcMWjlrHjxDAqEH0EwAF3qUfNemAoVQrva/5qaKcpZE6DtUB37RXyJVlB +txkSuUl1waY9da+hCqGrcs2ki4FZA9hVh2BZWwdCo8qLbITXMutq5z8hvpQm47KvW8r aRjAAMU1VNf58h3OadtaQxbVGfjQizaBJs+ddPKv0ep4cQedPuGuSw+zVhOIaI6UzYWY vxxNpEmt+7/9Q0T4gkbSjN2HKw6LX2Xl43j5+tduK8NH6mGlipmptLK93M683fm9b8vn 6SroRygEJQ8MsBfs8xT2oJ20YVuhs33KFbtOCF5Z/jS6z+7R1eTqXSBEpsDX3mo1MgSL 2NUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g19si9657221ejj.120.2019.10.21.22.58.32; Mon, 21 Oct 2019 22:58:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387775AbfJVF6J (ORCPT + 99 others); Tue, 22 Oct 2019 01:58:09 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:59973 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387756AbfJVF6H (ORCPT ); Tue, 22 Oct 2019 01:58:07 -0400 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iMnAx-00015M-2q; Tue, 22 Oct 2019 07:57:47 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iMnAw-0001nf-Md; Tue, 22 Oct 2019 07:57:46 +0200 From: Oleksij Rempel To: Andrew Lunn , Chris Snook , Florian Fainelli , James Hogan , Jay Cliburn , Mark Rutland , Paul Burton , Ralf Baechle , Rob Herring , Vivien Didelot Cc: Oleksij Rempel , Pengutronix Kernel Team , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, Russell King Subject: [PATCH v4 3/5] MIPS: ath79: ar9331: add ar9331-switch node Date: Tue, 22 Oct 2019 07:57:41 +0200 Message-Id: <20191022055743.6832-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191022055743.6832-1-o.rempel@pengutronix.de> References: <20191022055743.6832-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add switch node supported by dsa ar9331 driver. Signed-off-by: Oleksij Rempel --- arch/mips/boot/dts/qca/ar9331.dtsi | 127 ++++++++++++++++++- arch/mips/boot/dts/qca/ar9331_dpt_module.dts | 13 ++ 2 files changed, 139 insertions(+), 1 deletion(-) diff --git a/arch/mips/boot/dts/qca/ar9331.dtsi b/arch/mips/boot/dts/qca/ar9331.dtsi index e0f409dd6acf..84a177c0d053 100644 --- a/arch/mips/boot/dts/qca/ar9331.dtsi +++ b/arch/mips/boot/dts/qca/ar9331.dtsi @@ -158,6 +158,9 @@ clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; clock-names = "eth", "mdio"; + phy-mode = "mii"; + phy-handle = <&phy_port4>; + status = "disabled"; }; @@ -165,13 +168,135 @@ compatible = "qca,ar9330-eth"; reg = <0x1a000000 0x200>; interrupts = <5>; - resets = <&rst 13>, <&rst 23>; reset-names = "mac", "mdio"; clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; clock-names = "eth", "mdio"; + phy-mode = "gmii"; + status = "disabled"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch10: switch@10 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "qca,ar9331-switch"; + reg = <0x10>; + resets = <&rst 8>; + reset-names = "switch"; + + interrupt-parent = <&miscintc>; + interrupts = <12>; + + interrupt-controller; + #interrupt-cells = <1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + switch_port0: port@0 { + reg = <0x0>; + label = "cpu"; + ethernet = <ð1>; + + phy-mode = "gmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + switch_port1: port@1 { + reg = <0x1>; + phy-handle = <&phy_port0>; + phy-mode = "internal"; + + status = "disabled"; + }; + + switch_port2: port@2 { + reg = <0x2>; + phy-handle = <&phy_port1>; + phy-mode = "internal"; + + status = "disabled"; + }; + + switch_port3: port@3 { + reg = <0x3>; + phy-handle = <&phy_port2>; + phy-mode = "internal"; + + status = "disabled"; + }; + + switch_port4: port@4 { + reg = <0x4>; + phy-handle = <&phy_port3>; + phy-mode = "internal"; + + status = "disabled"; + }; + + switch_port5: port@5 { + reg = <0x5>; + phy-handle = <&phy_port4>; + phy-mode = "internal"; + + status = "disabled"; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + interrupt-parent = <&switch10>; + + phy_port0: phy@0 { + reg = <0x0>; + interrupts = <0>; + status = "disabled"; + }; + + phy_port1: phy@1 { + reg = <0x1>; + interrupts = <0>; + status = "disabled"; + }; + + phy_port2: phy@2 { + reg = <0x2>; + interrupts = <0>; + status = "disabled"; + }; + + phy_port3: phy@3 { + reg = <0x3>; + interrupts = <0>; + status = "disabled"; + }; + + phy_port4: phy@4 { + reg = <0x4>; + interrupts = <0>; + status = "disabled"; + }; + }; + }; + }; }; usb: usb@1b000100 { diff --git a/arch/mips/boot/dts/qca/ar9331_dpt_module.dts b/arch/mips/boot/dts/qca/ar9331_dpt_module.dts index 77bab823eb3b..0f2b20044834 100644 --- a/arch/mips/boot/dts/qca/ar9331_dpt_module.dts +++ b/arch/mips/boot/dts/qca/ar9331_dpt_module.dts @@ -84,3 +84,16 @@ ð1 { status = "okay"; }; + +&switch_port1 { + label = "lan0"; + status = "okay"; +}; + +&phy_port0 { + status = "okay"; +}; + +&phy_port4 { + status = "okay"; +}; -- 2.23.0