xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/media/i2c/aw36518.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1* AW36518 flash driver support
2
3Required Properties:
4- compatible: Must contain "awinic,aw36518"
5- reg: I2C slave address
6- enable-gpios: Specifier of the GPIO connected to strobe/torch EN pin
7this pin is for hardware flash/torch mode, if not, will using i2c control.
8- tx-gpio: Specifier of the GPIO connected to TX pin
9this pin is synchronization input for RF power Amplifier Pulse Eventr;
10if not, will using assist mode.
11
12A discrete LED element connected to the device must be represented by a child
13node - see Documentation/devicetree/bindings/leds/common.txt.
14
15Required properties of the LED child node:
16- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
17- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
18- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
19
20Special properties:
21- rockchip,camera-module-index : indicate which camera the flash belongs to.
22- rockchip,camera-module-facing : indicate the camera facing.
23
24Example:
25
26&i2c1 {
27	...
28	aw36518: aw36518@63 {
29		#address-cells = <1>;
30		#size-cells = <0>;
31		compatible = "awinic,aw36518";
32		status = "okay";
33		reg = <0x63>;
34		rockchip,camera-module-index = <0>;
35		rockchip,camera-module-facing = "back";
36		enable-gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
37		tx-gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
38		aw36518_led0: led@0 {
39			reg = <0x0>;
40			led-max-microamp = <386000>;
41			flash-max-microamp = <1500000>;
42			flash-max-timeout-us = <1600000>;
43		};
44	};
45	...
46	ov13850: ov13850@10 {
47		...
48		flash-leds = <&aw36518_led0>;
49		...
50	};
51	...
52}
53