1*4882a593SmuzhiyunLEDs connected to GPIO lines 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun- compatible : should be "gpio-leds". 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunEach LED is represented as a sub-node of the gpio-leds device. Each 7*4882a593Smuzhiyunnode's name represents the name of the corresponding LED. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunLED sub-node properties: 10*4882a593Smuzhiyun- gpios : Should specify the LED's GPIO, see "gpios property" in 11*4882a593Smuzhiyun Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be 12*4882a593Smuzhiyun indicated using flags in the GPIO specifier. 13*4882a593Smuzhiyun- label : (optional) 14*4882a593Smuzhiyun see Documentation/devicetree/bindings/leds/common.txt 15*4882a593Smuzhiyun- linux,default-trigger : (optional) 16*4882a593Smuzhiyun see Documentation/devicetree/bindings/leds/common.txt 17*4882a593Smuzhiyun- default-state: (optional) The initial state of the LED. Valid 18*4882a593Smuzhiyun values are "on", "off", and "keep". If the LED is already on or off 19*4882a593Smuzhiyun and the default-state property is set the to same value, then no 20*4882a593Smuzhiyun glitch should be produced where the LED momentarily turns off (or 21*4882a593Smuzhiyun on). The "keep" setting will keep the LED at whatever its current 22*4882a593Smuzhiyun state is, without producing a glitch. The default is off if this 23*4882a593Smuzhiyun property is not present. 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunExamples: 26*4882a593Smuzhiyun 27*4882a593Smuzhiyunleds { 28*4882a593Smuzhiyun compatible = "gpio-leds"; 29*4882a593Smuzhiyun hdd { 30*4882a593Smuzhiyun label = "IDE Activity"; 31*4882a593Smuzhiyun gpios = <&mcu_pio 0 1>; /* Active low */ 32*4882a593Smuzhiyun linux,default-trigger = "ide-disk"; 33*4882a593Smuzhiyun }; 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun fault { 36*4882a593Smuzhiyun gpios = <&mcu_pio 1 0>; 37*4882a593Smuzhiyun /* Keep LED on if BIOS detected hardware fault */ 38*4882a593Smuzhiyun default-state = "keep"; 39*4882a593Smuzhiyun }; 40*4882a593Smuzhiyun}; 41*4882a593Smuzhiyun 42*4882a593Smuzhiyunrun-control { 43*4882a593Smuzhiyun compatible = "gpio-leds"; 44*4882a593Smuzhiyun red { 45*4882a593Smuzhiyun gpios = <&mpc8572 6 0>; 46*4882a593Smuzhiyun default-state = "off"; 47*4882a593Smuzhiyun }; 48*4882a593Smuzhiyun green { 49*4882a593Smuzhiyun gpios = <&mpc8572 7 0>; 50*4882a593Smuzhiyun default-state = "on"; 51*4882a593Smuzhiyun }; 52*4882a593Smuzhiyun}; 53