summaryrefslogtreecommitdiff
path: root/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml
blob: fd99e3202a8c381402f6f7444771c7ffe89c432c (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
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

description: PWM LED configuration

compatible: "cros-ec,pwm-leds"

include: base.yaml

properties:
  leds:
    type: phandles
    required: true
    description: |
      List of pwm-leds nodes. These are expected to have a pwms property
      pointing to the relevant PWMs, in red, green, blue and optionally sidesel
      order.

      For example
        pwmleds {
                compatible = "pwm-leds";
                pwm_led0: pwm_led_0 {
                        pwms = <&led3_red
                                &led2_green
                                &led1_blue
                                &led3_sidesel
                                >;
                };
        };
        cros-pwmleds {
                compatible = "cros-ec,pwm-leds";
                leds = <&pwm_led0>;
        };

  color-map-red:
    type: array
    required: true
    description: |
      A map of PWM duty cycles per color, up to three channels.

      For example
        color-map-red    = <100   0   0>;
        color-map-green  = <  0 100   0>;
        color-map-blue   = <  0   0 100>;
        color-map-yellow = <100  70   0>;
        color-map-white  = <100  70 100>;
        color-map-amber  = <100  20   0>;

  color-map-green:
    type: array
    required: true

  color-map-blue:
    type: array
    required: true

  color-map-yellow:
    type: array
    required: true

  color-map-white:
    type: array
    required: true

  color-map-amber:
    type: array
    required: true

  brightness-range:
    type: array
    required: true
    description: |
      A list of brigthness range value for all supported channels in order,
      Red, Green, Blue, Yellow, White, Amber (0 to 255).