From patchwork Mon Mar 27 14:10:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 668461 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA1ECC6FD1D for ; Mon, 27 Mar 2023 14:12:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232984AbjC0OMn (ORCPT ); Mon, 27 Mar 2023 10:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232856AbjC0OMF (ORCPT ); Mon, 27 Mar 2023 10:12:05 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 943725BB3; Mon, 27 Mar 2023 07:11:19 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id v1so8962018wrv.1; Mon, 27 Mar 2023 07:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679926278; 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=3Z6/vpShlUlg/J0rkwr+qjoQBR81Rffp5jMKcKsFHNI=; b=lp+M6+H7U9MucCz9wGB7fQjadR8acyOZHoS+5jL8JC9QKyYD+rhj5QCH/p65CKgRmO Cs3fdKAcSGfB6GafxQCHo5p0v9xzqOatsWDtbmkCiNxkIZ3SX2hwlUHjyCsS3g80bBsk K2yxce0zqgXoC/8WqGrtsCyokYZIX0lEEKeerB4cLt0tgo7Gvz25e97fT3UDxa++5YVN h9Sm5kJoNTVQ7Y52qSuD0c3OU+gzEmreenWyaOiduiqCDhQe0bDGJMxuLeeGsg2HA2jy sTkPv45klKnzBLaiDfMBvyAZrIfEtam//It/VfMkbNBTP7jMKbgYjYya6vDowbcpGSft jbQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679926278; 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=3Z6/vpShlUlg/J0rkwr+qjoQBR81Rffp5jMKcKsFHNI=; b=jRDooIU3jkfFYNYLOm8o2Vlz+pIkNLP3cMUEU1cpgHbckaRqR5xCxwOpObOW7omBtm tbKCktyEEvvxZopgmB/Kz1B9QKX3D8R8ajlI6J56ve1LC1K5Ug4IAzu0/di4rR3rALZJ mqQlbqlO/oQKMN4vmTGVcyeMcYQO7uw1/ywOvYatJDlaBz7aHrjaXk+mBeyi54McFBbZ 18i/ZK3XjcaODl6JdgTMomSYE3sbeexfwTzeEKp5+fJuvrbR21AbM8bTC2GJyXba3UAP rVo6uXjdziDkiCLN8cQ6VfVnG8oUNnyRmvklGx3qHjPK9PJmhyPQYSqh1wA6FHgRkyCO eN9w== X-Gm-Message-State: AAQBX9cP/CSuXw9sxr3ESM+Bw7UpUhlrzTWkqundYG3Y3wY5MP0iuvKx re/rn7NykYTRfxpOFWd6470= X-Google-Smtp-Source: AKy350ZzxqZMh5iOjbZYPWRnemygLvqUrM+NlUJa3yuZXBpaPSFFJmEwwWpEF6BT0SrmHFY4iftS/g== X-Received: by 2002:adf:f491:0:b0:2ce:da65:12d9 with SMTP id l17-20020adff491000000b002ceda6512d9mr9863140wro.15.1679926277917; Mon, 27 Mar 2023 07:11:17 -0700 (PDT) Received: from localhost.localdomain (93-34-89-197.ip49.fastwebnet.it. [93.34.89.197]) by smtp.googlemail.com with ESMTPSA id p17-20020adfcc91000000b002c71dd1109fsm25307591wrj.47.2023.03.27.07.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 07:11:17 -0700 (PDT) From: Christian Marangi To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King , Gregory Clement , Sebastian Hesselbarth , Andy Gross , Bjorn Andersson , Konrad Dybcio , Christian Marangi , John Crispin , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: [net-next PATCH v6 12/16] dt-bindings: net: dsa: qca8k: add LEDs definition example Date: Mon, 27 Mar 2023 16:10:27 +0200 Message-Id: <20230327141031.11904-13-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230327141031.11904-1-ansuelsmth@gmail.com> References: <20230327141031.11904-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.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..ad354864187a 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 has at most 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 {