From patchwork Tue Mar 7 17:00:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13164876 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 1A385C678D5 for ; Tue, 7 Mar 2023 22:35:20 +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=w+vofR9751rcxK YIANfcULwjnwWphqbeuvKOm24O4VdXVnRZ303XxXOui4+6trnXL53skEn/qvONVHs6mksAYOSu6Z5 mnFTjcwSKBXgjMDBumSKc5LkVXEyqF3GlZkqsYMH7Yu6Vdt1mw1yrfV3KMeRwBqWBeIZ+qsp45aR7 gvY5mHSYwy0ILh4oYlJ6gtttzWngOQ9GnXlHpEyZACG69bZPhjyGm/phdGIVkAtVVJlrh3YCL7Z7m UER8Qq1e/r3FNmTny19Z4+OSXPNsAjJgSjOKOd/0vlqOwvzh8/+6NyhHLK6ugXr2z+Wb9xgny+hNA VMB4j8dUOraYJlqxKobw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZft3-002hCh-RV; Tue, 07 Mar 2023 22:34:25 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZfsG-002gm9-LN for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 22:33:38 +0000 Received: by mail-wm1-x32e.google.com with SMTP id c18so8758837wmr.3 for ; Tue, 07 Mar 2023 14:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678228416; 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=WDoaAo6JIUdl2kw+jFWE8rMH0sejm6rC1azuVDxCr7JZJh+7YHIGproCgk3ja9SsG8 ahK/Z9tGQ0hexAtbKI8a2mIcpca1UlAe6E3GWIc5+HIKMds9jsQGnSJDLvHG0Da/HLVs 3r43uj8OwxIV80rQYuayBkTjeZoPyE1jycr/p12/fS8dQfVrKQObz5V5jEKGHiv36wU5 9OnWJtGNlS1+NqUJArkJHVP+vdCFbttDjbF7RgAyUvVqy10g0i7DL7NytX6fXq4mzxmw /Jir8tDLcLDkMsC7PHJvb3CA7b6+r20eWcos5CIaR7/MhYtwlOK3idxCVcXwWvAX2XCe bJhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678228416; 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=j9Zh29NirZ278O/qUHxUNtsk/etccbu685dUUlBCsI4UquYqN48OuWZtNvz0r21DN4 2fJSKGTe16womiq+eTxwhaWOg7bPQnxg5iRYfYuA7Fdbj10E9YK1DeZ+xKqx10TNi4gs h+vVQWQHlPlYx6GnkYfzRz4zsQBO0Ycf9xMvbOLI3lI+iMicXUU3MJcrkDkcZR1PTWLv pBJkzUPoCkAd9uludVlWHFrny45Bo5n7+H9dHmkYFgK9SprtcvuVZdWQ2i/ZDnc7ru39 S9xDja+X3w3jd3wFR/Kse/fQGYK3jMCfFNKRTgap8iYNnUbZcM6B48EA79sFJyTA19Tk 3mpQ== X-Gm-Message-State: AO0yUKUPfv04iw1OsdmkZE0Uj1qH1XJfel2ovL51du3B22hivn4TX2wv 7SProhmgPduv6NqV/jB4tAE= X-Google-Smtp-Source: AK7set9EOVxcyvegEO7ejYzIPAKVwZEurXyg6nlBBeD5DcYnJSdy+NEcRP8/INlTGVJM9bCUJkXtug== X-Received: by 2002:a05:600c:198e:b0:3eb:2b79:a40 with SMTP id t14-20020a05600c198e00b003eb2b790a40mr13176424wmq.20.1678228415951; Tue, 07 Mar 2023 14:33:35 -0800 (PST) Received: from localhost.localdomain (93-34-89-197.ip49.fastwebnet.it. [93.34.89.197]) by smtp.googlemail.com with ESMTPSA id q11-20020a05600c46cb00b003dc1d668866sm19233101wmo.10.2023.03.07.14.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 14:33:35 -0800 (PST) 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 , Christian Marangi , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lee Jones , linux-leds@vger.kernel.org Subject: [net-next PATCH 09/11] dt-bindings: net: dsa: qca8k: add LEDs definition example Date: Tue, 7 Mar 2023 18:00:44 +0100 Message-Id: <20230307170046.28917-10-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170046.28917-1-ansuelsmth@gmail.com> References: <20230307170046.28917-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_143336_733029_70ECAD9F X-CRM114-Status: GOOD ( 13.83 ) 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 {