mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Probst <markus.probst@posteo.de>
To: "Lee Jones" <lee@kernel.org>, "Pavel Machek" <pavel@kernel.org>,
	"Griffin Kroah-Hartman" <griffin@kroah.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	 Markus Probst <markus.probst@posteo.de>
Subject: [PATCH 1/2] dt-bindings: leds: Add synology disk led controller
Date: Wed, 02 Dec 2026 15:21:16 +0000	[thread overview]
Message-ID: <20261202-synology_disk_leds-v1-1-53249fd3a2ad@posteo.de> (raw)
In-Reply-To: <20261202-synology_disk_leds-v1-0-53249fd3a2ad@posteo.de>

Add devicetree bindings for the synology disk led controller. It uses
the Atmega1608 microcontroller with I2C interface.

The led controller supports up to 24 leds. It is common that multiple leds
in Synology devices share the same slot and thus are grouped as multicolor
led.

Signed-off-by: Markus Probst <markus.probst@posteo.de>
---
 .../bindings/leds/synology,disk-leds.yaml          | 151 +++++++++++++++++++++
 1 file changed, 151 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml b/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml
new file mode 100644
index 000000000000..e9a8df77c8b4
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml
@@ -0,0 +1,151 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/synology,disk-leds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synology disk led controller
+
+maintainers:
+  - Markus Probst <markus.probst@posteo.de>
+
+description: |
+  Led controller used for disk leds in Synology devices. It uses the
+  Atmega1608 microcontroller with I2C interface.
+
+properties:
+  compatible:
+    const: synology,disk-leds
+
+  reg:
+    maxItems: 1
+
+patternProperties:
+  "^disk-[0-9]+$":
+    type: object
+    $ref: leds-class-multicolor.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+    patternProperties:
+      "^led@[0-9]+$":
+        type: object
+        additionalProperties: false
+
+        properties:
+          reg:
+            description: Index of the LED.
+            minimum: 0
+            maximum: 23
+
+          color:
+            description: Color of the LED.
+            $ref: /schemas/types.yaml#/definitions/uint32
+            minimum: 0
+            maximum: 14
+
+        required:
+          - reg
+          - color
+
+    required:
+      - "#address-cells"
+      - "#size-cells"
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@60 {
+            compatible = "synology,disk-leds";
+            reg = <0x60>;
+
+            disk-1 {
+                function = LED_FUNCTION_DISK;
+                function-enumerator = <1>;
+                color = <LED_COLOR_ID_MULTI>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                led@0 {
+                    reg = <0>;
+                    color = <LED_COLOR_ID_GREEN>;
+                };
+
+                led@1 {
+                    reg = <1>;
+                    color = <LED_COLOR_ID_AMBER>;
+                };
+            };
+
+            disk-2 {
+                function = LED_FUNCTION_DISK;
+                function-enumerator = <2>;
+                color = <LED_COLOR_ID_MULTI>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                led@2 {
+                    reg = <2>;
+                    color = <LED_COLOR_ID_GREEN>;
+                };
+
+                led@3 {
+                    reg = <3>;
+                    color = <LED_COLOR_ID_AMBER>;
+                };
+            };
+
+            disk-3 {
+                function = LED_FUNCTION_DISK;
+                function-enumerator = <3>;
+                color = <LED_COLOR_ID_MULTI>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                led@4 {
+                    reg = <4>;
+                    color = <LED_COLOR_ID_GREEN>;
+                };
+
+                led@5 {
+                    reg = <5>;
+                    color = <LED_COLOR_ID_AMBER>;
+                };
+            };
+
+            disk-4 {
+                function = LED_FUNCTION_DISK;
+                function-enumerator = <4>;
+                color = <LED_COLOR_ID_MULTI>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                led@6 {
+                    reg = <6>;
+                    color = <LED_COLOR_ID_GREEN>;
+                };
+
+                led@7 {
+                    reg = <7>;
+                    color = <LED_COLOR_ID_AMBER>;
+                };
+            };
+        };
+    };

-- 
2.56.1


  reply	other threads:[~2026-12-02 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:21 [PATCH 0/2] leds: add driver for disk leds in synology devices Markus Probst
2026-12-02 15:21 ` Markus Probst [this message]
2026-12-02 15:21 ` [PATCH 2/2] " Markus Probst

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=20261202-synology_disk_leds-v1-1-53249fd3a2ad@posteo.de \
    --to=markus.probst@posteo.de \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gary@garyguo.net \
    --cc=griffin@kroah.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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

all inboxes | Powered by JetHome®