xref: /linux/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/leds-bcm63138.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom's BCM63138 LEDs controller
8
9maintainers:
10  - Rafał Miłecki <rafal@milecki.pl>
11
12description: |
13  This LEDs controller was first used on BCM63138 and later reused on BCM4908,
14  BCM6848, BCM6858, BCM63138, BCM63148, BCM63381 and BCM68360 SoCs.
15
16  It supports up to 32 LEDs that can be connected parallelly or serially. It
17  also includes limited support for hardware blinking.
18
19  Binding serially connected LEDs isn't documented yet.
20
21properties:
22  compatible:
23    oneOf:
24      - items:
25          - enum:
26              - brcm,bcm4908-leds
27              - brcm,bcm6848-leds
28              - brcm,bcm6858-leds
29              - brcm,bcm63148-leds
30              - brcm,bcm63381-leds
31              - brcm,bcm68360-leds
32          - const: brcm,bcm63138-leds
33      - const: brcm,bcm63138-leds
34
35  reg:
36    maxItems: 1
37
38  "#address-cells":
39    const: 1
40
41  "#size-cells":
42    const: 0
43
44patternProperties:
45  "^led@[a-f0-9]+$":
46    type: object
47
48    $ref: common.yaml#
49
50    properties:
51      reg:
52        maxItems: 1
53        description: LED pin number
54
55    required:
56      - reg
57
58    unevaluatedProperties: false
59
60required:
61  - reg
62  - "#address-cells"
63  - "#size-cells"
64
65additionalProperties: false
66
67examples:
68  - |
69    #include <dt-bindings/leds/common.h>
70
71    leds@ff800800 {
72        compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
73        reg = <0xff800800 0xdc>;
74
75        #address-cells = <1>;
76        #size-cells = <0>;
77
78        led@0 {
79            reg = <0x0>;
80            function = LED_FUNCTION_POWER;
81            color = <LED_COLOR_ID_GREEN>;
82            default-state = "on";
83        };
84
85        led@3 {
86            reg = <0x3>;
87            function = LED_FUNCTION_STATUS;
88            color = <LED_COLOR_ID_GREEN>;
89            active-low;
90        };
91    };
92