From patchwork Sun Jun 13 14:58:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reto Schneider X-Patchwork-Id: 1491449 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4G2yRH3dqRz9sW8 for ; Mon, 14 Jun 2021 00:59:39 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231782AbhFMPBi (ORCPT ); Sun, 13 Jun 2021 11:01:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbhFMPBi (ORCPT ); Sun, 13 Jun 2021 11:01:38 -0400 Received: from mxout014.mail.hostpoint.ch (mxout014.mail.hostpoint.ch [IPv6:2a00:d70:0:e::314]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4852C061574; Sun, 13 Jun 2021 07:59:36 -0700 (PDT) Received: from [10.0.2.46] (helo=asmtp013.mail.hostpoint.ch) by mxout014.mail.hostpoint.ch with esmtp (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1lsRaG-000KbX-II; Sun, 13 Jun 2021 16:59:32 +0200 Received: from [2a02:168:6182:1:d747:8127:5b7a:4266] (helo=eleanor.home.reto-schneider.ch) by asmtp013.mail.hostpoint.ch with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1lsRaG-00020T-Fa; Sun, 13 Jun 2021 16:59:32 +0200 X-Authenticated-Sender-Id: reto-schneider@reto-schneider.ch From: Reto Schneider To: devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org Cc: Stefan Roese , Reto Schneider , "David S. Miller" , Jakub Kicinski , Matthias Brugger , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: net: mediatek: Support custom ifname Date: Sun, 13 Jun 2021 16:58:59 +0200 Message-Id: <20210613145859.1774246-1-code@reto-schneider.ch> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210613115820.1525478-1-code@reto-schneider.ch> References: <20210613115820.1525478-1-code@reto-schneider.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Reto Schneider The (optional) label property allows to specify customized interfaces names. The motivation behind this change is to allow embedded devices to keep their first switch port be named "eth0", even when switching to the DSA architecture. In order to do so, it must be possible to name the MAC interface differently from eth0. Signed-off-by: Reto Schneider --- (no changes since v1) Documentation/devicetree/bindings/net/mediatek-net.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt index 72d03e07cf7c..93e35f239a0a 100644 --- a/Documentation/devicetree/bindings/net/mediatek-net.txt +++ b/Documentation/devicetree/bindings/net/mediatek-net.txt @@ -51,6 +51,9 @@ Required properties: is equal to 0 and the MAC uses fixed-link to connect with internal switch such as MT7530. +Optional properties: +- label: Name of interface, defaults to ethX if missing + Example: eth: ethernet@1b100000 { @@ -76,6 +79,7 @@ eth: ethernet@1b100000 { compatible = "mediatek,eth-mac"; reg = <0>; phy-handle = <&phy0>; + label = "mac1"; }; gmac2: mac@1 {