1*4882a593SmuzhiyunAnalog devices AS3645A device tree bindings 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe AS3645A flash LED controller can drive two LEDs, one high current 4*4882a593Smuzhiyunflash LED and one indicator LED. The high current flash LED can be 5*4882a593Smuzhiyunused in torch mode as well. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunRanges below noted as [a, b] are closed ranges between a and b, i.e. a 8*4882a593Smuzhiyunand b are included in the range. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunPlease also see common.txt in the same directory. 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunRequired properties 14*4882a593Smuzhiyun=================== 15*4882a593Smuzhiyun 16*4882a593Smuzhiyuncompatible : Must be "ams,as3645a". 17*4882a593Smuzhiyunreg : The I2C address of the device. Typically 0x30. 18*4882a593Smuzhiyun#address-cells : 1 19*4882a593Smuzhiyun#size-cells : 0 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunRequired properties of the flash child node (0) 23*4882a593Smuzhiyun=============================================== 24*4882a593Smuzhiyun 25*4882a593Smuzhiyunreg: 0 26*4882a593Smuzhiyunflash-timeout-us: Flash timeout in microseconds. The value must be in 27*4882a593Smuzhiyun the range [100000, 850000] and divisible by 50000. 28*4882a593Smuzhiyunflash-max-microamp: Maximum flash current in microamperes. Has to be 29*4882a593Smuzhiyun in the range between [200000, 500000] and 30*4882a593Smuzhiyun divisible by 20000. 31*4882a593Smuzhiyunled-max-microamp: Maximum torch (assist) current in microamperes. The 32*4882a593Smuzhiyun value must be in the range between [20000, 160000] and 33*4882a593Smuzhiyun divisible by 20000. 34*4882a593Smuzhiyunams,input-max-microamp: Maximum flash controller input current. The 35*4882a593Smuzhiyun value must be in the range [1250000, 2000000] 36*4882a593Smuzhiyun and divisible by 50000. 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunOptional properties of the flash child node 40*4882a593Smuzhiyun=========================================== 41*4882a593Smuzhiyun 42*4882a593Smuzhiyunfunction : See Documentation/devicetree/bindings/leds/common.txt. 43*4882a593Smuzhiyuncolor : See Documentation/devicetree/bindings/leds/common.txt. 44*4882a593Smuzhiyunlabel : See Documentation/devicetree/bindings/leds/common.txt (deprecated). 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun 47*4882a593SmuzhiyunRequired properties of the indicator child node (1) 48*4882a593Smuzhiyun=================================================== 49*4882a593Smuzhiyun 50*4882a593Smuzhiyunreg: 1 51*4882a593Smuzhiyunled-max-microamp: Maximum indicator current. The allowed values are 52*4882a593Smuzhiyun 2500, 5000, 7500 and 10000. 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunOptional properties of the indicator child node 55*4882a593Smuzhiyun=============================================== 56*4882a593Smuzhiyun 57*4882a593Smuzhiyunfunction : See Documentation/devicetree/bindings/leds/common.txt. 58*4882a593Smuzhiyuncolor : See Documentation/devicetree/bindings/leds/common.txt. 59*4882a593Smuzhiyunlabel : See Documentation/devicetree/bindings/leds/common.txt (deprecated). 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunExample 63*4882a593Smuzhiyun======= 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun#include <dt-bindings/leds/common.h> 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun as3645a@30 { 68*4882a593Smuzhiyun #address-cells = <1>; 69*4882a593Smuzhiyun #size-cells = <0>; 70*4882a593Smuzhiyun reg = <0x30>; 71*4882a593Smuzhiyun compatible = "ams,as3645a"; 72*4882a593Smuzhiyun led@0 { 73*4882a593Smuzhiyun reg = <0x0>; 74*4882a593Smuzhiyun flash-timeout-us = <150000>; 75*4882a593Smuzhiyun flash-max-microamp = <320000>; 76*4882a593Smuzhiyun led-max-microamp = <60000>; 77*4882a593Smuzhiyun ams,input-max-microamp = <1750000>; 78*4882a593Smuzhiyun function = LED_FUNCTION_FLASH; 79*4882a593Smuzhiyun }; 80*4882a593Smuzhiyun led@1 { 81*4882a593Smuzhiyun reg = <0x1>; 82*4882a593Smuzhiyun led-max-microamp = <10000>; 83*4882a593Smuzhiyun function = LED_FUNCTION_INDICATOR; 84*4882a593Smuzhiyun }; 85*4882a593Smuzhiyun }; 86