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

Commit 2859df60 authored by Samyukta Mogily's avatar Samyukta Mogily
Browse files

msm: camera: dtsi: Adding camera dtsi for trinket mtp,cdp and qrd



Adding camera dtsi with required csid, csiphy, cci, vfe, cpp nodes,
which enables camera on trinket.

Change-Id: Iedb2546c462abf2dcffc9424b53c867dcebd5243
Signed-off-by: default avatarSamyukta Mogily <smogily@codeaurora.org>
parent 460b918c
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
* Qualcomm Technologies, Inc. MSM CSI Phy

Required properties:
- cell-index: csi phy hardware core index
- compatible :
    - "qcom,csiphy"
    - "qcom,csiphy-v2.0"
    - "qcom,csiphy-v2.2"
    - "qcom,csiphy-v3.0"
    - "qcom,csiphy-v3.1"
    - "qcom,csiphy-v3.1.1"
    - "qcom,csiphy-v3.2"
    - "qcom,csiphy-v3.4.2"
    - "qcom,csiphy-v3.5"
    - "qcom,csiphy-v5.0"
    - "qcom,csiphy-v5.01"
    - "qcom,csiphy-v10.00"
- reg : offset and length of the register set for the device
    for the csiphy operating in compatible mode.
- reg-names : should specify relevant names to each reg property defined.
- interrupts : should contain the csiphy interrupt.
- interrupt-names : should specify relevant names to each interrupts
  property defined.
- clock-names: name of the clocks required for the device
- qcom,clock-rates: clock rate in Hz
	- 0 if appropriate clock is required but doesn't have to apply the rate

Example:

   qcom,csiphy@fda0ac00 {
       cell-index = <0>;
       compatible = "qcom,csiphy-v2.0", "qcom,csiphy";
       reg = <0xfda0ac00 0x200>;
       reg-names = "csiphy";
       interrupts = <0 78 0>;
       interrupt-names = "csiphy";
       clock-names = "camss_top_ahb_clk",
                "ispif_ahb_clk", "csiphy_timer_src_clk",
                "csiphy_timer_clk";
       qcom,clock-rates = <0 0 200000000 0>;
   };
+52 −0
Original line number Diff line number Diff line
* Qualcomm Technologies, Inc. MSM CSID

Required properties:
- cell-index: csid hardware core index
- compatible :
    - "qcom,csid"
    - "qcom,csid-v2.0"
    - "qcom,csid-v2.2"
    - "qcom,csid-v3.0"
    - "qcom,csid-v3.1"
    - "qcom,csid-v3.2"
    - "qcom,csid-v3.5"
    - "qcom,csid-v4.0"
    - "qcom,csid-v3.4.2"
    - "qcom,csid-v3.5.1"
    - "qcom,csid-v3.4.3"
    - "qcom,csid-v5.0"
- reg : offset and length of the register set for the device
    for the csid operating in compatible mode.
- reg-names : should specify relevant names to each reg property defined.
- interrupts : should contain the csid interrupt.
- interrupt-names : should specify relevant names to each interrupts
  property defined.
- qcom,csi-vdd-voltage : should specify voltage level
    for mipi csi in uV.
- qcom,mipi-csi-vdd-supply : should contain regulator to be used for
    this csid core
- clock-names: name of the clocks required for the device
- qcom,clock-rates: clock rate in Hz
	- 0 if appropriate clock is required but doesn't have to apply the rate

Optional properties:
- qcom,cam-vreg-name : name of the voltage regulators required for the device.
- gdscr-supply : should contain regulator used for csid clocks.
- mmagic-supply : should contain mmagic regulator used for mmagic clocks.

Example:

   qcom,csid@fda08000 {
       cell-index = <0>;
       compatible = "qcom,csid-v2.0", "qcom,csid";
       reg = <0xfda08000 0x200>;
       reg-names = "csid";
       interrupts = <0 51 0>;
       interrupt-names = "csiphy";
       qcom,csi-vdd-voltage = <1800000>;
       qcom,mipi-csi-vdd-supply = <&pm8941_l12>;
       clock-names = "camss_top_ahb_clk", "ispif_ahb_clk",
                "csi_ahb_clk", "csi_src_clk", "csi_clk",
                "csi_phy_clk", "csi_pix_clk", "csi_rdi_clk";
       qcom,clock-rates = <0 0 0 200000000 0 0 0 0>;
   };
