1*4882a593SmuzhiyunDevice Tree Bindings for Register Bit LEDs 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRegister bit leds are used with syscon multifunctional devices 4*4882a593Smuzhiyunwhere single bits in a certain register can turn on/off a 5*4882a593Smuzhiyunsingle LED. The register bit LEDs appear as children to the 6*4882a593Smuzhiyunsyscon device, with the proper compatible string. For the 7*4882a593Smuzhiyunsyscon bindings see: 8*4882a593SmuzhiyunDocumentation/devicetree/bindings/mfd/syscon.yaml 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunEach LED is represented as a sub-node of the syscon device. Each 11*4882a593Smuzhiyunnode's name represents the name of the corresponding LED. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunLED sub-node properties: 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunRequired properties: 16*4882a593Smuzhiyun- compatible : must be "register-bit-led" 17*4882a593Smuzhiyun- offset : register offset to the register controlling this LED 18*4882a593Smuzhiyun- mask : bit mask for the bit controlling this LED in the register 19*4882a593Smuzhiyun typically 0x01, 0x02, 0x04 ... 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunOptional properties: 22*4882a593Smuzhiyun- label : (optional) 23*4882a593Smuzhiyun see Documentation/devicetree/bindings/leds/common.txt 24*4882a593Smuzhiyun- linux,default-trigger : (optional) 25*4882a593Smuzhiyun see Documentation/devicetree/bindings/leds/common.txt 26*4882a593Smuzhiyun- default-state: (optional) The initial state of the LED 27*4882a593Smuzhiyun see Documentation/devicetree/bindings/leds/common.txt 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunExample: 30*4882a593Smuzhiyun 31*4882a593Smuzhiyunsyscon: syscon@10000000 { 32*4882a593Smuzhiyun compatible = "arm,realview-pb1176-syscon", "syscon"; 33*4882a593Smuzhiyun reg = <0x10000000 0x1000>; 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun led@8.0 { 36*4882a593Smuzhiyun compatible = "register-bit-led"; 37*4882a593Smuzhiyun offset = <0x08>; 38*4882a593Smuzhiyun mask = <0x01>; 39*4882a593Smuzhiyun label = "versatile:0"; 40*4882a593Smuzhiyun linux,default-trigger = "heartbeat"; 41*4882a593Smuzhiyun default-state = "on"; 42*4882a593Smuzhiyun }; 43*4882a593Smuzhiyun led@8.1 { 44*4882a593Smuzhiyun compatible = "register-bit-led"; 45*4882a593Smuzhiyun offset = <0x08>; 46*4882a593Smuzhiyun mask = <0x02>; 47*4882a593Smuzhiyun label = "versatile:1"; 48*4882a593Smuzhiyun linux,default-trigger = "mmc0"; 49*4882a593Smuzhiyun default-state = "off"; 50*4882a593Smuzhiyun }; 51*4882a593Smuzhiyun led@8.2 { 52*4882a593Smuzhiyun compatible = "register-bit-led"; 53*4882a593Smuzhiyun offset = <0x08>; 54*4882a593Smuzhiyun mask = <0x04>; 55*4882a593Smuzhiyun label = "versatile:2"; 56*4882a593Smuzhiyun linux,default-trigger = "cpu0"; 57*4882a593Smuzhiyun default-state = "off"; 58*4882a593Smuzhiyun }; 59*4882a593Smuzhiyun led@8.3 { 60*4882a593Smuzhiyun compatible = "register-bit-led"; 61*4882a593Smuzhiyun offset = <0x08>; 62*4882a593Smuzhiyun mask = <0x08>; 63*4882a593Smuzhiyun label = "versatile:3"; 64*4882a593Smuzhiyun default-state = "off"; 65*4882a593Smuzhiyun }; 66*4882a593Smuzhiyun led@8.4 { 67*4882a593Smuzhiyun compatible = "register-bit-led"; 68*4882a593Smuzhiyun offset = <0x08>; 69*4882a593Smuzhiyun mask = <0x10>; 70*4882a593Smuzhiyun label = "versatile:4"; 71*4882a593Smuzhiyun default-state = "off"; 72*4882a593Smuzhiyun }; 73*4882a593Smuzhiyun led@8.5 { 74*4882a593Smuzhiyun compatible = "register-bit-led"; 75*4882a593Smuzhiyun offset = <0x08>; 76*4882a593Smuzhiyun mask = <0x20>; 77*4882a593Smuzhiyun label = "versatile:5"; 78*4882a593Smuzhiyun default-state = "off"; 79*4882a593Smuzhiyun }; 80*4882a593Smuzhiyun led@8.6 { 81*4882a593Smuzhiyun compatible = "register-bit-led"; 82*4882a593Smuzhiyun offset = <0x08>; 83*4882a593Smuzhiyun mask = <0x40>; 84*4882a593Smuzhiyun label = "versatile:6"; 85*4882a593Smuzhiyun default-state = "off"; 86*4882a593Smuzhiyun }; 87*4882a593Smuzhiyun led@8.7 { 88*4882a593Smuzhiyun compatible = "register-bit-led"; 89*4882a593Smuzhiyun offset = <0x08>; 90*4882a593Smuzhiyun mask = <0x80>; 91*4882a593Smuzhiyun label = "versatile:7"; 92*4882a593Smuzhiyun default-state = "off"; 93*4882a593Smuzhiyun }; 94*4882a593Smuzhiyun}; 95