From patchwork Tue Jun 22 14:41:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 12337739 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 0682BC48BE5 for ; Tue, 22 Jun 2021 14:41:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD05961374 for ; Tue, 22 Jun 2021 14:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231947AbhFVOnz (ORCPT ); Tue, 22 Jun 2021 10:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231514AbhFVOnw (ORCPT ); Tue, 22 Jun 2021 10:43:52 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93940C061574 for ; Tue, 22 Jun 2021 07:41:36 -0700 (PDT) Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id DBD49829F9; Tue, 22 Jun 2021 16:41:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1624372893; bh=XBmaZ49ciAVJrRh7lkhd3wM4W5Go7mEqDiemcK4VYBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nMv4RCkB8SmpZkseaZ+tuERG0Y1tv8KPm6g5XNGF5pwrp4yai4xONd/eEC61efNym Dka3gfInYEBvrbcTXLTBW2mpCKVYGLgY02H5Z2vwewgOCC9nT10Hms7WplLjp7S1nI FU/KTD/JoIgnCo7JpIiJ6R8hSQ+QKZ9Lig/T22JH03NNlKxACJ4DrA0XMD9GInpZ1c 9IsvXobMG+aECbT5T0jj6gD8EVRghiIDdrBBNXeiMjAt3Zmc/8OjxfefygRTeCOAzT JPhxIuKuuXbTP8n2sAAy6PntXyKBm8ucZOwsrJDtDrWElReHdag4vBBy7uBCRYyw+C NRna4cbwdSYMw== From: Lukasz Majewski To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , Nicolas Ferre , Joakim Zhang , Andrew Lunn , Florian Fainelli , Vladimir Oltean Cc: netdev@vger.kernel.org, Arnd Bergmann , Mark Einon , NXP Linux Team , linux-kernel@lists.infradead.org, Lukasz Majewski Subject: [RFC 1/3] ARM: dts: imx28: Add description for L2 switch on XEA board Date: Tue, 22 Jun 2021 16:41:09 +0200 Message-Id: <20210622144111.19647-2-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210622144111.19647-1-lukma@denx.de> References: <20210622144111.19647-1-lukma@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC The 'eth_switch' node is now extendfed to enable support for L2 switch. Moreover, the mac[01] nodes are defined as well and linked to the former with 'phy-handle' property. Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/imx28-xea.dts | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/imx28-xea.dts b/arch/arm/boot/dts/imx28-xea.dts index d649822febed..94ff801669c4 100644 --- a/arch/arm/boot/dts/imx28-xea.dts +++ b/arch/arm/boot/dts/imx28-xea.dts @@ -23,6 +23,48 @@ status = "okay"; }; +&mac0 { + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + phy-mode = "rmii"; + phy-supply = <®_fec_3v3>; + phy-reset-gpios = <&gpio2 13 0>; + phy-reset-duration = <100>; + local-mac-address = [ 00 11 22 AA BB CC ]; + status = "okay"; +}; + +&mac1 { + pinctrl-names = "default"; + pinctrl-0 = <&mac1_pins_a>; + phy-mode = "rmii"; + phy-supply = <®_fec_3v3>; + local-mac-address = [ 00 11 22 AA BB DD ]; + status = "okay"; +}; + +ð_switch { + compatible = "imx,mtip-l2switch"; + reg = <0x800f8000 0x400>, <0x800fC000 0x4000>, <0x800f8400 0x400>; + + interrupts = <100>; + status = "okay"; + + ports { + port1@1 { + reg = <1>; + label = "eth0"; + phy-handle = <&mac0>; + }; + + port2@2 { + reg = <2>; + label = "eth1"; + phy-handle = <&mac1>; + }; + }; +}; + &pinctrl { pinctrl-names = "default"; pinctrl-0 = <&hog_pins_a &hog_pins_tiva>;