1535a218dSSakari AilusAnalog devices AS3645A device tree bindings
2535a218dSSakari Ailus
3535a218dSSakari AilusThe AS3645A flash LED controller can drive two LEDs, one high current
4535a218dSSakari Ailusflash LED and one indicator LED. The high current flash LED can be
5535a218dSSakari Ailusused in torch mode as well.
6535a218dSSakari Ailus
7535a218dSSakari AilusRanges below noted as [a, b] are closed ranges between a and b, i.e. a
8535a218dSSakari Ailusand b are included in the range.
9535a218dSSakari Ailus
10535a218dSSakari AilusPlease also see common.txt in the same directory.
11535a218dSSakari Ailus
12535a218dSSakari Ailus
13535a218dSSakari AilusRequired properties
14535a218dSSakari Ailus===================
15535a218dSSakari Ailus
16535a218dSSakari Ailuscompatible	: Must be "ams,as3645a".
17535a218dSSakari Ailusreg		: The I2C address of the device. Typically 0x30.
1875f9f727SSakari Ailus#address-cells	: 1
1975f9f727SSakari Ailus#size-cells	: 0
20535a218dSSakari Ailus
21535a218dSSakari Ailus
2275f9f727SSakari AilusRequired properties of the flash child node (0)
2375f9f727SSakari Ailus===============================================
24535a218dSSakari Ailus
2575f9f727SSakari Ailusreg: 0
26535a218dSSakari Ailusflash-timeout-us: Flash timeout in microseconds. The value must be in
27535a218dSSakari Ailus		  the range [100000, 850000] and divisible by 50000.
28535a218dSSakari Ailusflash-max-microamp: Maximum flash current in microamperes. Has to be
29535a218dSSakari Ailus		    in the range between [200000, 500000] and
30535a218dSSakari Ailus		    divisible by 20000.
31535a218dSSakari Ailusled-max-microamp: Maximum torch (assist) current in microamperes. The
32535a218dSSakari Ailus		  value must be in the range between [20000, 160000] and
33535a218dSSakari Ailus		  divisible by 20000.
34535a218dSSakari Ailusams,input-max-microamp: Maximum flash controller input current. The
35535a218dSSakari Ailus			value must be in the range [1250000, 2000000]
36535a218dSSakari Ailus			and divisible by 50000.
37535a218dSSakari Ailus
38535a218dSSakari Ailus
3975f9f727SSakari AilusOptional properties of the flash child node
4075f9f727SSakari Ailus===========================================
41535a218dSSakari Ailus
425b95cb0cSJacek Anaszewskifunction	:  See Documentation/devicetree/bindings/leds/common.txt.
435b95cb0cSJacek Anaszewskicolor		:  See Documentation/devicetree/bindings/leds/common.txt.
445b95cb0cSJacek Anaszewskilabel		:  See Documentation/devicetree/bindings/leds/common.txt (deprecated).
45535a218dSSakari Ailus
46535a218dSSakari Ailus
4775f9f727SSakari AilusRequired properties of the indicator child node (1)
4875f9f727SSakari Ailus===================================================
49535a218dSSakari Ailus
5075f9f727SSakari Ailusreg: 1
51535a218dSSakari Ailusled-max-microamp: Maximum indicator current. The allowed values are
52535a218dSSakari Ailus		  2500, 5000, 7500 and 10000.
53535a218dSSakari Ailus
5475f9f727SSakari AilusOptional properties of the indicator child node
5575f9f727SSakari Ailus===============================================
56535a218dSSakari Ailus
575b95cb0cSJacek Anaszewskifunction	:  See Documentation/devicetree/bindings/leds/common.txt.
585b95cb0cSJacek Anaszewskicolor		:  See Documentation/devicetree/bindings/leds/common.txt.
595b95cb0cSJacek Anaszewskilabel		:  See Documentation/devicetree/bindings/leds/common.txt (deprecated).
60535a218dSSakari Ailus
61535a218dSSakari Ailus
62535a218dSSakari AilusExample
63535a218dSSakari Ailus=======
64535a218dSSakari Ailus
655b95cb0cSJacek Anaszewski#include <dt-bindings/leds/common.h>
665b95cb0cSJacek Anaszewski
67535a218dSSakari Ailus	as3645a@30 {
685b95cb0cSJacek Anaszewski		#address-cells = <1>;
695b95cb0cSJacek Anaszewski		#size-cells = <0>;
70535a218dSSakari Ailus		reg = <0x30>;
71535a218dSSakari Ailus		compatible = "ams,as3645a";
725b95cb0cSJacek Anaszewski		led@0 {
7375f9f727SSakari Ailus			reg = <0x0>;
74535a218dSSakari Ailus			flash-timeout-us = <150000>;
75535a218dSSakari Ailus			flash-max-microamp = <320000>;
76535a218dSSakari Ailus			led-max-microamp = <60000>;
77535a218dSSakari Ailus			ams,input-max-microamp = <1750000>;
785b95cb0cSJacek Anaszewski			function = LED_FUNCTION_FLASH;
79535a218dSSakari Ailus		};
805b95cb0cSJacek Anaszewski		led@1 {
8175f9f727SSakari Ailus			reg = <0x1>;
82535a218dSSakari Ailus			led-max-microamp = <10000>;
835b95cb0cSJacek Anaszewski			function = LED_FUNCTION_INDICATOR;
84535a218dSSakari Ailus		};
85535a218dSSakari Ailus	};
86