1 # SPDX-License-Identifier: GPL-2.0-only
4 $id: http://devicetree.org/schemas/leds/leds-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: LEDs connected to GPIO lines
10 - Jacek Anaszewski <jacek.anaszewski@gmail.com>
11 - Pavel Machek <pavel@ucw.cz>
14 Each LED is represented as a sub-node of the gpio-leds device. Each
15 node's name represents the name of the corresponding LED.
22 # The first form is preferred, but fall back to just 'led' anywhere in the
23 # node name to at least catch some child nodes.
24 "(^led-[0-9a-f]$|led)":
34 retain-state-suspended:
36 The suspend state can be retained.Such as charge-led gpio.
39 retain-state-shutdown:
41 Retain the state of the LED on shutdown. Useful in BMC systems, for
42 example when the BMC is rebooted while the host remains up.
48 additionalProperties: false
53 #include <dt-bindings/gpio/gpio.h>
54 #include <dt-bindings/leds/common.h>
57 compatible = "gpio-leds";
59 gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "disk-activity";
61 function = LED_FUNCTION_DISK;
65 gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
66 /* Keep LED on if BIOS detected hardware fault */
67 default-state = "keep";
68 function = LED_FUNCTION_FAULT;
73 compatible = "gpio-leds";
75 gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>;
76 color = <LED_COLOR_ID_RED>;
77 default-state = "off";
80 gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>;
81 color = <LED_COLOR_ID_GREEN>;