From patchwork Wed Nov 4 11:52:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 318734 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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,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 0B0B9C2D0A3 for ; Wed, 4 Nov 2020 11:53:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 976AC2236F for ; Wed, 4 Nov 2020 11:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604490796; bh=yAXLc8iBN2mG7YTFZmxcIqBclcOSBja2KYBbIkVlnz8=; h=From:To:Cc:Subject:Date:List-ID:From; b=tdzvvBhizXj2PTvsqU+Fh1Hz18Z6GfAlBjvY8VXoN/5RFuobolytIoiAGnPqq6v1Q I8c4VsCdsMehCPNZCwrlecEdq0lmK6i1K48MfyOX04IDCFINC2k4kjWNFOnoWEzD5M 8YlZVCRn+FtW3p990rpTP+/iDPGIcmgfB8XdBk/k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729263AbgKDLxP (ORCPT ); Wed, 4 Nov 2020 06:53:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:32980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729227AbgKDLwj (ORCPT ); Wed, 4 Nov 2020 06:52:39 -0500 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E06C2072C; Wed, 4 Nov 2020 11:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604490758; bh=yAXLc8iBN2mG7YTFZmxcIqBclcOSBja2KYBbIkVlnz8=; h=From:To:Cc:Subject:Date:From; b=BJ2oJTpO0RhZRDV8RHGhvB8iH+b6cbx5R108fv+iuqWn9TDaTKau1lcKiA8jpx7AQ MiYBp+1pMcpYaTiVU+JbitSt2NZ6R6FquSyGSg9/LkyR5rdrsqzlIWcNFsVBFeiC/+ cotH1AjYZ0x1Z6doMOAMdG0QBu8nYCXMATrwJurs= Received: by pali.im (Postfix) id D863A64E; Wed, 4 Nov 2020 12:52:35 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, a.heider@gmail.com, andrew@lunn.ch, gregory.clement@bootlin.com Subject: [PATCH] arm64: dts: marvell: espressobin: Add ethernet switch aliases Date: Wed, 4 Nov 2020 12:52:09 +0100 Message-Id: <20201104115209.1282-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org commit b64d814257b027e29a474bcd660f6372490138c7 upstream. Espressobin boards have 3 ethernet ports and some of them got assigned more then one MAC address. MAC addresses are stored in U-Boot environment. Since commit a2c7023f7075c ("net: dsa: read mac address from DT for slave device") kernel can use MAC addresses from DT for particular DSA port. Currently Espressobin DTS file contains alias just for ethernet0. This patch defines additional ethernet aliases in Espressobin DTS files, so bootloader can fill correct MAC address for DSA switch ports if more MAC addresses were specified. DT alias ethernet1 is used for wan port, DT aliases ethernet2 and ethernet3 are used for lan ports for both Espressobin revisions (V5 and V7). Fixes: 5253cb8c00a6f ("arm64: dts: marvell: espressobin: add ethernet alias") Cc: # a2c7023f7075c: dsa: read mac address Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Reviewed-by: Andre Heider Signed-off-by: Gregory CLEMENT [pali: Backported Espressobin rev V5 changes to 5.4 and 4.19 versions] --- This patch is backport for 5.4 and 4.19 stable releases. From original patch were removed changes for Espressobin revision V7 as these older kernel versions have DTS files only for Espressobin revision V5. Note that this patch depends on commit a2c7023f7075c ("dsa: read mac address") as stated on Cc: line and for 4.19 release needs to be backported first. --- .../boot/dts/marvell/armada-3720-espressobin.dts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts index 05dc58c13fa4..6226e7e80980 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts @@ -21,6 +21,10 @@ aliases { ethernet0 = ð0; + /* for dsa slave device */ + ethernet1 = &switch0port1; + ethernet2 = &switch0port2; + ethernet3 = &switch0port3; serial0 = &uart0; serial1 = &uart1; }; @@ -147,7 +151,7 @@ #address-cells = <1>; #size-cells = <0>; - port@0 { + switch0port0: port@0 { reg = <0>; label = "cpu"; ethernet = <ð0>; @@ -158,19 +162,19 @@ }; }; - port@1 { + switch0port1: port@1 { reg = <1>; label = "wan"; phy-handle = <&switch0phy0>; }; - port@2 { + switch0port2: port@2 { reg = <2>; label = "lan0"; phy-handle = <&switch0phy1>; }; - port@3 { + switch0port3: port@3 { reg = <3>; label = "lan1"; phy-handle = <&switch0phy2>;