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: 65902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3349wrd; Tue, 7 Mar 2023 14:46:21 -0800 (PST) X-Google-Smtp-Source: AK7set/c7J6cZeI8MZMjg6YA9qNjqCV1EenQTpZesp0TMIwzUhoN2Bq6kut+MJbAwZjf1YukJqdq X-Received: by 2002:a17:902:ce87:b0:196:3088:5dd6 with SMTP id f7-20020a170902ce8700b0019630885dd6mr19439209plg.13.1678229181369; Tue, 07 Mar 2023 14:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678229181; cv=none; d=google.com; s=arc-20160816; b=ygrVIvqH3+lCPu5s3rNWyeoCw9utUZUDEdP0YqKLGPMi64drX/3X/HhnS5rsBYet1w ctu0lbR//2IMfgaQ/a2p0XHfY/XkOQDBBVem1Ve3uwPnupJNKY68F1RNgAx9gYphFJvi rATabQ+ELLFC99yf+hLTxky2Aet0m6zopJQl0K0tuxsmPfzHBl89Cqch7IiTE7bkOs11 cS9tZo3y3ZEhgIdMJKhoRgyQY22yiz1Gw8ga3t8THhhE8Vg8HQfiVELLjYVrFfl9eoiJ +lj8In0rY9vE8uQoCdc/AQ4GNjV7s/TcMmNOLKH8HuNn8Ij39MvPXJLBJARQ5pICeh0e 02Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1wDcE5BTiRUWu5IpXdTXJGaa7mTD/67d24QZlEDxG4g=; b=yBVMuQIGi8KLTZpdjaJKqFAH+cSWdvBfiyD2kYnpn1al5hMxPNzTssG8WIblAe7nP/ svbmxnc+RySE4CAp7kmSox+97HBUNBrGkV8Z+evPnwYpdx/+BiS5AzRuZ1Wy3Q6P4o47 UB5LnPcgH33qhchq9EGr7f9cuemhBjRQ/6xSCBKQd5PHkjXYbw6rqc/cJIfweIZ5O7Ym Y76IoSfbOjd6Ac4zUMYtFXYl4M7LmltEE59nLejlOqhuBmFiXkVlkcJ08CxX9EtPbgbd 6eIbrlJZ1jzDxn0f1SBysJjMqkP7NhyNrV5Nsx5inJnFtWf8QQyk3FgChOcb7qqsAJHT 19LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WDoaAo6J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a17090340c800b0019e2bd4840dsi14058495pld.448.2023.03.07.14.46.08; Tue, 07 Mar 2023 14:46:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WDoaAo6J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbjCGWeO (ORCPT + 99 others); Tue, 7 Mar 2023 17:34:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbjCGWdx (ORCPT ); Tue, 7 Mar 2023 17:33:53 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1D6AA02A9; Tue, 7 Mar 2023 14:33:37 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id k37so8794636wms.0; Tue, 07 Mar 2023 14:33:37 -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=wjuuCHE5OXFDxoi0HAXfr3kAC38R+f83ThPk8jzPqNqp1EuBMSyLXGVI+A9TWvyh0/ jSdPkB2jV7rjaOPFeYl1qxA77qtgGG/SLfG9Q3NPO7H/9k3O+C3i9HbqI5DfL4OkX44X yrSxxhg3/2ij0HLBEtkHN+QOfNE1UAMvJQ9ljzoP76tT4LDbW5s7uhPnAyrzY2luxBt+ oub4itDSn//bM1I9YEcP24wdr+NbvmTojv2Mh/ZCIobBE8NUpF1p3a32U02wR8UeBY/z m4bsxaiw5WHYKFqkPjXMLvJpMxijpJ5bHIHk3UJ13aI5TxzSmIznS+uXUDgZX/Catgbs u2pw== X-Gm-Message-State: AO0yUKUZjz2nO3p93oMeFcrz96FE296kE8qwfRsEa+JmtEy40A9G3iTt JnJz0nv69ls8QIDD0SUHHaw= 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-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759750841797015290?= X-GMAIL-MSGID: =?utf-8?q?1759750841797015290?= 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 {