summaryrefslogtreecommitdiff
path: root/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml
blob: 53688a81729af2dbe13a2252bfe280a8d15c09ee (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
# Copyright 2022 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: GPIO LED pins parent node

compatible: "cros-ec,gpio-led-pins"

child-binding:
    description: Each child node describes all the GPIO pins that need to be
                 altered to set a specific color. Eg. for a board supporting
                 Blue and Amber LEDs - to set LED_AMBER color, amber LED will
                 need to be set to 1 and blue LED to 0. So a node looks like
                 color-amber {
                              led-color = "LED_AMBER";
                              led-pins = <&gpio_ec_chg_led_y_c1 1>,
                                         <&gpio_ec_chg_led_b_c1 0>;
                             };
    properties:
        led-color:
            type: string
            required: true
            description: Used to link the color nodes with the pin nodes
            enum:
                - LED_OFF
                - LED_RED
                - LED_GREEN
                - LED_BLUE
                - LED_YELLOW
                - LED_WHITE
                - LED_AMBER
        led-id:
            type: string
            required: true
            description: Used to link the color nodes with the pin nodes in
                         case of multiple LEDs. Also required by ectool to
                         identify led-ids supported. It needs to match the
                         enum names defined in ec_commands.h
            enum:
                - EC_LED_ID_BATTERY_LED
                - EC_LED_ID_POWER_LED
                - EC_LED_ID_ADAPTER_LED
                - EC_LED_ID_LEFT_LED
                - EC_LED_ID_RIGHT_LED
                - EC_LED_ID_RECOVERY_HW_REINIT_LED
                - EC_LED_ID_SYSRQ_DEBUG_LED
        br-color:
            type: string
            required: false
            description: This is used in the ectool brightness range APIs.
                         It needs to match the enum names defined in ec_commands.h
            enum:
                - EC_LED_COLOR_RED
                - EC_LED_COLOR_GREEN
                - EC_LED_COLOR_BLUE
                - EC_LED_COLOR_YELLOW
                - EC_LED_COLOR_WHITE
                - EC_LED_COLOR_AMBER
        led-pins:
            type: phandle-array
            required: false