From patchwork Wed Nov 25 23:24:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 11932353 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED2C7C64E7D for ; Wed, 25 Nov 2020 23:26:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C49E920872 for ; Wed, 25 Nov 2020 23:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733241AbgKYXZ6 (ORCPT ); Wed, 25 Nov 2020 18:25:58 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:37252 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731750AbgKYXZ4 (ORCPT ); Wed, 25 Nov 2020 18:25:56 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4ChH7k2VYrz1qs3D; Thu, 26 Nov 2020 00:25:54 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4ChH7k27VHz1vdfr; Thu, 26 Nov 2020 00:25:54 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id xsV1O1AGOiez; Thu, 26 Nov 2020 00:25:52 +0100 (CET) X-Auth-Info: bSbI5zVU0PcFVOfLl5E/cpCrEQQdaQoXBldrUCwgHoo= Received: from localhost.localdomain (89-64-5-98.dynamic.chello.pl [89.64.5.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 26 Nov 2020 00:25:52 +0100 (CET) From: Lukasz Majewski To: Fugang Duan , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn , Fabio Estevam , Vivien Didelot Cc: NXP Linux Team , Florian Fainelli , Vladimir Oltean , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , stefan.agner@toradex.com, krzk@kernel.org, Shawn Guo , Lukasz Majewski Subject: [RFC 4/4] ARM: dts: imx28: Add description for L2 switch on XEA board Date: Thu, 26 Nov 2020 00:24:59 +0100 Message-Id: <20201125232459.378-5-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201125232459.378-1-lukma@denx.de> References: <20201125232459.378-1-lukma@denx.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC The 'eth_switch' node is now used to enable support for L2 switch. Moreover, a separate 'switch' node was introduced to keep the code more clean. Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/imx28-xea.dts | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm/boot/dts/imx28-xea.dts b/arch/arm/boot/dts/imx28-xea.dts index 672080485b78..b8a896df02c0 100644 --- a/arch/arm/boot/dts/imx28-xea.dts +++ b/arch/arm/boot/dts/imx28-xea.dts @@ -9,6 +9,30 @@ / { model = "XEA"; + + switch { + compatible = "imx,mtip-l2switch"; + reg = <0x800f8000 0x400>, <0x800fC000 0x4000>; + ports { + port0@0 { + reg = <0>; + label = "lan1"; + phy-handle = <ðsw0>; + }; + + port1@1 { + reg = <1>; + label = "lan2"; + phy-handle = <ðsw1>; + }; + + port2@2 { + reg = <2>; + label = "cpu"; + ethernet = <ð_switch>; + }; + }; + }; }; &can0 { @@ -23,6 +47,37 @@ status = "okay"; }; +ð_switch { + compatible = "fsl,imx28-l2switch"; + reg = <0x800f0000 0x8000>, <0x800f8400 0x400>; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>, <&mac1_pins_a>; + phy-mode = "rmii"; + phy-supply = <®_fec_3v3>; + phy-reset-gpios = <&gpio2 13 0>; + phy-reset-duration = <100>; + interrupts = <100>, <101>, <102>; + clocks = <&clks 57>, <&clks 57>, <&clks 64>, <&clks 35>; + clock-names = "ipg", "ahb", "enet_out", "ptp"; + local-mac-address = [ 00 11 22 AA BB CC ]; + status = "okay"; + + fixed-link { + speed = <100>; + full-duplex; + }; + + mdio { + ethsw0: ethernet-phy@0 { + reg = <0>; + }; + + ethsw1: ethernet-phy@1 { + reg = <1>; + }; + }; +}; + &pinctrl { pinctrl-names = "default"; pinctrl-0 = <&hog_pins_a &hog_pins_tiva>;