Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit beb07652 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

ARM: dts: qcom: add flash/torch LEDs on PM8350C for Lahaina platforms

Add flash/torch LED devices on PM8350C that are needed to support
camera flash on Lahaina platforms. Note that this changes doesn't
add HW strobe configuration.

Change-Id: Id8b3f912551b9e895fbd1f96a7200e1fd89d7767
parent 8409de07
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -80,3 +80,19 @@
&pm8350b_haptics {
	status = "ok";
};

&pm8350c_switch0 {
	qcom,led-mask = <9>; /* Channels 1 & 4 */
};

&pm8350c_switch1 {
	qcom,led-mask = <6>; /* Channels 2 & 3 */
};

&pm8350c_switch2 {
	qcom,led-mask = <15>; /* All Channels */
};

&pm8350c_flash {
	status = "ok";
};
+16 −0
Original line number Diff line number Diff line
@@ -80,3 +80,19 @@
&pm8350b_haptics {
	status = "ok";
};

&pm8350c_switch0 {
	qcom,led-mask = <9>; /* Channels 1 & 4 */
};

&pm8350c_switch1 {
	qcom,led-mask = <6>; /* Channels 2 & 3 */
};

&pm8350c_switch2 {
	qcom,led-mask = <15>; /* All Channels */
};

&pm8350c_flash {
	status = "ok";
};
+15 −0
Original line number Diff line number Diff line
@@ -27,3 +27,18 @@
	};
};

&pm8350c_switch0 {
	qcom,led-mask = <9>; /* Channels 1 & 4 */
};

&pm8350c_switch1 {
	qcom,led-mask = <6>; /* Channels 2 & 3 */
};

&pm8350c_switch2 {
	qcom,led-mask = <15>; /* All Channels */
};

&pm8350c_flash {
	status = "ok";
};
+108 −0
Original line number Diff line number Diff line
@@ -70,6 +70,114 @@
				linux,default-trigger = "timer";
			};
		};

		pm8350c_flash: qcom,flash_led@ee00 {
			compatible = "qcom,pm8350c-flash-led";
			reg = <0xee00>;
			interrupts = <0x2 0xee 0x0 IRQ_TYPE_EDGE_RISING>,
				     <0x2 0xee 0x3 IRQ_TYPE_EDGE_RISING>,
				     <0x2 0xee 0x4 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "led-fault-irq",
					  "all-ramp-down-done-irq",
					  "all-ramp-up-done-irq";
			qcom,thermal-derate-current = <200 500>;
			qcom,hw-strobe-gpios = <&pm8350c_gpios 1 0>;
			status = "disabled";

			pm8350c_flash0: qcom,flash_0 {
				label = "flash";
				qcom,led-name = "led:flash_0";
				qcom,max-current-ma = <1500>;
				qcom,default-led-trigger = "flash0_trigger";
				qcom,id = <0>;
				qcom,duration-ms = <1280>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_flash1: qcom,flash_1 {
				label = "flash";
				qcom,led-name = "led:flash_1";
				qcom,max-current-ma = <1500>;
				qcom,default-led-trigger = "flash1_trigger";
				qcom,id = <1>;
				qcom,duration-ms = <1280>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_flash2: qcom,flash_2 {
				label = "flash";
				qcom,led-name = "led:flash_2";
				qcom,max-current-ma = <1500>;
				qcom,default-led-trigger = "flash2_trigger";
				qcom,id = <2>;
				qcom,duration-ms = <1280>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_flash3: qcom,flash_3 {
				label = "flash";
				qcom,led-name = "led:flash_3";
				qcom,max-current-ma = <1500>;
				qcom,default-led-trigger = "flash3_trigger";
				qcom,id = <3>;
				qcom,duration-ms = <1280>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_torch0: qcom,torch_0 {
				label = "torch";
				qcom,led-name = "led:torch_0";
				qcom,max-current-ma = <500>;
				qcom,default-led-trigger = "torch0_trigger";
				qcom,id = <0>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_torch1: qcom,torch_1 {
				label = "torch";
				qcom,led-name = "led:torch_1";
				qcom,max-current-ma = <500>;
				qcom,default-led-trigger = "torch1_trigger";
				qcom,id = <1>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_torch2: qcom,torch_2 {
				label = "torch";
				qcom,led-name = "led:torch_2";
				qcom,max-current-ma = <500>;
				qcom,default-led-trigger = "torch2_trigger";
				qcom,id = <2>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_torch3: qcom,torch_3 {
				label = "torch";
				qcom,led-name = "led:torch_3";
				qcom,max-current-ma = <500>;
				qcom,default-led-trigger = "torch3_trigger";
				qcom,id = <3>;
				qcom,ires-ua = <12500>;
			};

			pm8350c_switch0: qcom,led_switch_0 {
				label = "switch";
				qcom,led-name = "led:switch_0";
				qcom,default-led-trigger = "switch0_trigger";
			};

			pm8350c_switch1: qcom,led_switch_1 {
				label = "switch";
				qcom,led-name = "led:switch_1";
				qcom,default-led-trigger = "switch1_trigger";
			};

			pm8350c_switch2: qcom,led_switch_2 {
				label = "switch";
				qcom,led-name = "led:switch_2";
				qcom,default-led-trigger = "switch2_trigger";
			};
		};
	};
};