162306a36Sopenharmony_ci* Texas Instruments - lm3532 White LED driver with ambient light sensing 262306a36Sopenharmony_cicapability. 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciThe LM3532 provides the 3 high-voltage, low-side current sinks. The device is 562306a36Sopenharmony_ciprogrammable over an I2C-compatible interface and has independent 662306a36Sopenharmony_cicurrent control for all three channels. The adaptive current regulation 762306a36Sopenharmony_cimethod allows for different LED currents in each current sink thus allowing 862306a36Sopenharmony_cifor a wide variety of backlight and keypad applications. 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciThe main features of the LM3532 include dual ambient light sensor inputs 1162306a36Sopenharmony_cieach with 32 internal voltage setting resistors, 8-bit logarithmic and linear 1262306a36Sopenharmony_cibrightness control, dual external PWM brightness control inputs, and up to 1362306a36Sopenharmony_ci1000:1 dimming ratio with programmable fade in and fade out settings. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciRequired properties: 1662306a36Sopenharmony_ci - compatible : "ti,lm3532" 1762306a36Sopenharmony_ci - reg : I2C slave address 1862306a36Sopenharmony_ci - #address-cells : 1 1962306a36Sopenharmony_ci - #size-cells : 0 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ciOptional properties: 2262306a36Sopenharmony_ci - enable-gpios : gpio pin to enable (active high)/disable the device. 2362306a36Sopenharmony_ci - ramp-up-us - The Run time ramp rates/step are from one current 2462306a36Sopenharmony_ci set-point to another after the device has reached its 2562306a36Sopenharmony_ci initial target set point from turn-on 2662306a36Sopenharmony_ci - ramp-down-us - The Run time ramp rates/step are from one current 2762306a36Sopenharmony_ci set-point to another after the device has reached its 2862306a36Sopenharmony_ci initial target set point from turn-on 2962306a36Sopenharmony_ci Range for ramp settings: 8us - 65536us 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciOptional properties if ALS mode is used: 3262306a36Sopenharmony_ci - ti,als-vmin - Minimum ALS voltage defined in Volts 3362306a36Sopenharmony_ci - ti,als-vmax - Maximum ALS voltage defined in Volts 3462306a36Sopenharmony_ci Per the data sheet the max ALS voltage is 2V and the min is 0V 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci - ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms 3762306a36Sopenharmony_ci - ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms 3862306a36Sopenharmony_ci Range for impedance select: 37000 Ohms - 1190 Ohms 3962306a36Sopenharmony_ci Values above 37kohms will be set to the "High Impedance" setting 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci - ti,als-avrg-time-us - Determines the length of time the device needs to 4262306a36Sopenharmony_ci average the two ALS inputs. This is only used if 4362306a36Sopenharmony_ci the input mode is LM3532_ALS_INPUT_AVRG. 4462306a36Sopenharmony_ci Range: 17920us - 2293760us 4562306a36Sopenharmony_ci - ti,als-input-mode - Determines how the device uses the attached ALS 4662306a36Sopenharmony_ci devices. 4762306a36Sopenharmony_ci 0x00 - ALS1 and ALS2 input average 4862306a36Sopenharmony_ci 0x01 - ALS1 Input 4962306a36Sopenharmony_ci 0x02 - ALS2 Input 5062306a36Sopenharmony_ci 0x03 - Max of ALS1 and ALS2 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciRequired child properties: 5362306a36Sopenharmony_ci - reg : Indicates control bank the LED string is controlled by 5462306a36Sopenharmony_ci - led-sources : see Documentation/devicetree/bindings/leds/common.txt 5562306a36Sopenharmony_ci - ti,led-mode : Defines if the LED strings are manually controlled or 5662306a36Sopenharmony_ci if the LED strings are controlled by the ALS. 5762306a36Sopenharmony_ci 0x00 - LED strings are I2C controlled via full scale 5862306a36Sopenharmony_ci brightness control register 5962306a36Sopenharmony_ci 0x01 - LED strings are ALS controlled 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ciOptional LED child properties: 6262306a36Sopenharmony_ci - label : see Documentation/devicetree/bindings/leds/common.txt 6362306a36Sopenharmony_ci - linux,default-trigger : 6462306a36Sopenharmony_ci see Documentation/devicetree/bindings/leds/common.txt 6562306a36Sopenharmony_ci - led-max-microamp : Defines the full scale current value for each control 6662306a36Sopenharmony_ci bank. The range is from 5000uA-29800uA in increments 6762306a36Sopenharmony_ci of 800uA. 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ciExample: 7062306a36Sopenharmony_ciled-controller@38 { 7162306a36Sopenharmony_ci compatible = "ti,lm3532"; 7262306a36Sopenharmony_ci #address-cells = <1>; 7362306a36Sopenharmony_ci #size-cells = <0>; 7462306a36Sopenharmony_ci reg = <0x38>; 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; 7762306a36Sopenharmony_ci ramp-up-us = <1024>; 7862306a36Sopenharmony_ci ramp-down-us = <65536>; 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci ti,als-vmin = <0>; 8162306a36Sopenharmony_ci ti,als-vmax = <2000>; 8262306a36Sopenharmony_ci ti,als1-imp-sel = <4110>; 8362306a36Sopenharmony_ci ti,als2-imp-sel = <2180>; 8462306a36Sopenharmony_ci ti,als-avrg-time-us = <17920>; 8562306a36Sopenharmony_ci ti,als-input-mode = <0x00>; 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci led@0 { 8862306a36Sopenharmony_ci reg = <0>; 8962306a36Sopenharmony_ci led-sources = <2>; 9062306a36Sopenharmony_ci ti,led-mode = <1>; 9162306a36Sopenharmony_ci led-max-microamp = <21800>; 9262306a36Sopenharmony_ci label = ":backlight"; 9362306a36Sopenharmony_ci linux,default-trigger = "backlight"; 9462306a36Sopenharmony_ci }; 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci led@1 { 9762306a36Sopenharmony_ci reg = <1>; 9862306a36Sopenharmony_ci led-sources = <1>; 9962306a36Sopenharmony_ci ti,led-mode = <0>; 10062306a36Sopenharmony_ci label = ":kbd_backlight"; 10162306a36Sopenharmony_ci }; 10262306a36Sopenharmony_ci}; 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ciFor more product information please see the links below: 10562306a36Sopenharmony_cihttps://www.ti.com/product/LM3532 106