summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/leds/brcm,bcm6358-leds.yaml
blob: 95fa311fddb5ec38940d8e53a77703be41f28a81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/brcm,bcm6358-leds.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LEDs connected to Broadcom BCM6358 controller

description: |
  This controller is present on BCM6358 and BCM6368.
  In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
  which can either be controlled by software (exporting the 74x164 as spi-gpio.
  See Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or
  by hardware using this driver.

maintainers:
  - Álvaro Fernández Rojas <noltari@gmail.com>

properties:
  compatible:
    const: brcm,bcm6358-leds

  reg:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  brcm,clk-div:
    description: SCK signal divider.
    default: 1
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 2, 4, 8]

  brcm,clk-dat-low:
    description: Makes clock and data signals active low.
    type: boolean

patternProperties:
  "^led@1?[0-9a-f]$":
    type: object
    $ref: common.yaml#
    unevaluatedProperties: false
    description: Each LED is represented as a sub-node of
      this device.

    properties:
      reg:
        description: LED pin number (0 to 31).
        maxItems: 1

    required:
      - reg

required:
  - compatible
  - reg
  - "#address-cells"
  - "#size-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/leds/common.h>
    led-controller@fffe00d0 {
        compatible = "brcm,bcm6358-leds";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0xfffe00d0 0x8>;

        led@0 {
            reg = <0>;
            active-low;
            label = "white:alarm";
        };
        led@2 {
            reg = <2>;
            active-low;
            label = "white:tv";
        };
        led@3 {
            reg = <3>;
            active-low;
            label = "white:tel";
        };
        led@4 {
            reg = <4>;
            active-low;
            label = "white:adsl";
        };
    };
...