hc
2023-02-14 0cc9b7c44253c93447ddf73e206fbdbb3d9f16b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
* SGM3784 dual flash driver support
 
Required Properties:
- compatible: Must contain "sgmicro,gsm3784"
- reg: I2C slave address
- enable-gpios: Specifier of the GPIO connected to EN pin
- strobe-gpio: Specifier of the GPIO connected to STROBE pin
- torch-gpio: Specifier of the GPIO connected to GPIO pin,
this pin is for torch mode, if not, will using assist mode.
 
 
A discrete LED element connected to the device must be represented by a child
node - see Documentation/devicetree/bindings/leds/common.txt.
 
Required properties of the LED child node:
- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
 
Special properties:
- rockchip,camera-module-index : indicate which camera the flash belongs to.
- rockchip,camera-module-facing : indicate the camera facing.
 
Example:
 
&i2c1 {
   ...
   sgm3784: sgm3784@30 {
       #address-cells = <1>;
       #size-cells = <0>;
       compatible = "sgmicro,gsm3784";
       reg = <0x30>;
       rockchip,camera-module-index = <0>;
       rockchip,camera-module-facing = "back";
       enable-gpio = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
       strobe-gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
       status = "okay";
       sgm3784_led0: led@0 {
           reg = <0x0>;
           led-max-microamp = <299200>;
           flash-max-microamp = <1122000>;
           flash-max-timeout-us = <1600000>;
       };
 
       sgm3784_led1: led@1 {
           reg = <0x1>;
           led-max-microamp = <299200>;
           flash-max-microamp = <1122000>;
           flash-max-timeout-us = <1600000>;
       };
   };
   ...
   ov13850: ov13850@10 {
       ...
       flash-leds = <&sgm3784_led0 &sgm3784_led1>;
       ...
   };
   ...
}