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