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