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