From patchwork Mon Apr 17 15:17:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 13214250 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 DB608C77B76 for ; Mon, 17 Apr 2023 15:22:27 +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=NBS40oya9Vz4Ikd3f3WJjqHNdYgPgDAtYEg/i4Ye5/4=; b=SNcjZZFaH0mgVW Wu5dV4OgmKUMSk9LIXCl8od3kpyw6MyhcIHlVYlXVhME86556vCK0OjjDErlDclJu42tkaHS0TQzj NLbKgUETMhZH1adRwmzwg8ZQPCB3e6FUY3HIFGa+ZaK4t6aTO5R0pgYkiHJYjWU27GXlLdNMNB36Z wT4RODuvhfIfe+kBSdJvrZMSjPgN6Hcitee2Y7H19tNYy+b0LgaMzOWubFlBUmUMpEzzBchW4NczN BMxVUIoVLhzcskS5fpew4GyKXrWIBCKua9sX0WXJXg6EzQCVfBjaV8rTzTKx4DdMVX0zB9kXQyIzq KpEK62FvvyTdVkLv2ydA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poQfg-00Gpz7-2w; Mon, 17 Apr 2023 15:21:36 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poQfX-00Gpri-1Y for linux-arm-kernel@lists.infradead.org; Mon, 17 Apr 2023 15:21:29 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f0aabd1040so44214185e9.1 for ; Mon, 17 Apr 2023 08:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681744884; x=1684336884; 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=rV9EcelsXiO5njlxQQAeC/3UMAuEjghxynP/HIeqk7E=; b=Xo1Et9VzokF1Un+UBViXcsNEPqexZ3w1hh+5Ne5SfV/nSjtC0VD80dSqt7r8D6kF01 tlhx2suXoiUoRp3QpQPBAw+u6ZSpF893YWiaMcIASTRxLFaYVJn9TYyYLAozz8127kd7 8dZz4rltnsJncm167nLsmlNOiCAElrM/o8tAJNqRdZ6HbQkxjS7WTvnfDyDN70y0sk7i uMmsOv2tmeAuaUifBkxWvckJ+biyn4S3gAGCT1lpDcb44fVmink6yBF2XzGnuQGFhAwT m+e0OFcfiBGd/RLlpRYMo39eOig1+Wf5mx9Rgc9RoLEuar5g0a1RxlMP3qYdFR4BJUi5 Cmmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681744884; x=1684336884; 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=rV9EcelsXiO5njlxQQAeC/3UMAuEjghxynP/HIeqk7E=; b=Y8wPe+OuNTz3klex2SvZNRFK66Co+OAy/tuLaLdnssUuwxaLbEIxIpxoBzvqmRI6gJ /mQX7EfLsVaDBf1eTFiThWfy3CuBY5iVXyijQEC2SLd5Y0+rqql0ynnWiGIMLX4GqdV0 KG8DUJiWEB6yidHzIvinv9fFIhs4YIGCX4wHtTyRIY3U+j6Ie1qsoEssJBDw7EONrme9 eR3O0f/ndLBkgtkclNe1AZjWebVsAFX/56q1Yz7CoXeaBOXO0rV6G+jVdG1ozm/aAuiD Y0gAO9psI6dtAGt3a8W74eRgDv1atWLxPhvyc0hJlRfu1FJdHxO7zE5YTs/8mcJ25R/R fGPw== X-Gm-Message-State: AAQBX9dfiBzXVgMZ+DuMwMaf68n3lkPYNMg3hQi5bwTEN09RLSzz7B0O 96HHavR26L8dsFzpyC4O2us= X-Google-Smtp-Source: AKy350bxMNBPUgNwgAazK2IDboqf6/FlMetlBFozI9HUlvAID5orG7cGpsyH5XC2K1T8JmHvma6H2g== X-Received: by 2002:adf:e702:0:b0:2fb:b869:bc08 with SMTP id c2-20020adfe702000000b002fbb869bc08mr683848wrm.23.1681744883644; Mon, 17 Apr 2023 08:21:23 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 08:21:22 -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 11/16] dt-bindings: net: dsa: qca8k: add LEDs definition example Date: Mon, 17 Apr 2023 17:17:33 +0200 Message-Id: <20230417151738.19426-12-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_082127_532305_334E1AA6 X-CRM114-Status: GOOD ( 13.52 ) 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 | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml index fe9ebe285938..df64eebebe18 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,25 @@ 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; + default-state = "keep"; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; port@2 {