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      active-low:
56        type: boolean
57        description: Makes LED active low
58
59    required:
60      - reg
61
62    unevaluatedProperties: false
63
64required:
65  - reg
66  - "#address-cells"
67  - "#size-cells"
68
69additionalProperties: false
70
71examples:
72  - |
73    #include <dt-bindings/leds/common.h>
74
75    leds@ff800800 {
76        compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
77        reg = <0xff800800 0xdc>;
78
79        #address-cells = <1>;
80        #size-cells = <0>;
81
82        led@0 {
83            reg = <0x0>;
84            function = LED_FUNCTION_POWER;
85            color = <LED_COLOR_ID_GREEN>;
86            default-state = "on";
87        };
88
89        led@3 {
90            reg = <0x3>;
91            function = LED_FUNCTION_STATUS;
92            color = <LED_COLOR_ID_GREEN>;
93            active-low;
94        };
95    };
96