+199 −0
Original line number Diff line number Diff line
* Qualcomm Technologies, Inc. MSM EEPROM

EEPROM is a one time programmed(OTP) device that stores the calibration data
use for camera sensor. It may either be integrated in the sensor module or in
the sensor itself. As a result, the power, clock and GPIOs may be the same as
the camera sensor. The following describes the page block map, power supply,
clock, GPIO and power on sequence properties of the EEPROM device.

Required properties if probe happens from camera daemon:
- cell-index: eeprom hardware core index
- compatible :
    - "qcom,eeprom"
- reg : offset of eeprom device registers.
- qcom,cci-master : should specify the cci core index that eeprom use.
- cam_vio-supply : should contain regulator to be used for the IO vdd.
- qcom,cam-vreg-name : should specify the regulator name to be used for
    this eeprom.
- qcom,cam-vreg-type : should specify the regulator type to be used for
    this eeprom.
- qcom,cam-vreg-min-voltage : should specify minimum voltage level
    for eeprom in uV.
- qcom,cam-vreg-max-voltage : should specify maximum voltage level
    for eeprom in uV.
- qcom,cam-vreg-op-mode : should specify current level for eeprom in uA.
- qcom,gpio-no-mux : should specify the gpio mux type.
- gpios : should specify the gpios to be used for the eeprom.
- qcom,gpio-reset : should specify the reset gpio index.
- qcom,gpio-standby : should specify the standby gpio index.
- qcom,gpio-req-tbl-num : should specify the gpio table index.
- qcom,gpio-req-tbl-flags : should specify the gpio functions.
- qcom,gpio-req-tbl-label : should specify the gpio labels.
- qcom,cam-power-seq-type : should specify the power on sequence types.
- qcom,cam-power-seq-val : should specify the power on sequence values.
- qcom,cam-power-seq-cfg-val : should specify the power on sequence config
    values.
- qcom,cam-power-seq-delay : should specify the power on sequence delay
    time in ms.

Optional properties:
- cam_vdig-supply : should contain regulator to be used for the digital vdd.



Example:

    eeprom0: qcom,eeprom@60 {
        cell-index = <0>;
        reg = <0x60 0x0>;
        compatible = "qcom,eeprom";
        qcom,cci-master = <0>;
        cam_vdig-supply = <&pm8226_l5>;
        cam_vio-supply = <&pm8226_lvs1>;
        qcom,cam-vreg-name = "cam_vdig", "cam_vio";
        qcom,cam-vreg-type = <0 1>;
        qcom,cam-vreg-min-voltage = <1200000 0>;
        qcom,cam-vreg-max-voltage = <1200000 0>;
        qcom,cam-vreg-op-mode = <200000 0>;
        qcom,gpio-no-mux = <0>;
        gpios = <&msmgpio 26 0>,
            <&msmgpio 37 0>,
            <&msmgpio 36 0>;
        qcom,gpio-reset = <1>;
        qcom,gpio-standby = <2>;
        qcom,gpio-req-tbl-num = <0 1 2>;
        qcom,gpio-req-tbl-flags = <1 0 0>;
        qcom,gpio-req-tbl-label = "CAMIF_MCLK",
            "CAM_RESET1",
            "CAM_STANDBY";
        qcom,cam-power-seq-type = "sensor_vreg",
            "sensor_vreg", "sensor_clk",
            "sensor_gpio", "sensor_gpio";
        qcom,cam-power-seq-val = "cam_vdig",
            "cam_vio", "sensor_cam_mclk",
            "sensor_gpio_reset",
            "sensor_gpio_standby";
        qcom,cam-power-seq-cfg-val = <1 1 24000000 1 1>;
        qcom,cam-power-seq-delay = <1 1 5 5 10>;
    };



Required properties if eeprom probe is kernel probe:
- cell-index: eeprom hardware core index
- compatible :
    - "qcom,eeprom"
- reg : offset of eeprom device registers.
- qcom,eeprom-name : should specify relevant names of the eeprom module
    library.
