From patchwork Tue Mar 14 10:15:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13174747 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 1AF81C05027 for ; Tue, 14 Mar 2023 16:46:29 +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=U2Zt/wUPGKj60y6TtpSnQ8AfBlrioPjQcAyHlylECFE=; b=FUOMLa/VqaLbm3 NS9ktJ79QuHTGHEvLEmW0f98UYrz9RJRM3KjjfzotNoh+I1zXXMkWndJVQyEYIjZ8+dJXTU98e7Uj IarOhd9BJPoP4+lvU5jNTwDx9bgHFxOWlGEH21ynCI1p/1CmoVhP5J/PWdUmFt2XWnPTYImeg/pSR Rdky59KiXLA2HeXwgl7jLMF+C++8L53bn9ukmwPhNsqVSsU+JeEgAwzp6Qws1L3gGtd7XJF/sRyCY 4LfCSn9VFpqhHYHs6qUytV7VjLpMtMhO0TlSSvuas1bOS6nJTH1uJj/mwW/DVHb1sMOdwac21nOQU jb/iRi7AXzIffpxsgvnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pc7mL-00At8W-0e; Tue, 14 Mar 2023 16:45:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pc7mK-00At8A-1R for linux-arm-kernel@bombadil.infradead.org; Tue, 14 Mar 2023 16:45:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description; bh=1wDcE5BTiRUWu5IpXdTXJGaa7mTD/67d24QZlEDxG4g=; b=fBN40mPrCqX+D1B0ar4W/8v/Kz 7I/nl8YiCbsF+69CdAxjekRxSR9qQnIL3K57nOXbv5xZgGh/BX7i8xz/7eOO4wcrgVINY7GV6vPlb 3LlcHg6J5uitdhnGNI71+ALUOpDyk4B7CnwvCgWkgxjfVhOKFt6Fm/lJ7aYdPMdNUxKTt25kSrRzZ QQAodJhlCL6jGaCxC1SmWmQs1drquY5GMAJ7PPtANq4x78SQVF+qPmGODXbAyIgRT/Q4YMFQBPGqt EzbfjCLhqa7RoJr+HIODhsAO2EfENBKnxYzxY/GfhCW+jATXM9seM9Uh9NKHivtuJqfKtESMMJQM1 3EVuH9Wg==; Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pc7LG-001pa4-0H for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2023 16:17:40 +0000 Received: by mail-wr1-x42e.google.com with SMTP id v16so14932659wrn.0 for ; Tue, 14 Mar 2023 09:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678810655; 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=1wDcE5BTiRUWu5IpXdTXJGaa7mTD/67d24QZlEDxG4g=; b=LXKopah/Gf7/RWEpDVCAEg8KcTcd/6vUHT+j9K7zjvuJS+Y9V0VXs1Yxc9wKcMHXhl BB0LiPIIgVlqUSBjIL8gsZaGh9lm9NORfeuUUB48dyeMkKTa+ifpo4dJ/+9WioT99ggG j8z/UWwqq3qfzU527ACMJc0lnEV86RZ8dFj5OUMlB9dOYbfabxeOEFw+9nRRgD8JcP7p 0ME5PcOjMgas2KKv5AibDhC5iNYdMiTOn21Wjv6/iT+Uq08yJioWr7ZUVET+uCRCAtxE n/ItvWDM09v82MtQGaeTRVXC9PPPMSoJHd/JZEC/5TaMrKVcx4qDrNqagNIeXQqb8ckm amSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678810655; 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=1wDcE5BTiRUWu5IpXdTXJGaa7mTD/67d24QZlEDxG4g=; b=L+xIiSyajBuyy4OBPYiS74+kFP/+XpGamhE91a0pYmUa5XDtE3OqyU8Jnxj/XzdrbT hpuMsWNDs4ofm4vr2AVuvAYEs44DOvF15Qfjn2k2+5oaaxqPIzZVGFY0YcOzWYDbRgQY 0ZUmJWZSH/IO4nBk5A8hkeL3+/PBh/QGbXHlAO/hu2QU3iD7uz4lVrYHg+A44vuG2abk ClxCwNIwldfEjeovz2uOl2FFSTMPZFo3eLm9qnldnQ2LzmYu4AEyblL2DBTTPQJXarkf wmxRox/3q02fwe24G6Vf7fZ5xYCu8L0MUYXxo+JvHg366ruk3/Dzn/wk8SSpPqQubTSW 93NQ== X-Gm-Message-State: AO0yUKXh2bW0UJpP6QQaCaWG+vLnyGe+MXktpmra4G+TRs3DP/n16DtF HHRVKfh9yQ1f/SpZE2GMcuA= X-Google-Smtp-Source: AK7set/Py17xJdAHaKc9J1xLWW5hoZb6Z2NABG0h4vlp94vfirRYvARukA5VFwBRrxWLBwL/DTaieQ== X-Received: by 2002:a5d:530d:0:b0:2c5:510b:8f9c with SMTP id e13-20020a5d530d000000b002c5510b8f9cmr25423697wrv.52.1678810654984; Tue, 14 Mar 2023 09:17:34 -0700 (PDT) Received: from localhost.localdomain (93-34-89-197.ip49.fastwebnet.it. [93.34.89.197]) by smtp.googlemail.com with ESMTPSA id a16-20020a5d4570000000b002c5539171d1sm2426821wrc.41.2023.03.14.09.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 09:17:34 -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 , Gregory Clement , Sebastian Hesselbarth , Andy Gross , Bjorn Andersson , Konrad Dybcio , Christian Marangi , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Lee Jones , linux-leds@vger.kernel.org Subject: [net-next PATCH v3 10/14] dt-bindings: net: dsa: qca8k: add LEDs definition example Date: Tue, 14 Mar 2023 11:15:12 +0100 Message-Id: <20230314101516.20427-11-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230314101516.20427-1-ansuelsmth@gmail.com> References: <20230314101516.20427-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_161738_225002_B53F2A7B X-CRM114-Status: GOOD ( 13.38 ) 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 Add LEDs definition example for qca8k Switch Family to describe how they should be defined for a correct usage. Signed-off-by: Christian Marangi --- .../devicetree/bindings/net/dsa/qca8k.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index 389892592aac..866b3cc73216 100644 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml @@ -18,6 +18,8 @@ description: PHY it is connected to. In this config, an internal mdio-bus is registered and the MDIO master is used for communication. Mixed external and internal mdio-bus configurations are not supported by the hardware. + Each phy have at least 3 LEDs connected and can be declared + using the standard LEDs structure. properties: compatible: @@ -117,6 +119,7 @@ unevaluatedProperties: false examples: - | #include + #include mdio { #address-cells = <1>; @@ -226,6 +229,27 @@ examples: label = "lan1"; phy-mode = "internal"; phy-handle = <&internal_phy_port1>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + default-state = "keep"; + }; + }; }; port@2 {