From patchwork Mon Apr 17 15:17:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13214252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18BA0C77B76 for ; Mon, 17 Apr 2023 15:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BzRtzmTVHNVX68RrsN9zAL9dC/sSSoY8OYuLR4bfeI8=; b=fR/uGSYsucCEuN kqgViFJ26nGhMRgVFP8z1X1Erp87SyLU2KzVuoPiswJXrG9L6PxmL5gA1kM87E2p5wFf9S7uJh/yM z/1EE4V3/Yyt/MbS/PMshi7IA8bezmqQ+B4trIo6Zu9gHB2k6O5mp8RXkh3iV6ysB8UNZ3Pnn0Wfp Wxxpuifaj0jfgVSowxh9FDHgjI88ih1TYEvpHPRNhZqx4OeE9melq9I5smXc5b1VktE1sDhxr8PM7 00Uw3Nvtk+Pz2/KAu/WT7HJep67P0te8OVtGIKVUkeDAiuS03+qkcMRxabo13iZM3fbE83H39MLoI 9cKJ/Pmy1hSSQHmCuBIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poQg6-00GqGH-1K; Mon, 17 Apr 2023 15:22:02 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poQfs-00Gq7a-39 for linux-arm-kernel@lists.infradead.org; Mon, 17 Apr 2023 15:21:50 +0000 Received: by mail-wm1-x332.google.com with SMTP id he11-20020a05600c540b00b003ef6d684102so12057697wmb.3 for ; Mon, 17 Apr 2023 08:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681744907; x=1684336907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OppusVDPTknxRE+RqoeEhB3WmCzyqWgv0cWY8mHzosw=; b=h6hEuTnPiYwjVilzvawD9txg5cYumU2jRZEeA6dcFsFHY12SyfhRYGAN+S1UpJ4lxK qOM0iTNJBCE/w5l7Y6tQWN6RHt4HFS8pOlR/yxpD15rGjrfoUcolPi9O2Xvao1ny/k3+ c9nclFnknn4VwLTZ0601PDW7GqRc+MiTaETjT8HUxpac7OGmcimHdOrN8NraF5V4yXPC sWxPJc2pDTkifSkEmmxApCpPTZsPqDf5fL86EyutpXsdCY6mVE9t35tCKEdCmo7LQ5NH Ixk2yYGdG2UrIBJKX9xOZerSd2ynErllNKO0PYU5Oqcc1dbSU7Q4YLbXRrL142gsPPXZ fEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681744907; x=1684336907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OppusVDPTknxRE+RqoeEhB3WmCzyqWgv0cWY8mHzosw=; b=fz66KcIjYnU5Ikln3MaabPZvCsnbLdv5RCCJ3/gtCY6AhetiuTgRAVeK3EwCyIGNys gcNOKA3Ip6rzf3p1eeC0/9R2LVkh9FKOVIWk7CO4xu+lcn0QzksPumC3R2T7sTdCo2kE vXTPEfU84O5FaZ0FVzEqws8SQMLeWDaOKeYX5ETJ0k1c8aIIO2HenFOCU+Bw0eHgQV8P kQNQIu+5wjAHjDxF/x7qE2phTuJBJ9KE84Up4ZvBxVcC/J14Bew+QQYmZ3SgAnltOqpV cZ7EE4ZXIkszfr4iOGwjf+Yh40zazCU72mc0KzO24cqKrse0ZO6ZoZ4zBlknKQ3CBMlQ 6bgg== X-Gm-Message-State: AAQBX9dyBkQ7J7rVtg6M911OOT1ZXd7WyndVHqp8FeudBrCvj3q2CKxF 4R4YkhQ1F5N+rd8cuR6ADRw= X-Google-Smtp-Source: AKy350Z6k141t5UQYKP+f7l2sYiLN+AXLz6Ow2fM5djSVBa82EIaIGrUwqCYpmHiVYs8u06xUgL9mQ== X-Received: by 2002:a05:600c:204d:b0:3f1:75a9:5c0d with SMTP id p13-20020a05600c204d00b003f175a95c0dmr1645560wmg.26.1681744907449; Mon, 17 Apr 2023 08:21:47 -0700 (PDT) Received: from localhost.localdomain (host-87-7-13-196.retail.telecomitalia.it. [87.7.13.196]) by smtp.googlemail.com with ESMTPSA id j15-20020a05600c1c0f00b003f173be2ccfsm3501354wms.2.2023.04.17.08.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 08:21:45 -0700 (PDT) From: Christian Marangi To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Heiner Kallweit , Russell King , Jonathan Corbet , Gregory Clement , Sebastian Hesselbarth , Andy Gross , Bjorn Andersson , Konrad Dybcio , Pavel Machek , Lee Jones , Christian Marangi , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org Subject: [net-next PATCH v7 16/16] Documentation: LEDs: Describe good names for network LEDs Date: Mon, 17 Apr 2023 17:17:38 +0200 Message-Id: <20230417151738.19426-17-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417151738.19426-1-ansuelsmth@gmail.com> References: <20230417151738.19426-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230417_082149_011197_6603F2F6 X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Andrew Lunn Network LEDs can exist in both the MAC and the PHY. Naming is difficult because the netdev name is neither stable or unique, do to commands like ip link set name eth42 dev eth0, and network namesspaces. Give some example names where the MAC and the PHY have unique names based on device tree nodes, or PCI bus addresses. Since the LED can be used for anything which Linux supports for LEDs, avoid using names like activity or link, rather describe the location on the RJ-45, of what the RJ-45 is expected to be used for, WAN/LAN etc. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi --- Documentation/leds/well-known-leds.txt | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Documentation/leds/well-known-leds.txt b/Documentation/leds/well-known-leds.txt index 2160382c86be..e9c30dc75884 100644 --- a/Documentation/leds/well-known-leds.txt +++ b/Documentation/leds/well-known-leds.txt @@ -70,3 +70,33 @@ Good: "platform:*:charging" (allwinner sun50i) * Screen Good: ":backlight" (Motorola Droid 4) + +* Ethernet LEDs + +Currently two types of Network LEDs are support, those controlled by +the PHY and those by the MAC. In theory both can be present at the +same time for one Linux netdev, hence the names need to differ between +MAC and PHY. + +Do not use the netdev name, such as eth0, enp1s0. These are not stable +and are not unique. They also don't differentiate between MAC and PHY. + +** MAC LEDs + +Good: f1070000.ethernet:white:WAN +Good: mdio_mux-0.1:00:green:left +Good: 0000:02:00.0:yellow:top + +The first part must uniquely name the MAC controller. Then follows the +colour. WAN/LAN should be used for a single LED. If there are +multiple LEDs, use left/right, or top/bottom to indicate their +position on the RJ45 socket. + +** PHY LEDs + +Good: f1072004.mdio-mii:00: white:WAN +Good: !mdio-mux!mdio@2!switch@0!mdio:01:green:right +Good: r8169-0-200:00:yellow:bottom + +The first part must uniquely name the PHY. This often means uniquely +identifying the MDIO bus controller, and the address on the bus.