18c2ecf20Sopenharmony_ci* Texas Instruments - lm3532 White LED driver with ambient light sensing 28c2ecf20Sopenharmony_cicapability. 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThe LM3532 provides the 3 high-voltage, low-side current sinks. The device is 58c2ecf20Sopenharmony_ciprogrammable over an I2C-compatible interface and has independent 68c2ecf20Sopenharmony_cicurrent control for all three channels. The adaptive current regulation 78c2ecf20Sopenharmony_cimethod allows for different LED currents in each current sink thus allowing 88c2ecf20Sopenharmony_cifor a wide variety of backlight and keypad applications. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciThe main features of the LM3532 include dual ambient light sensor inputs 118c2ecf20Sopenharmony_cieach with 32 internal voltage setting resistors, 8-bit logarithmic and linear 128c2ecf20Sopenharmony_cibrightness control, dual external PWM brightness control inputs, and up to 138c2ecf20Sopenharmony_ci1000:1 dimming ratio with programmable fade in and fade out settings. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciRequired properties: 168c2ecf20Sopenharmony_ci - compatible : "ti,lm3532" 178c2ecf20Sopenharmony_ci - reg : I2C slave address 188c2ecf20Sopenharmony_ci - #address-cells : 1 198c2ecf20Sopenharmony_ci - #size-cells : 0 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciOptional properties: 228c2ecf20Sopenharmony_ci - enable-gpios : gpio pin to enable (active high)/disable the device. 238c2ecf20Sopenharmony_ci - ramp-up-us - The Run time ramp rates/step are from one current 248c2ecf20Sopenharmony_ci set-point to another after the device has reached its 258c2ecf20Sopenharmony_ci initial target set point from turn-on 268c2ecf20Sopenharmony_ci - ramp-down-us - The Run time ramp rates/step are from one current 278c2ecf20Sopenharmony_ci set-point to another after the device has reached its 288c2ecf20Sopenharmony_ci initial target set point from turn-on 298c2ecf20Sopenharmony_ci Range for ramp settings: 8us - 65536us 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciOptional properties if ALS mode is used: 328c2ecf20Sopenharmony_ci - ti,als-vmin - Minimum ALS voltage defined in Volts 338c2ecf20Sopenharmony_ci - ti,als-vmax - Maximum ALS voltage defined in Volts 348c2ecf20Sopenharmony_ci Per the data sheet the max ALS voltage is 2V and the min is 0V 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci - ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms 378c2ecf20Sopenharmony_ci - ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms 388c2ecf20Sopenharmony_ci Range for impedance select: 37000 Ohms - 1190 Ohms 398c2ecf20Sopenharmony_ci Values above 37kohms will be set to the "High Impedance" setting 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci - ti,als-avrg-time-us - Determines the length of time the device needs to 428c2ecf20Sopenharmony_ci average the two ALS inputs. This is only used if 438c2ecf20Sopenharmony_ci the input mode is LM3532_ALS_INPUT_AVRG. 448c2ecf20Sopenharmony_ci Range: 17920us - 2293760us 458c2ecf20Sopenharmony_ci - ti,als-input-mode - Determines how the device uses the attached ALS 468c2ecf20Sopenharmony_ci devices. 478c2ecf20Sopenharmony_ci 0x00 - ALS1 and ALS2 input average 488c2ecf20Sopenharmony_ci 0x01 - ALS1 Input 498c2ecf20Sopenharmony_ci 0x02 - ALS2 Input 508c2ecf20Sopenharmony_ci 0x03 - Max of ALS1 and ALS2 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciRequired child properties: 538c2ecf20Sopenharmony_ci - reg : Indicates control bank the LED string is controlled by 548c2ecf20Sopenharmony_ci - led-sources : see Documentation/devicetree/bindings/leds/common.txt 558c2ecf20Sopenharmony_ci - ti,led-mode : Defines if the LED strings are manually controlled or 568c2ecf20Sopenharmony_ci if the LED strings are controlled by the ALS. 578c2ecf20Sopenharmony_ci 0x00 - LED strings are I2C controlled via full scale 588c2ecf20Sopenharmony_ci brightness control register 598c2ecf20Sopenharmony_ci 0x01 - LED strings are ALS controlled 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ciOptional LED child properties: 628c2ecf20Sopenharmony_ci - label : see Documentation/devicetree/bindings/leds/common.txt 638c2ecf20Sopenharmony_ci - linux,default-trigger : 648c2ecf20Sopenharmony_ci see Documentation/devicetree/bindings/leds/common.txt 658c2ecf20Sopenharmony_ci - led-max-microamp : Defines the full scale current value for each control 668c2ecf20Sopenharmony_ci bank. The range is from 5000uA-29800uA in increments 678c2ecf20Sopenharmony_ci of 800uA. 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ciExample: 708c2ecf20Sopenharmony_ciled-controller@38 { 718c2ecf20Sopenharmony_ci compatible = "ti,lm3532"; 728c2ecf20Sopenharmony_ci #address-cells = <1>; 738c2ecf20Sopenharmony_ci #size-cells = <0>; 748c2ecf20Sopenharmony_ci reg = <0x38>; 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; 778c2ecf20Sopenharmony_ci ramp-up-us = <1024>; 788c2ecf20Sopenharmony_ci ramp-down-us = <65536>; 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci ti,als-vmin = <0>; 818c2ecf20Sopenharmony_ci ti,als-vmax = <2000>; 828c2ecf20Sopenharmony_ci ti,als1-imp-sel = <4110>; 838c2ecf20Sopenharmony_ci ti,als2-imp-sel = <2180>; 848c2ecf20Sopenharmony_ci ti,als-avrg-time-us = <17920>; 858c2ecf20Sopenharmony_ci ti,als-input-mode = <0x00>; 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci led@0 { 888c2ecf20Sopenharmony_ci reg = <0>; 898c2ecf20Sopenharmony_ci led-sources = <2>; 908c2ecf20Sopenharmony_ci ti,led-mode = <1>; 918c2ecf20Sopenharmony_ci led-max-microamp = <21800>; 928c2ecf20Sopenharmony_ci label = ":backlight"; 938c2ecf20Sopenharmony_ci linux,default-trigger = "backlight"; 948c2ecf20Sopenharmony_ci }; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci led@1 { 978c2ecf20Sopenharmony_ci reg = <1>; 988c2ecf20Sopenharmony_ci led-sources = <1>; 998c2ecf20Sopenharmony_ci ti,led-mode = <0>; 1008c2ecf20Sopenharmony_ci label = ":kbd_backlight"; 1018c2ecf20Sopenharmony_ci }; 1028c2ecf20Sopenharmony_ci}; 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciFor more product information please see the links below: 1058c2ecf20Sopenharmony_cihttps://www.ti.com/product/LM3532 106