1*4882a593Smuzhiyun* Texas Instruments - lm3532 White LED driver with ambient light sensing 2*4882a593Smuzhiyuncapability. 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunThe LM3532 provides the 3 high-voltage, low-side current sinks. The device is 5*4882a593Smuzhiyunprogrammable over an I2C-compatible interface and has independent 6*4882a593Smuzhiyuncurrent control for all three channels. The adaptive current regulation 7*4882a593Smuzhiyunmethod allows for different LED currents in each current sink thus allowing 8*4882a593Smuzhiyunfor a wide variety of backlight and keypad applications. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunThe main features of the LM3532 include dual ambient light sensor inputs 11*4882a593Smuzhiyuneach with 32 internal voltage setting resistors, 8-bit logarithmic and linear 12*4882a593Smuzhiyunbrightness control, dual external PWM brightness control inputs, and up to 13*4882a593Smuzhiyun1000:1 dimming ratio with programmable fade in and fade out settings. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunRequired properties: 16*4882a593Smuzhiyun - compatible : "ti,lm3532" 17*4882a593Smuzhiyun - reg : I2C slave address 18*4882a593Smuzhiyun - #address-cells : 1 19*4882a593Smuzhiyun - #size-cells : 0 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunOptional properties: 22*4882a593Smuzhiyun - enable-gpios : gpio pin to enable (active high)/disable the device. 23*4882a593Smuzhiyun - ramp-up-us - The Run time ramp rates/step are from one current 24*4882a593Smuzhiyun set-point to another after the device has reached its 25*4882a593Smuzhiyun initial target set point from turn-on 26*4882a593Smuzhiyun - ramp-down-us - The Run time ramp rates/step are from one current 27*4882a593Smuzhiyun set-point to another after the device has reached its 28*4882a593Smuzhiyun initial target set point from turn-on 29*4882a593Smuzhiyun Range for ramp settings: 8us - 65536us 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunOptional properties if ALS mode is used: 32*4882a593Smuzhiyun - ti,als-vmin - Minimum ALS voltage defined in Volts 33*4882a593Smuzhiyun - ti,als-vmax - Maximum ALS voltage defined in Volts 34*4882a593Smuzhiyun Per the data sheet the max ALS voltage is 2V and the min is 0V 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun - ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms 37*4882a593Smuzhiyun - ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms 38*4882a593Smuzhiyun Range for impedance select: 37000 Ohms - 1190 Ohms 39*4882a593Smuzhiyun Values above 37kohms will be set to the "High Impedance" setting 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun - ti,als-avrg-time-us - Determines the length of time the device needs to 42*4882a593Smuzhiyun average the two ALS inputs. This is only used if 43*4882a593Smuzhiyun the input mode is LM3532_ALS_INPUT_AVRG. 44*4882a593Smuzhiyun Range: 17920us - 2293760us 45*4882a593Smuzhiyun - ti,als-input-mode - Determines how the device uses the attached ALS 46*4882a593Smuzhiyun devices. 47*4882a593Smuzhiyun 0x00 - ALS1 and ALS2 input average 48*4882a593Smuzhiyun 0x01 - ALS1 Input 49*4882a593Smuzhiyun 0x02 - ALS2 Input 50*4882a593Smuzhiyun 0x03 - Max of ALS1 and ALS2 51*4882a593Smuzhiyun 52*4882a593SmuzhiyunRequired child properties: 53*4882a593Smuzhiyun - reg : Indicates control bank the LED string is controlled by 54*4882a593Smuzhiyun - led-sources : see Documentation/devicetree/bindings/leds/common.txt 55*4882a593Smuzhiyun - ti,led-mode : Defines if the LED strings are manually controlled or 56*4882a593Smuzhiyun if the LED strings are controlled by the ALS. 57*4882a593Smuzhiyun 0x00 - LED strings are I2C controlled via full scale 58*4882a593Smuzhiyun brightness control register 59*4882a593Smuzhiyun 0x01 - LED strings are ALS controlled 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunOptional LED child properties: 62*4882a593Smuzhiyun - label : see Documentation/devicetree/bindings/leds/common.txt 63*4882a593Smuzhiyun - linux,default-trigger : 64*4882a593Smuzhiyun see Documentation/devicetree/bindings/leds/common.txt 65*4882a593Smuzhiyun - led-max-microamp : Defines the full scale current value for each control 66*4882a593Smuzhiyun bank. The range is from 5000uA-29800uA in increments 67*4882a593Smuzhiyun of 800uA. 68*4882a593Smuzhiyun 69*4882a593SmuzhiyunExample: 70*4882a593Smuzhiyunled-controller@38 { 71*4882a593Smuzhiyun compatible = "ti,lm3532"; 72*4882a593Smuzhiyun #address-cells = <1>; 73*4882a593Smuzhiyun #size-cells = <0>; 74*4882a593Smuzhiyun reg = <0x38>; 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; 77*4882a593Smuzhiyun ramp-up-us = <1024>; 78*4882a593Smuzhiyun ramp-down-us = <65536>; 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun ti,als-vmin = <0>; 81*4882a593Smuzhiyun ti,als-vmax = <2000>; 82*4882a593Smuzhiyun ti,als1-imp-sel = <4110>; 83*4882a593Smuzhiyun ti,als2-imp-sel = <2180>; 84*4882a593Smuzhiyun ti,als-avrg-time-us = <17920>; 85*4882a593Smuzhiyun ti,als-input-mode = <0x00>; 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun led@0 { 88*4882a593Smuzhiyun reg = <0>; 89*4882a593Smuzhiyun led-sources = <2>; 90*4882a593Smuzhiyun ti,led-mode = <1>; 91*4882a593Smuzhiyun led-max-microamp = <21800>; 92*4882a593Smuzhiyun label = ":backlight"; 93*4882a593Smuzhiyun linux,default-trigger = "backlight"; 94*4882a593Smuzhiyun }; 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun led@1 { 97*4882a593Smuzhiyun reg = <1>; 98*4882a593Smuzhiyun led-sources = <1>; 99*4882a593Smuzhiyun ti,led-mode = <0>; 100*4882a593Smuzhiyun label = ":kbd_backlight"; 101*4882a593Smuzhiyun }; 102*4882a593Smuzhiyun}; 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunFor more product information please see the links below: 105*4882a593Smuzhiyunhttps://www.ti.com/product/LM3532 106