All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding
@ 2022-07-05  0:04 Pali Rohár
  2022-07-05  0:04 ` [PATCH 2/2] leds: Add support for Turris 1.x LEDs Pali Rohár
                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Pali Rohár @ 2022-07-05  0:04 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Marek Behún
  Cc: linux-leds, devicetree, linux-kernel

Add device-tree bindings documentation for Turris 1.x RGB LEDs.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 .../bindings/leds/cznic,turris1x-leds.yaml    | 116 ++++++++++++++++++
 1 file changed, 116 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml

diff --git a/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml
new file mode 100644
index 000000000000..fd09613c8d2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml
@@ -0,0 +1,116 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/cznic,turris1x-leds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CZ.NIC's Turris 1.x LEDs driver
+
+maintainers:
+  - Pali Rohár <pali@kernel.org>
+
+description:
+  This module adds support for the RGB LEDs found on the front panel of the
+  Turris 1.x routers. There are 8 RGB LEDs that are controlled by CZ.NIC CPLD
+  firmware running on Lattice FPGA. Firmware is open source and available at
+  https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v
+
+properties:
+  compatible:
+    const: cznic,turris1x-leds
+
+  reg:
+    maxItems: 2
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^multi-led@[0-7]$":
+    type: object
+    $ref: leds-class-multicolor.yaml#
+
+    properties:
+      reg:
+        minimum: 0
+        maximum: 7
+
+    required:
+      - reg
+
+additionalProperties: false
+
+examples:
+  - |
+
+    #include <dt-bindings/leds/common.h>
+
+    cpld@3,0 {
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        led-controller@13 {
+            compatible = "cznic,turris1x-leds";
+            reg = <0x13 0x1d>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            multi-led@0 {
+                    reg = <0x0>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_WAN;
+            };
+
+            multi-led@1 {
+                    reg = <0x1>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_LAN;
+                    function-enumerator = <5>;
+            };
+
+            multi-led@2 {
+                    reg = <0x2>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_LAN;
+                    function-enumerator = <4>;
+            };
+
+            multi-led@3 {
+                    reg = <0x3>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_LAN;
+                    function-enumerator = <3>;
+            };
+
+            multi-led@4 {
+                    reg = <0x4>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_LAN;
+                    function-enumerator = <2>;
+            };
+
+            multi-led@5 {
+                    reg = <0x5>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_LAN;
+                    function-enumerator = <1>;
+            };
+
+            multi-led@6 {
+                    reg = <0x6>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_WLAN;
+            };
+
+            multi-led@7 {
+                    reg = <0x7>;
+                    color = <LED_COLOR_ID_RGB>;
+                    function = LED_FUNCTION_POWER;
+            };
+        };
+    };
+
+...
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-11-02  0:25 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  0:04 [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Pali Rohár
2022-07-05  0:04 ` [PATCH 2/2] leds: Add support for Turris 1.x LEDs Pali Rohár
2022-07-05 10:37   ` Marek Behún
2022-07-05 10:56     ` Pali Rohár
2022-07-05 11:52       ` Marek Behún
2022-07-05 12:22         ` Pali Rohár
2022-07-05 12:30           ` Marek Behún
2022-07-05 12:32             ` Pali Rohár
2022-07-05 12:38               ` Marek Behún
2022-07-05 11:36 ` [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Krzysztof Kozlowski
2022-07-05 11:42   ` Pali Rohár
2022-07-05 11:51     ` Krzysztof Kozlowski
2022-07-05 12:15       ` Pali Rohár
2022-07-05 12:55         ` Krzysztof Kozlowski
2022-07-05 13:05           ` Pali Rohár
2022-07-05 13:07             ` Krzysztof Kozlowski
2022-07-05 11:53     ` Marek Behún
2022-07-05 13:54 ` Rob Herring
2022-07-05 15:59 ` [PATCH v2 1/2] [RFT] " Pali Rohár
2022-07-05 15:59   ` [PATCH v2 2/2] leds: Add support for Turris 1.x LEDs Pali Rohár
2022-07-05 17:30     ` Marek Behún
2022-07-05 18:40     ` Andy Shevchenko
2022-07-05 18:46       ` Pali Rohár
2022-07-05 18:58         ` Andy Shevchenko
2022-11-02  0:25     ` Pali Rohár
2022-07-05 17:51   ` [PATCH v2 1/2] [RFT] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Krzysztof Kozlowski
2022-07-05 19:18   ` Rob Herring
2022-07-06 11:15   ` Marek Behún
2022-07-06 11:19     ` Pali Rohár
2022-07-06 15:27       ` Marek Behún
2022-07-06 15:36         ` Krzysztof Kozlowski
2022-07-06 16:43           ` Marek Behún
2022-07-06 18:16             ` Krzysztof Kozlowski
2022-07-08 16:05           ` Pali Rohár
2022-07-08 16:29             ` Marek Behún
2022-07-12 21:28             ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.