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: 11932357 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 1897EC56201 for ; Wed, 25 Nov 2020 23:27:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A8F820872 for ; Wed, 25 Nov 2020 23:27:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VW95dYqx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A8F820872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ucm3C+4smkmJr9LTD2HKddnOudJUfR9TaJbfhwtncP8=; b=VW95dYqx8eSyVQ6o5RwYtAgNV KErOQbZZw8uQOWY9PtzzglAwsrn+9SwOaR3gyrxZNenyWNpMuwB7x86KX95g8W4LkCw7n4lrJw9ds rHKeCW0mDYSI3vwWlM3g4dmrhsxji4dL9f3gba/pk8BXpsZcGPyXP6y5Aw3Wo+LPCNRBgGftDNBFA 9i0qJo9qSzJ73qPWJsguhWCAYfPrSNuwQZppHWGQ0bVdTqQ7SgJ14CZGUFRgzxkDXu002+OBD0u8m v1K9Izhg4pOdHTG6WaPDzXJ82Cy7PR3AIWGr0MTHE0E1OEEqAQ/PngRUUC44pAOtHZfJKfoIiDrs0 OLXTJAiaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ki4Ak-00012d-Le; Wed, 25 Nov 2020 23:26:02 +0000 Received: from mail-out.m-online.net ([212.18.0.9]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ki4Ad-00011U-6W for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2020 23:25:56 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201125_182555_455836_776E460E X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , Florian Fainelli , stefan.agner@toradex.com, linux-kernel@vger.kernel.org, krzk@kernel.org, Lukasz Majewski , NXP Linux Team , Vladimir Oltean , Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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>;