- qcom,slave-addr : should specify the slave address of the eeprom.
- qcom,cci-master : should specify the cci core index that eeprom use.
- qcom,num-blocks : should specify the total block number that eeprom contains,
    every block should contains page poll and mem.
- qcom,page%d : number %d page size, start address, address type, data,
    data type, delay in ms. size 0 stand for non-paged.
    - address type : 1 byte, 2 word.
    - data type : 1 byte, 2 word.
- qcom,poll%d : number %d poll size, poll reg address, address type, data,
    data type, delay in ms. size 0 stand for not used.
    - address type : 1 byte, 2 word.
    - data type : 1 byte, 2 word.
- qcom,mem%d : number %d memory size, start address, address type, data,
    data type, delay in ms. size 0 stand for not used.
    - address type : 1 byte, 2 word.
    - data type : 1 byte, 2 word.
- cam_vio-supply : should contain regulator to be used for the IO vdd.
- qcom,cam-vreg-name : should specify the regulator name to be used for
    this eeprom.
- qcom,cam-vreg-type : should specify the regulator type to be used for
    this eeprom.
- qcom,cam-vreg-min-voltage : should specify minimum voltage level
    for eeprom in uV.
- qcom,cam-vreg-max-voltage : should specify maximum voltage level
    for eeprom in uV.
- qcom,cam-vreg-op-mode : should specify current level for eeprom in uA.
- pinctrl-names : should specify the pin control groups followed by
    the definition of each group
- qcom,gpio-no-mux : should specify the gpio mux type.
- gpios : should specify the gpios to be used for the eeprom.
- qcom,gpio-reset : should specify the reset gpio index.
- qcom,gpio-standby : should specify the standby gpio index.
- qcom,gpio-req-tbl-num : should specify the gpio table index.
- qcom,gpio-req-tbl-flags : should specify the gpio functions.
- qcom,gpio-req-tbl-label : should specify the gpio labels.
- qcom,cam-power-seq-type : should specify the power on sequence types.
- qcom,cam-power-seq-val : should specify the power on sequence values.
- qcom,cam-power-seq-cfg-val : should specify the power on sequence config
    values.
- qcom,cam-power-seq-delay : should specify the power on sequence delay
    time in ms.

Optional properties:
- qcom,pageen%d : number %d page enable reg size, start address, address type,
    data, data type, delay in ms. size 0 stand for not used.
- cam_vdig-supply : should contain regulator to be used for the digital vdd.
- qcom,saddr%d : property should specify the slave address for block (%d).
- qcom,i2c-freq-mode : property should specify the I2C speed mode.

Optional properties -EEPROM Camera Multimodule
- qcom,cmm-data-support - Camera MultiModule data capability flag.
- qcom,cmm-data-compressed - Camera MultiModule data compression flag.
- qcom,cmm-data-offset - Camera MultiModule data start offset.
- qcom,cmm-data-size - Camera MultiModule data size.



