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

Commit 724868d3 authored by Vivek Veenam's avatar Vivek Veenam Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Add camera sensor device nodes for APQ8053



Adding new dtsi file for camera sensor nodes in APQ8053
MTP. This node has all the vreg, gpio, other sensor subdev
information and mclk related to the camera sensor slave device.

Adding the new entires in pinctrl for the new gpios used.

Change-Id: Ib085b2dd8274c348ac687a2966173558119c4e40
Signed-off-by: default avatarVivek Veenam <vveenam@codeaurora.org>
parent fd851759
Loading
Loading
Loading
Loading
+99 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&soc{
	led_ir0: qcom,ir-led {
		cell-index = <0>;
		compatible = "qcom,ir-led";
		label = "led-ir-label";
		pwms = <&pm8953_pwm 0 0>;
	};

	ir_cut0: qcom,ir-cut {
		cell-index = <0>;
		compatible = "qcom,ir-cut";
		label = "ir-cut-label";
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_ir_cut_default>;
		pinctrl-1 = <&cam_sensor_ir_cut_sleep>;
		gpios = <&tlmm 38 0>, <&tlmm 39 0>;
		qcom,gpio-ir-p = <0>;
		qcom,gpio-ir-m =  <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <0 0>;
		qcom,gpio-req-tbl-label = "IR_CUT_FILTER_P",
				"IR_CUT_FILTER_M";
	};
};

&pm8953_pwm {
	status = "okay";
	qcom,dtest-line = <2>;   /* DTEST2 */
	qcom,dtest-output = <2>; /* OUTPUT PWM */
};

&pm8953_mpps {
	mpp@a300 {
		qcom,mode = <1>;        /* DIG_OUT */
		qcom,output-type = <0>; /* CMOS */
		qcom,vin-sel = <3>;     /* L5 @ 1.8V */
		qcom,src-sel = <5>;     /* DTEST2 */
		qcom,master-en = <1>;   /* Enable MPP */
		qcom,invert = <0>;      /* Enable MPP */
		status = "okay";
	};
};

&cci {
	qcom,camera@0 {
		cell-index = <0>;
		compatible = "qcom,camera";
		reg = <0x0>;
		qcom,csiphy-sd-index = <0>;
		qcom,csid-sd-index = <0>;
		qcom,mount-angle = <270>;
		cam_vio-supply = <&pm8953_l6>;
		cam_vdig-supply = <&pm8953_s3>;
		cam_vana-supply = <&pm8953_l22>;
		qcom,ir-led-src = <&led_ir0>;
		qcom,ir-cut-src = <&ir_cut0>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana";
		qcom,cam-vreg-min-voltage = <0 2800000>;
		qcom,cam-vreg-max-voltage = <0 2800000>;
		qcom,cam-vreg-op-mode = <0 105000 100000>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk0_default
				&cam_sensor_rear_default1
				&cam_sensor_rear_vana1>;
		pinctrl-1 = <&cam_sensor_mclk0_sleep &cam_sensor_rear_sleep1
				&cam_sensor_rear_vana_sleep1>;
		gpios = <&tlmm 26 0>,
			<&tlmm 40 0>,
			<&tlmm 46 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vana =  <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
			"CAM_RESET0",
			"CAM_VANA";
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_gcc clk_mclk0_clk_src>,
				<&clock_gcc clk_gcc_camss_mclk0_clk>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@

#include "apq8053.dtsi"
#include "msm8953-mtp.dtsi"
#include "apq8053-camera-sensor-mtp.dtsi"

/ {
	model = "Qualcomm Technologies, Inc. APQ8053 IOT MTP";
+87 −3
Original line number Diff line number Diff line
@@ -170,6 +170,62 @@
			};
		};

		cam_sensor_ir_cut_default: cam_sensor_ir_cut_default {
			/* RESET, STANDBY */
			mux {
				pins = "gpio38", "gpio39";
				function = "gpio";
			};

			config {
				pins = "gpio38","gpio39";
				bias-pull-up; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

		cam_sensor_ir_cut_sleep: cam_sensor_ir_cut_sleep {
			/* RESET, STANDBY */
			mux {
				pins = "gpio38","gpio39";
				function = "gpio";
			};

			config {
				pins = "gpio38","gpio39";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

		cam_sensor_rear_default1: cam_sensor_rear_default1 {
			/* RESET*/
			mux {
				pins = "gpio40";
				function = "gpio";
			};

			config {
				pins = "gpio40";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

		cam_sensor_rear_sleep1: cam_sensor_rear_sleep1 {
			/* RESET*/
			mux {
				pins = "gpio40";
				function = "gpio";
			};

			config {
				pins = "gpio40";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

		cam_sensor_rear_vana: cam_sensor_rear_vdig {
			/* VDIG */
			mux {
@@ -198,6 +254,34 @@
			};
		};

		cam_sensor_rear_vana1: cam_sensor_rear_vdig1 {
			/* VDIG */
			mux {
				pins = "gpio46";
				function = "gpio";
			};

			config {
				pins = "gpio46";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

		cam_sensor_rear_vana_sleep1: cam_sensor_rear_vdig_sleep1 {
			/* VDIG */
			mux {
				pins = "gpio46";
				function = "gpio";
			};

			config {
				pins = "gpio46";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

		cam_sensor_mclk1_default: cam_sensor_mclk1_default {
			/* MCLK1 */
			mux {