From patchwork Tue May 3 15:36:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 569165 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 D5429C433EF for ; Tue, 3 May 2022 15:36:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238622AbiECPkC (ORCPT ); Tue, 3 May 2022 11:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238616AbiECPkC (ORCPT ); Tue, 3 May 2022 11:40:02 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37F3D2F383; Tue, 3 May 2022 08:36:29 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id ba17so235126edb.5; Tue, 03 May 2022 08:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6jGlMaGnRuy7SzW1gLK1rbP4ej3ug9RnCTQFRGlHRyo=; b=k1cvzlWbzJU8ceSBKJcWDzW0Rt1lFQMFQKVuSCBM3rRWHrMhjM93dBr7Kq5lU0DvTl gbTjaLTtl4VmPNk5Z5JWAqcRuDz2iknBnFZTG9u4VGtucmjmowjC4Hvremce1a80qEax kD0NsQpDJ7Hv2kHfmJm4OTzKnwb3OSFR+GgGRkNUr6ZEB4KEuTs5uV7fJlymK3iKlS1u BR/5m8Gd4J4TgxIgY3r3tN4HmF610knePaGAp1XcMLakR2v0olaRFFjyl5a3aY1J0HAc dOGmtIpRnS8Ta+37qxbPbRatYSSBCdX8549G4WzJhj81Y9A9N6G/yjEaXHXoaw3P5JqU ZHvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6jGlMaGnRuy7SzW1gLK1rbP4ej3ug9RnCTQFRGlHRyo=; b=f4fx6Q1U1qaN8ykrzpO7NtgnlMRvsfYSvgVU/+pgMrdrh0pbkf6DqtLFZH8yIeO6Rl DXufUBgBnte8CyCLdCvk6KskljDGK4KocKaadE99b8MNDANFoIAdqJi3DqiFBlTXBkBW +XCFe+NhP+a3cKP9cakZfjwEihAIIhjlTcKbWEzVnt4yLar1ubTb2HlPQMG2thNwFiD0 2gTeJetM79vGUE8Avd/mqEtASyNROOCd6t1RkHuNdNYjY0iZ5lD4IDEXoBfXFLTuEBvI 5/OocEDNDDhBA6iR3NpJ86HlU9fmg7Funjsf9Lmbl0gTIqGi03g5/3guGK3DOSVs1IHu gg+Q== X-Gm-Message-State: AOAM530vmBbCwOrqdpdn4S7kGYTAjetzjgdEay2PbiwmVdeL3ihNPHMV vS0Q/zYTgHvKpOC8hNXnehA= X-Google-Smtp-Source: ABdhPJyTFc/zQzQ81G0V89Dfk2X3An9GVbXM/816WyBRdOjFt/CNHHrblwAty6XZ+6wMwEmWC2eJeA== X-Received: by 2002:a05:6402:458:b0:418:78a4:ac3f with SMTP id p24-20020a056402045800b0041878a4ac3fmr18245732edw.196.1651592187493; Tue, 03 May 2022 08:36:27 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id yl1-20020a17090693e100b006f3ef214dd1sm4693395ejb.55.2022.05.03.08.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 08:36:27 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Pavel Machek , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Hauke Mehrtens , Jacek Anaszewski , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH 1/4] dt-bindings: net: add bitfield defines for Ethernet speeds Date: Tue, 3 May 2022 17:36:10 +0200 Message-Id: <20220503153613.15320-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org From: Rafał Miłecki This allows specifying multiple Ethernet speeds in a single DT uint32 value. Signed-off-by: Rafał Miłecki --- include/dt-bindings/net/eth.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/dt-bindings/net/eth.h diff --git a/include/dt-bindings/net/eth.h b/include/dt-bindings/net/eth.h new file mode 100644 index 000000000000..89caff09179b --- /dev/null +++ b/include/dt-bindings/net/eth.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Device Tree constants for the Ethernet + */ + +#ifndef _DT_BINDINGS_ETH_H +#define _DT_BINDINGS_ETH_H + +#define SPEED_UNSPEC 0 +#define SPEED_10 (1 << 0) +#define SPEED_100 (1 << 1) +#define SPEED_1000 (1 << 2) +#define SPEED_2000 (1 << 3) +#define SPEED_2500 (1 << 4) +#define SPEED_5000 (1 << 5) +#define SPEED_10000 (1 << 6) +#define SPEED_14000 (1 << 7) +#define SPEED_20000 (1 << 8) +#define SPEED_25000 (1 << 9) +#define SPEED_40000 (1 << 10) +#define SPEED_50000 (1 << 11) +#define SPEED_56000 (1 << 12) +#define SPEED_100000 (1 << 13) +#define SPEED_200000 (1 << 14) +#define SPEED_400000 (1 << 15) + +#endif From patchwork Tue May 3 15:36:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 570639 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 31C5DC433EF for ; Tue, 3 May 2022 15:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238649AbiECPkO (ORCPT ); Tue, 3 May 2022 11:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238631AbiECPkE (ORCPT ); Tue, 3 May 2022 11:40:04 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D385F2F003; Tue, 3 May 2022 08:36:31 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id i19so34135774eja.11; Tue, 03 May 2022 08:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fyfBTzh+nFyMbqlorBpW+/oFJj2msf8ut26TogSSvvM=; b=pyhVKH4+3uZ6d9PttQPabTkfKS4X+4dWF25oJfqzuF0UBWLi0Qh3PD311mse3/+kJT MCIynAmMpEf7lKJfA264W06se7hD8mlEht1GJrvBiLo/4remn4u23N/Oy2GX0TV3mwLw cXAvk4U8DSo9EXYZS/5j4li449394sKNYq7599SJWuvpeCI5SHbQCVfc1/gUC4PLKZ68 VsOcDsoJplveU10eAHGclfyJaTAfmIuNzURqgCUGWUj/1Gfbpx345BZR36v9M2bzXvYJ tKSkDEBNFKTHL/KnvYwNDaiYG9m2ascw2Mzt0eWxChGPW2tlniVnpaEVOIFDxfspyWxZ 1OyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fyfBTzh+nFyMbqlorBpW+/oFJj2msf8ut26TogSSvvM=; b=AgA/lkb2y35fPgdkBxIETP4ffE/rsc468rHgTy6pV/hiCOO+6mFq1BP2TSbri/0IUD sa3hk+1nwEqhyPuZSEhvpzrXEUgu2T6MgiBlKCdSnKwiO/ThJxTqky5LV1vJ7Gs+F705 lzlysFimiLhLO0Vid/gJwVAB2Ium14LaCmG5en1H4HKhtWzKSJnI9HWeaR5CFpXe4xIP bsk4JnXlKW3ArsTGigoSLgPo0MAUujXiFMpZTqh/0F6yox4lE5J9gealb5TMgO4o5FL4 4YYQzNpU9afaH0gQApt/qpwgg0ij4NWYHm5XNfHp7FhCbLNIg1nlwaKYIDB4S7y6LvxC QMjQ== X-Gm-Message-State: AOAM531iHkWnVtE3x56y28AqJtH91xdaBvftzfZQugKuBZNPUgyLgxAz sALjpDm0dLby03jifnxBZwU= X-Google-Smtp-Source: ABdhPJyAwf9o8XkpMsr1BZVKZJk9YsDNXz5DWxkF2Si8Xaj+V6Au0RL65+l7FDCQ9n9Y6rTD8QEvJg== X-Received: by 2002:a17:906:d552:b0:6f2:408c:e0bf with SMTP id cr18-20020a170906d55200b006f2408ce0bfmr16004655ejc.143.1651592190360; Tue, 03 May 2022 08:36:30 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id yl1-20020a17090693e100b006f3ef214dd1sm4693395ejb.55.2022.05.03.08.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 08:36:30 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Pavel Machek , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Hauke Mehrtens , Jacek Anaszewski , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH 2/4] dt-bindings: net: allow Ethernet devices as LED triggers Date: Tue, 3 May 2022 17:36:11 +0200 Message-Id: <20220503153613.15320-2-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220503153613.15320-1-zajec5@gmail.com> References: <20220503153613.15320-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org From: Rafał Miłecki This allows specifying Ethernet interfaces and switch ports as triggers for LEDs activity. Signed-off-by: Rafał Miłecki --- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index 817794e56227..ec4679e23939 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml @@ -226,6 +226,9 @@ properties: required: - speed +allOf: + - $ref: /schemas/leds/trigger-source.yaml + additionalProperties: true ... From patchwork Tue May 3 15:36:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 569164 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 16B09C4332F for ; Tue, 3 May 2022 15:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238633AbiECPkO (ORCPT ); Tue, 3 May 2022 11:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238632AbiECPkG (ORCPT ); Tue, 3 May 2022 11:40:06 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AD222FE4D; Tue, 3 May 2022 08:36:34 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id a21so20298824edb.1; Tue, 03 May 2022 08:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JuRsVVqEUdtcZTaqe1dOvQJoNCUAzBZXwnxfkTQiX94=; b=BRArI0GcCu4Ce05SnXkZg0daGlzie5NRXUDkV1Lr192k5CWtnRR5IYBTZ9jCJF5NV5 oYINrBDN+xg5CrgkZ+ij7xmWHycrwyTAk6SD4Tr4p1P4mYGB3RzXah89Kmf1ONiML7+n fLl2gttPlv3Jqvs2t2WisdUJ31poWq+jw32Djz5QFVvXYHWsKWqJgyGlwoAzmWxUlMms 2yDRbN/36WlMwwNfD+w7bhoYspqkNmmPOETwNV98BNCXgYQKXCUwWcPV0zlacOCxNm9R 10lO5yJ0fe+cS3aKodyIdl2BZ9uuYNurdKoApObiHGVTG60alfNDMcwE7fD4J42RPuU6 zjMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JuRsVVqEUdtcZTaqe1dOvQJoNCUAzBZXwnxfkTQiX94=; b=7Rkf7ZmNTNAqrNSxkPOlcv0OUTnE49Q90peAsqosditTWyGv3RVhM2sqan03X+L2wA 4tyIG9DhU3IC6B6kH/t2bg9nNqwmzeZc/mql6lqqHiYtJU1mihG4bO47jN3vddUDfUlo MSKR90iK89wXu2inAixkFVos6KvnKmWKimnoHJca/9NfqAZ8uDDrpwYOFQfOir07N47K s8VZEySGMPeCESGF613MZL1fGyT+7EIcddi5mNS37k8von20tj7OBaiEiy53fmM0xMGF DUeD6beoEjVfozN+osNhzqeGlBSyXIxElNvZUzSRJdVt4/a44sdCuCnuggHSUYLLpQQq PCnw== X-Gm-Message-State: AOAM5301UsKebNB0kWXBvFhYoHb+gWzOcRiQ7aXm5tQFeCpuEcy60V/P FpWf80tXTLcn3WdYuO2xX9A= X-Google-Smtp-Source: ABdhPJy4DPM17zPyvjTpRiksTw2yQVmQVsw9kTtZhpCWfe2/iq1eq++c9Q4Ba/UweKwkOXNIsoCR6Q== X-Received: by 2002:a05:6402:35c3:b0:423:f765:4523 with SMTP id z3-20020a05640235c300b00423f7654523mr18336737edc.311.1651592192529; Tue, 03 May 2022 08:36:32 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id yl1-20020a17090693e100b006f3ef214dd1sm4693395ejb.55.2022.05.03.08.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 08:36:32 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Pavel Machek , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Hauke Mehrtens , Jacek Anaszewski , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH 3/4] dt-bindings: leds: add Ethernet triggered LEDs to example Date: Tue, 3 May 2022 17:36:12 +0200 Message-Id: <20220503153613.15320-3-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220503153613.15320-1-zajec5@gmail.com> References: <20220503153613.15320-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org From: Rafał Miłecki This adds 3 entries to existing example: 1. LED triggered by switch port in 10 / 100 Mbps link state 2. LED triggered by switch port in 1000 Mbps link 3. LED triggered by Ethernet interface (any speed) Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/leds/common.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index 328952d7acbb..6c72121a1656 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -168,6 +168,7 @@ examples: - | #include #include + #include led-controller { compatible = "gpio-leds"; @@ -183,6 +184,26 @@ examples: gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; }; + + led-2 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + trigger-sources = <&wan_port (SPEED_10 | SPEED_100)>; + }; + + led-3 { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + trigger-sources = <&wan_port SPEED_1000>; + }; + + led-4 { + function = LED_FUNCTION_LAN; + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + trigger-sources = <&gmac 0>; + }; }; - | From patchwork Tue May 3 15:36:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 570638 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 0713EC433EF for ; Tue, 3 May 2022 15:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238645AbiECPkT (ORCPT ); Tue, 3 May 2022 11:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238637AbiECPkN (ORCPT ); Tue, 3 May 2022 11:40:13 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C14F43054F; Tue, 3 May 2022 08:36:35 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id l7so34236396ejn.2; Tue, 03 May 2022 08:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HxnwmUt5XXOQZLtedBMlDA6s9oP05DqI/7RXSR5ri4c=; b=cM0U2RFj32GEW1ILlg1yfmSdYa3AuHHmdzDbV1IAM4fdtu9AlN2s22sESTs+zDQidd L06dY9drgbavLz55lW8lt6dKonpDvE5lDCAU6hSRTPFcDzQR8QcPQWsCGJqeWuQ6OIbR Xqnkya/gneIhcDexqNiZsj9CIrUM3t8NXWrbv2utsh7I0TkZvJ7QIuBojAHcVoUp8+Gm cXULc5zsN+aKys2ibzN5z933r2KPZowMZXcnacBsW5GvrNoMoeh516KS193U5Amm9riQ Z8IBWwG8R/REwVqgGvkeHc2WvEf+pfQZ1R3so5XdVCNabHRLArKWeXPC0KPQQ6Ev2IQV Cb4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HxnwmUt5XXOQZLtedBMlDA6s9oP05DqI/7RXSR5ri4c=; b=p7dYvvFo7rZWWeGYG+s7BEu3Z1auP53ydyV+dMVDQoVL2V1ouAlnL5fEAXmdzT6vmZ zgjfeQid5LV2hYM1oPodzIOgN0BW+683B9fPVwuQr+mOAwqtBmPHCxERQWTDFh0Rf128 usoI2WVm8QfbQwfLit8rLqSxIOZLDlVraV/U5lZKetkxki7odUPi2pBRYjC8nvrvx/9J GJDs7oLQuXtaDirlF0XADdk2LnwbdqbajlS64yB/D7c6WYIxYgvdXKXevpokMYn82Gw0 M+qQRq4AIlHDucXqOlGn1YbrCbpjAqHAflDXSkC8yv8+0rn6jlVNzfvkvpn5nsmATtZU /fSA== X-Gm-Message-State: AOAM530yO5F7WguLkUcTDwFyONb38MprlbBE1OV3eiBV/NUVTzXoLBI7 0h7ci9tDy6qEMmrDb5uVGjA= X-Google-Smtp-Source: ABdhPJxNBzYQuUyb1KloWpt4FU5+9Zx8momroPTJWceimkMlPE5juKGMGDeyc1y84IgnNFmzwpDvJg== X-Received: by 2002:a17:907:97cc:b0:6df:83bc:314c with SMTP id js12-20020a17090797cc00b006df83bc314cmr16170442ejc.587.1651592194344; Tue, 03 May 2022 08:36:34 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id yl1-20020a17090693e100b006f3ef214dd1sm4693395ejb.55.2022.05.03.08.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 08:36:34 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: Pavel Machek , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Hauke Mehrtens , Jacek Anaszewski , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH 4/4] ARM: dts: BCM5301X: Add triggers for Luxul XWR-1200 network LEDs Date: Tue, 3 May 2022 17:36:13 +0200 Message-Id: <20220503153613.15320-4-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220503153613.15320-1-zajec5@gmail.com> References: <20220503153613.15320-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org From: Rafał Miłecki Those LEDs are not hardware controlled so bootloader / operating system may want to control them manually depending on switch ports state. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts index 9316a36434f7..ee1b0fd3eb86 100644 --- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts @@ -5,6 +5,8 @@ /dts-v1/; +#include + #include "bcm47081.dtsi" #include "bcm5301x-nand-cs0-bch4.dtsi" @@ -38,24 +40,28 @@ power { lan3 { label = "bcm53xx:green:lan3"; gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; + trigger-sources = <&port_lan3 SPEED_UNSPEC>; linux,default-trigger = "none"; }; lan4 { label = "bcm53xx:green:lan4"; gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; + trigger-sources = <&port_lan4 SPEED_UNSPEC>; linux,default-trigger = "none"; }; wan { label = "bcm53xx:green:wan"; gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + trigger-sources = <&port_wan SPEED_UNSPEC>; linux,default-trigger = "none"; }; lan2 { label = "bcm53xx:green:lan2"; gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; + trigger-sources = <&port_lan2 SPEED_UNSPEC>; linux,default-trigger = "none"; }; @@ -87,6 +93,7 @@ status { lan1 { label = "bcm53xx:green:lan1"; gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; + trigger-sources = <&port_lan1 SPEED_UNSPEC>; linux,default-trigger = "none"; }; }; @@ -114,29 +121,34 @@ &srab { status = "okay"; ports { - port@0 { + port_lan4: port@0 { reg = <0>; label = "lan4"; + #trigger-source-cells = <1>; }; - port@1 { + port_lan3: port@1 { reg = <1>; label = "lan3"; + #trigger-source-cells = <1>; }; - port@2 { + port_lan2: port@2 { reg = <2>; label = "lan2"; + #trigger-source-cells = <1>; }; - port@3 { + port_lan1: port@3 { reg = <3>; label = "lan1"; + #trigger-source-cells = <1>; }; - port@4 { + port_wan: port@4 { reg = <4>; label = "wan"; + #trigger-source-cells = <1>; }; port@5 {