Example:

    eeprom0: qcom,eeprom@60 {
        cell-index = <0>;
        reg = <0x60 0x0>;
        qcom,eeprom-name = "msm_eeprom";
        compatible = "qcom,eeprom";
        qcom,slave-addr = <0x60>;
        qcom,cci-master = <0>;
        qcom,num-blocks = <2>;
        qcom,page0 = <1 0x0100 2 0x01 1 1>;
        qcom,poll0 = <0 0x0 2 0 1 1>;
        qcom,mem0 = <0 0x0 2 0 1 0>;
        qcom,page1 = <1 0x0200 2 0x8 1 1>;
        qcom,pageen1 = <1 0x0202 2 0x01 1 10>;
        qcom,poll1 = <0 0x0 2 0 1 1>;
        qcom,mem1 = <32 0x3000 2 0 1 0>;
        qcom,saddr1 = <0x62>;

		qcom,cmm-data-support;
		qcom,cmm-data-compressed;
		qcom,cmm-data-offset = <0>;
		qcom,cmm-data-size = <0>;

        cam_vdig-supply = <&pm8226_l5>;
        cam_vio-supply = <&pm8226_lvs1>;
        qcom,cam-vreg-name = "cam_vdig", "cam_vio";
        qcom,cam-vreg-type = <0 1>;
        qcom,cam-vreg-min-voltage = <1200000 0>;
        qcom,cam-vreg-max-voltage = <1200000 0>;
        qcom,cam-vreg-op-mode = <200000 0>;
        qcom,gpio-no-mux = <0>;
        gpios = <&msmgpio 26 0>,
            <&msmgpio 37 0>,
            <&msmgpio 36 0>;
        qcom,gpio-reset = <1>;
        qcom,gpio-standby = <2>;
        qcom,gpio-req-tbl-num = <0 1 2>;
        qcom,gpio-req-tbl-flags = <1 0 0>;
        qcom,gpio-req-tbl-label = "CAMIF_MCLK",
            "CAM_RESET1",
            "CAM_STANDBY";
        qcom,cam-power-seq-type = "sensor_vreg",
            "sensor_vreg", "sensor_clk",
            "sensor_gpio", "sensor_gpio";
        qcom,cam-power-seq-val = "cam_vdig",
            "cam_vio", "sensor_cam_mclk",
            "sensor_gpio_reset",
            "sensor_gpio_standby";
        qcom,cam-power-seq-cfg-val = <1 1 24000000 1 1>;
        qcom,cam-power-seq-delay = <1 1 5 5 10>;
    };

+230 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019, 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_flash0: qcom,camera-flash@0 {
		cell-index = <0>;
		compatible = "qcom,camera-flash";
		qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
		qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
		qcom,switch-source = <&pmi632_switch0 &pmi632_switch0>;
		status = "ok";
	};
};

