xref: /linux/Documentation/devicetree/bindings/leds/leds-lm3532.txt (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
16ccc7435SDan Murphy* Texas Instruments - lm3532 White LED driver with ambient light sensing
26ccc7435SDan Murphycapability.
36ccc7435SDan Murphy
46ccc7435SDan MurphyThe LM3532 provides the 3 high-voltage, low-side current sinks. The device is
56ccc7435SDan Murphyprogrammable over an I2C-compatible interface and has independent
66ccc7435SDan Murphycurrent control for all three channels. The adaptive current regulation
76ccc7435SDan Murphymethod allows for different LED currents in each current sink thus allowing
86ccc7435SDan Murphyfor a wide variety of backlight and keypad applications.
96ccc7435SDan Murphy
106ccc7435SDan MurphyThe main features of the LM3532 include dual ambient light sensor inputs
116ccc7435SDan Murphyeach with 32 internal voltage setting resistors, 8-bit logarithmic and linear
126ccc7435SDan Murphybrightness control, dual external PWM brightness control inputs, and up to
136ccc7435SDan Murphy1000:1 dimming ratio with programmable fade in and fade out settings.
146ccc7435SDan Murphy
156ccc7435SDan MurphyRequired properties:
166ccc7435SDan Murphy	- compatible : "ti,lm3532"
176ccc7435SDan Murphy	- reg : I2C slave address
186ccc7435SDan Murphy	- #address-cells : 1
196ccc7435SDan Murphy	- #size-cells : 0
206ccc7435SDan Murphy
216ccc7435SDan MurphyOptional properties:
226ccc7435SDan Murphy	- enable-gpios : gpio pin to enable (active high)/disable the device.
236ccc7435SDan Murphy	- ramp-up-us - The Run time ramp rates/step are from one current
246ccc7435SDan Murphy		       set-point to another after the device has reached its
256ccc7435SDan Murphy		       initial target set point from turn-on
266ccc7435SDan Murphy	- ramp-down-us - The Run time ramp rates/step are from one current
276ccc7435SDan Murphy			 set-point to another after the device has reached its
286ccc7435SDan Murphy			 initial target set point from turn-on
296ccc7435SDan Murphy	Range for ramp settings: 8us - 65536us
306ccc7435SDan Murphy
316ccc7435SDan MurphyOptional properties if ALS mode is used:
326ccc7435SDan Murphy	- ti,als-vmin - Minimum ALS voltage defined in Volts
336ccc7435SDan Murphy	- ti,als-vmax - Maximum ALS voltage defined in Volts
346ccc7435SDan Murphy	Per the data sheet the max ALS voltage is 2V and the min is 0V
356ccc7435SDan Murphy
366ccc7435SDan Murphy	- ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms
376ccc7435SDan Murphy	- ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms
386ccc7435SDan Murphy	Range for impedance select: 37000 Ohms - 1190 Ohms
396ccc7435SDan Murphy	Values above 37kohms will be set to the "High Impedance" setting
406ccc7435SDan Murphy
416ccc7435SDan Murphy	- ti,als-avrg-time-us - Determines the length of time the device needs to
426ccc7435SDan Murphy			  average the two ALS inputs.  This is only used if
436ccc7435SDan Murphy			  the input mode is LM3532_ALS_INPUT_AVRG.
446ccc7435SDan Murphy			     Range: 17920us - 2293760us
456ccc7435SDan Murphy	- ti,als-input-mode - Determines how the device uses the attached ALS
466ccc7435SDan Murphy			   devices.
476ccc7435SDan Murphy			   0x00 - ALS1 and ALS2 input average
486ccc7435SDan Murphy			   0x01 - ALS1 Input
496ccc7435SDan Murphy			   0x02 - ALS2 Input
506ccc7435SDan Murphy			   0x03 - Max of ALS1 and ALS2
516ccc7435SDan Murphy
526ccc7435SDan MurphyRequired child properties:
536ccc7435SDan Murphy	- reg : Indicates control bank the LED string is controlled by
546ccc7435SDan Murphy	- led-sources : see Documentation/devicetree/bindings/leds/common.txt
556ccc7435SDan Murphy	- ti,led-mode : Defines if the LED strings are manually controlled or
566ccc7435SDan Murphy			if the LED strings are controlled by the ALS.
576ccc7435SDan Murphy			0x00 - LED strings are I2C controlled via full scale
586ccc7435SDan Murphy			       brightness control register
596ccc7435SDan Murphy			0x01 - LED strings are ALS controlled
606ccc7435SDan Murphy
616ccc7435SDan MurphyOptional LED child properties:
626ccc7435SDan Murphy	- label : see Documentation/devicetree/bindings/leds/common.txt
636ccc7435SDan Murphy	- linux,default-trigger :
646ccc7435SDan Murphy	   see Documentation/devicetree/bindings/leds/common.txt
65aa01d255SDan Murphy	- led-max-microamp : Defines the full scale current value for each control
66aa01d255SDan Murphy			  bank.  The range is from 5000uA-29800uA in increments
67aa01d255SDan Murphy			  of 800uA.
686ccc7435SDan Murphy
696ccc7435SDan MurphyExample:
706ccc7435SDan Murphyled-controller@38 {
716ccc7435SDan Murphy	compatible = "ti,lm3532";
726ccc7435SDan Murphy	#address-cells = <1>;
736ccc7435SDan Murphy	#size-cells = <0>;
746ccc7435SDan Murphy	reg = <0x38>;
756ccc7435SDan Murphy
766ccc7435SDan Murphy	enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
776ccc7435SDan Murphy	ramp-up-us = <1024>;
786ccc7435SDan Murphy	ramp-down-us = <65536>;
796ccc7435SDan Murphy
806ccc7435SDan Murphy	ti,als-vmin = <0>;
816ccc7435SDan Murphy	ti,als-vmax = <2000>;
826ccc7435SDan Murphy	ti,als1-imp-sel = <4110>;
836ccc7435SDan Murphy	ti,als2-imp-sel = <2180>;
846ccc7435SDan Murphy	ti,als-avrg-time-us = <17920>;
856ccc7435SDan Murphy	ti,als-input-mode = <0x00>;
866ccc7435SDan Murphy
876ccc7435SDan Murphy	led@0 {
886ccc7435SDan Murphy		reg = <0>;
896ccc7435SDan Murphy		led-sources = <2>;
906ccc7435SDan Murphy		ti,led-mode = <1>;
91aa01d255SDan Murphy		led-max-microamp = <21800>;
926ccc7435SDan Murphy		label = ":backlight";
936ccc7435SDan Murphy		linux,default-trigger = "backlight";
946ccc7435SDan Murphy	};
956ccc7435SDan Murphy
966ccc7435SDan Murphy	led@1 {
976ccc7435SDan Murphy		reg = <1>;
986ccc7435SDan Murphy		led-sources = <1>;
996ccc7435SDan Murphy		ti,led-mode = <0>;
1006ccc7435SDan Murphy		label = ":kbd_backlight";
1016ccc7435SDan Murphy	};
1026ccc7435SDan Murphy};
1036ccc7435SDan Murphy
1046ccc7435SDan MurphyFor more product information please see the links below:
105*c5437338SAlexander A. Klimovhttps://www.ti.com/product/LM3532
106