18c2ecf20Sopenharmony_ciAnalog devices AS3645A device tree bindings 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe AS3645A flash LED controller can drive two LEDs, one high current 48c2ecf20Sopenharmony_ciflash LED and one indicator LED. The high current flash LED can be 58c2ecf20Sopenharmony_ciused in torch mode as well. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciRanges below noted as [a, b] are closed ranges between a and b, i.e. a 88c2ecf20Sopenharmony_ciand b are included in the range. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciPlease also see common.txt in the same directory. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciRequired properties 148c2ecf20Sopenharmony_ci=================== 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_cicompatible : Must be "ams,as3645a". 178c2ecf20Sopenharmony_cireg : The I2C address of the device. Typically 0x30. 188c2ecf20Sopenharmony_ci#address-cells : 1 198c2ecf20Sopenharmony_ci#size-cells : 0 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciRequired properties of the flash child node (0) 238c2ecf20Sopenharmony_ci=============================================== 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cireg: 0 268c2ecf20Sopenharmony_ciflash-timeout-us: Flash timeout in microseconds. The value must be in 278c2ecf20Sopenharmony_ci the range [100000, 850000] and divisible by 50000. 288c2ecf20Sopenharmony_ciflash-max-microamp: Maximum flash current in microamperes. Has to be 298c2ecf20Sopenharmony_ci in the range between [200000, 500000] and 308c2ecf20Sopenharmony_ci divisible by 20000. 318c2ecf20Sopenharmony_ciled-max-microamp: Maximum torch (assist) current in microamperes. The 328c2ecf20Sopenharmony_ci value must be in the range between [20000, 160000] and 338c2ecf20Sopenharmony_ci divisible by 20000. 348c2ecf20Sopenharmony_ciams,input-max-microamp: Maximum flash controller input current. The 358c2ecf20Sopenharmony_ci value must be in the range [1250000, 2000000] 368c2ecf20Sopenharmony_ci and divisible by 50000. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ciOptional properties of the flash child node 408c2ecf20Sopenharmony_ci=========================================== 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_cifunction : See Documentation/devicetree/bindings/leds/common.txt. 438c2ecf20Sopenharmony_cicolor : See Documentation/devicetree/bindings/leds/common.txt. 448c2ecf20Sopenharmony_cilabel : See Documentation/devicetree/bindings/leds/common.txt (deprecated). 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciRequired properties of the indicator child node (1) 488c2ecf20Sopenharmony_ci=================================================== 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_cireg: 1 518c2ecf20Sopenharmony_ciled-max-microamp: Maximum indicator current. The allowed values are 528c2ecf20Sopenharmony_ci 2500, 5000, 7500 and 10000. 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ciOptional properties of the indicator child node 558c2ecf20Sopenharmony_ci=============================================== 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cifunction : See Documentation/devicetree/bindings/leds/common.txt. 588c2ecf20Sopenharmony_cicolor : See Documentation/devicetree/bindings/leds/common.txt. 598c2ecf20Sopenharmony_cilabel : See Documentation/devicetree/bindings/leds/common.txt (deprecated). 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ciExample 638c2ecf20Sopenharmony_ci======= 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#include <dt-bindings/leds/common.h> 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci as3645a@30 { 688c2ecf20Sopenharmony_ci #address-cells = <1>; 698c2ecf20Sopenharmony_ci #size-cells = <0>; 708c2ecf20Sopenharmony_ci reg = <0x30>; 718c2ecf20Sopenharmony_ci compatible = "ams,as3645a"; 728c2ecf20Sopenharmony_ci led@0 { 738c2ecf20Sopenharmony_ci reg = <0x0>; 748c2ecf20Sopenharmony_ci flash-timeout-us = <150000>; 758c2ecf20Sopenharmony_ci flash-max-microamp = <320000>; 768c2ecf20Sopenharmony_ci led-max-microamp = <60000>; 778c2ecf20Sopenharmony_ci ams,input-max-microamp = <1750000>; 788c2ecf20Sopenharmony_ci function = LED_FUNCTION_FLASH; 798c2ecf20Sopenharmony_ci }; 808c2ecf20Sopenharmony_ci led@1 { 818c2ecf20Sopenharmony_ci reg = <0x1>; 828c2ecf20Sopenharmony_ci led-max-microamp = <10000>; 838c2ecf20Sopenharmony_ci function = LED_FUNCTION_INDICATOR; 848c2ecf20Sopenharmony_ci }; 858c2ecf20Sopenharmony_ci }; 86