&cci {
	actuator0: qcom,actuator@0 {
		cell-index = <0>;
		reg = <0x0>;
		compatible = "qcom,actuator";
		qcom,cci-master = <0>;
		cam_vaf-supply = <&L5P>;
		qcom,cam-vreg-name = "cam_vaf";
		qcom,cam-vreg-min-voltage = <2800000>;
		qcom,cam-vreg-max-voltage = <2800000>;
		qcom,cam-vreg-op-mode = <0>;
	};

	eeprom0: qcom,eeprom@0 {
		cell-index = <0>;
		reg = <0>;
		compatible = "qcom,eeprom";
		cam_vio-supply = <&L12A>;
		cam_vana-supply = <&L3P>;
		cam_vdig-supply = <&L2P>;
		cam_clk-supply = <&camss_top_gdsc>;
		cam_vaf-supply = <&L5P>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig",
				"cam_clk", "cam_vaf";
		qcom,cam-vreg-min-voltage = <1800000 2800000 1100000 0 2800000>;
		qcom,cam-vreg-max-voltage = <1800000 2800000 1100000 0 2800000>;
		qcom,cam-vreg-op-mode = <0 80000 105000 0 100000>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk0_active
				&cam_sensor_rear_active>;
		pinctrl-1 = <&cam_sensor_mclk0_suspend
				&cam_sensor_rear_suspend>;
		gpios = <&tlmm 34 0>,
			<&tlmm 48 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <1 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0";
		qcom,sensor-position = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_gcc GCC_CAMSS_MCLK0_CLK_SRC>,
				<&clock_gcc GCC_CAMSS_MCLK0_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	eeprom1: qcom,eeprom@1 {
		cell-index = <1>;
		reg = <0x1>;
		compatible = "qcom,eeprom";
		cam_vio-supply = <&L12A>;
		cam_vana-supply = <&L4P>;
		cam_vdig-supply = <&L1P>;
		cam_clk-supply = <&camss_top_gdsc>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig",
				"cam_clk";
		qcom,cam-vreg-min-voltage = <1800000 2800000 1200000 0>;
		qcom,cam-vreg-max-voltage = <1800000 2800000 1200000 0>;
		qcom,cam-vreg-op-mode = <0 80000 105000 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk2_active
			&cam_sensor_front_active>;
		pinctrl-1 = <&cam_sensor_mclk2_suspend
			&cam_sensor_front_suspend>;
		gpios = <&tlmm 36 0>,
		    <&tlmm 42 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <1 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK",
				"CAM_RESET";
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <1>;
		status = "ok";
		clocks = <&clock_gcc GCC_CAMSS_MCLK2_CLK_SRC>,
		    <&clock_gcc GCC_CAMSS_MCLK2_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	qcom,camera@0 {
		cell-index = <0>;
		compatible = "qcom,camera";
		reg = <0x0>;
		qcom,csiphy-sd-index = <0>;
		qcom,csid-sd-index = <0>;
		qcom,mount-angle = <90>;
		qcom,actuator-src = <&actuator0>;
		qcom,eeprom-src = <&eeprom0>;
		qcom,led-flash-src = <&led_flash0>;
		cam_vio-supply = <&L12A>;
		cam_vana-supply = <&L3P>;
		cam_vdig-supply = <&L2P>;
		cam_clk-supply = <&camss_top_gdsc>;
		cam_vaf-supply = <&L5P>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig",
				"cam_clk", "cam_vaf";
		qcom,cam-vreg-min-voltage = <1800000 2800000 1100000 0 2800000>;
		qcom,cam-vreg-max-voltage = <1800000 2800000 1100000 0 2800000>;
		qcom,cam-vreg-op-mode = <0 80000 105000 0 100000>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk0_active
				&cam_sensor_rear_active>;
		pinctrl-1 = <&cam_sensor_mclk0_suspend
				&cam_sensor_rear_suspend>;
		gpios = <&tlmm 34 0>,
			<&tlmm 48 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <1 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0";
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_gcc GCC_CAMSS_MCLK0_CLK_SRC>,
				<&clock_gcc GCC_CAMSS_MCLK0_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	qcom,camera@1 {
		cell-index = <1>;
		compatible = "qcom,camera";
		reg = <0x1>;
		qcom,csiphy-sd-index = <1>;
		qcom,csid-sd-index = <2>;
		qcom,mount-angle = <90>;
		cam_vio-supply = <&L12A>;
		cam_vana-supply = <&L4P>;
		cam_vdig-supply = <&L1P>;
		cam_clk-supply = <&camss_top_gdsc>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig",
				"cam_clk";
		qcom,cam-vreg-min-voltage = <1800000 2800000 1200000 0>;
		qcom,cam-vreg-max-voltage = <1800000 2800000 1200000 0>;
		qcom,cam-vreg-op-mode = <0 80000 105000 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk1_active
				 &cam_sensor_rear2_active>;
		pinctrl-1 = <&cam_sensor_mclk1_suspend
				 &cam_sensor_rear2_suspend>;
		gpios = <&tlmm 35 0>,
			<&tlmm 45 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <1 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK1",
					  "CAM_RESET1";
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <1>;
		status = "ok";
		clocks = <&clock_gcc GCC_CAMSS_MCLK1_CLK_SRC>,
			<&clock_gcc GCC_CAMSS_MCLK1_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	qcom,camera@2 {
		cell-index = <2>;
		compatible = "qcom,camera";
		reg = <0x02>;
		qcom,csiphy-sd-index = <1>;
		qcom,csid-sd-index = <1>;
		qcom,mount-angle = <90>;
		qcom,eeprom-src = <&eeprom1>;
		cam_vio-supply = <&L12A>;
		cam_vana-supply = <&L4P>;
		cam_vdig-supply = <&L1P>;
		cam_clk-supply = <&camss_top_gdsc>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig",
				"cam_clk";
		qcom,cam-vreg-min-voltage = <1800000 2800000 1200000 0>;
		qcom,cam-vreg-max-voltage = <1800000 2800000 1200000 0>;
		qcom,cam-vreg-op-mode = <0 80000 105000 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk2_active
				 &cam_sensor_front_active>;
		pinctrl-1 = <&cam_sensor_mclk2_suspend
				 &cam_sensor_front_suspend>;
		gpios = <&tlmm 36 0>,
			<&tlmm 42 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <1 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
					"CAM_RESET2";
		qcom,sensor-mode = <0>;
		qcom,cci-master = <1>;
		status = "ok";
		clocks = <&clock_gcc GCC_CAMSS_MCLK2_CLK_SRC>,
			<&clock_gcc GCC_CAMSS_MCLK2_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

};
+768 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading