linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: "Pavel Machek" <pavel@ucw.cz>, "Lee Jones" <lee@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"William Zhang" <william.zhang@broadcom.com>,
	"Anand Gore" <anand.gore@broadcom.com>,
	"Kursad Oney" <kursad.oney@broadcom.com>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	 Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 1/2] dt-bindings: leds: bcmbca: Add bindings for BRCMBCA LEDs
Date: Fri, 20 Sep 2024 13:15:12 +0200	[thread overview]
Message-ID: <20240920-bcmbca-leds-v1-1-5f70e692c6ff@linaro.org> (raw)
In-Reply-To: <20240920-bcmbca-leds-v1-0-5f70e692c6ff@linaro.org>

The Broadcom BCA (Broadband Access) SoCs contain a unique
LED block. Add bindings for it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../devicetree/bindings/leds/brcm,bcmbca-leds.yaml | 88 ++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/brcm,bcmbca-leds.yaml b/Documentation/devicetree/bindings/leds/brcm,bcmbca-leds.yaml
new file mode 100644
index 000000000000..7fe2222c0c58
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/brcm,bcmbca-leds.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/brcm,bcmbca-leds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCMBCA LEDs
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+description: |
+  The Broadcom BCA (Broadband Access) SoCs have a LED control
+  block that can support either parallel (directly connected)
+  LEDs or serial (connected to 1-4 shift registers) LEDs.
+  The LEDs can optionally be hardware-triggered by ethernet port
+  traffic.
+
+properties:
+  compatible:
+    const: brcm,bcmbca-leds
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  brcm,serial-shifters:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      This describes the number of 8-bit serial shifters
+      connected to the LED controller block. If this property
+      is definied, it is implicit that the driver is using
+      serial LED control, if it is missing, parallel LED
+      control is assumed.
+
+patternProperties:
+  "^led@[0-9a-f]+$":
+    type: object
+    $ref: common.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      reg:
+        minimum: 0
+
+    required:
+      - reg
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        led-controller@800 {
+            #address-cells = <1>;
+            #size-cells = <0>;
+            compatible = "brcm,bcmbca-leds";
+            reg = <0x800 0xc8>;
+
+            led@0 {
+                reg = <0>;
+                active-low;
+                function = "ext";
+                color = <LED_COLOR_ID_GREEN>;
+            };
+
+            led@1 {
+                reg = <1>;
+                active-low;
+                function = "ext";
+                color = <LED_COLOR_ID_AMBER>;
+            };
+        };
+    };

-- 
2.46.0


  reply	other threads:[~2024-09-20 11:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 11:15 [PATCH 0/2] leds: Add basic BCMBCA LEDs support Linus Walleij
2024-09-20 11:15 ` Linus Walleij [this message]
2024-09-20 11:28   ` [PATCH 1/2] dt-bindings: leds: bcmbca: Add bindings for BRCMBCA LEDs Rafał Miłecki
2024-09-24 21:51   ` Rob Herring
2024-09-20 11:15 ` [PATCH 2/2] leds: bcmbca: Add new driver for Broadcom BCMBCA Linus Walleij
2024-09-20 11:30   ` Rafał Miłecki
2024-09-20 13:36     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240920-bcmbca-leds-v1-1-5f70e692c6ff@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=anand.gore@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=krzk+dt@kernel.org \
    --cc=kursad.oney@broadcom.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafal@milecki.pl \
    --cc=robh@kernel.org \
    --cc=william.zhang@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).