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

Commit aa3cbfb1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge remote-tracking branch 'quic/dev/msm-4.9-camx' into tip+topic_0727"

parents 6d5983e7 60a7581e
Loading
Loading
Loading
Loading
+438 −0
Original line number Diff line number Diff line
* Qualcomm Technologies, Inc. MSM EEPROM

EEPROM is an 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 Node Structure if probe happens from userspace
=======================================================
The EEPROM device is described in one level of the device node.

======================================
First Level Node - CAM EEPROM device
======================================
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,eeprom".

- cell-index
  Usage: required
  Value type: <u32>
  Definition: Should specify the hardware index id.

- reg
  Usage: required
  Value type: <u32>
  Definition: Register values.

- regulator-names
  Usage: required
  Value type: <string>
  Definition: Name of the regulator resources for EEPROM HW.

- xxxx-supply
  Usage: required
  Value type: <phandle>
  Definition: Regulator reference corresponding to the names listed in
		"regulator-names".

- rgltr-cntrl-support
  Usage: required
  Value type: <bool>
  Definition: This property specifies if the regulator control is supported
		e.g. rgltr-min-voltage.

- rgltr-min-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain minimum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-max-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain maximum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-load-current
  Usage: required
  Value type: <u32>
  Definition: should contain the maximum current in microamps required for
		the regulators mentioned in regulator-names property.

- gpio-no-mux
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio mux type.

- gpios
  Usage: required
  Value type: <phandle>
  Definition: should specify the gpios to be used for the eeprom.

- gpio-reset
  Usage: required
  Value type: <u32>
  Definition: should specify the reset gpio index.

- gpio-standby
  Usage: required
  Value type: <u32>
  Definition: should specify the standby gpio index.

- gpio-req-tbl-num
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio table index.

- gpio-req-tbl-flags
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio functions.

- gpio-req-tbl-label
  Usage: required
  Value type: <string>
  Definition: should specify the gpio labels.

- sensor-position
  Usage: required
  Value type: <u32>
  Definition: should contain the mount angle of the camera sensor.

- cci-master
  Usage: required
  Value type: <u32>
  Definition: should contain i2c master id to be used for this camera
		sensor.

- sensor-mode
  Usage: required
  Value type: <u32>
  Definition: should contain sensor mode supported.

- clock-names
  Usage: required
  Value type: <string>
  Definition: List of clock names required for EEPROM HW.

- clocks
  Usage: required
  Value type: <phandle>
  Definition: List of clocks used for EEPROM HW.

- clock-cntl-level
  Usage: required
  Value type: <string>
  Definition: says what all different clock levels eeprom node has.

- clock-rates
  Usage: required
  Value type: <u32>
  Definition: List of clocks rates.

Example:

	eprom0: qcom,eeprom@0 {
	        cell-index = <0>;
		reg = <0x0>;
		compatible = "qcom,eeprom";
		cam_vdig-supply = <&pm8998_l5>;
		cam_vio-supply = <&pm8998_lvs1>;
		regulator-names = "cam_vdig", "cam_vio";
		rgltr-cntrl-support;
		rgltr-min-voltage = <1200000 0>;
		rgltr-max-voltage = <1200000 0>;
		rgltr-load-current = <0 80000 105000 0>;
		gpio-no-mux = <0>;
		gpios = <&msmgpio 26 0>,
			<&msmgpio 37 0>,
			<&msmgpio 36 0>;
		gpio-reset = <1>;
		gpio-standby = <2>;
		gpio-req-tbl-num = <0 1 2>;
		gpio-req-tbl-flags = <1 0 0>;
		gpio-req-tbl-label = "CAMIF_MCLK",
			"CAM_RESET1",
			"CAM_STANDBY";
		sensor-position = <0>;
		sensor-mode = <0>;
		cci-master = <0>;
		status = "ok";
		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
		clock-names = "cam_clk";
		clock-cntl-level = "turbo";
		clock-rates = <24000000>;
	};

=======================================================
Required Node Structure if probe happens from kernel
=======================================================
The EEPROM device is described in one level of the device node.

======================================
First Level Node - CAM EEPROM device
======================================
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,eeprom".

- cell-index
  Usage: required
  Value type: <u32>
  Definition: Should specify the hardware index id.

- reg
  Usage: required
  Value type: <u32>
  Definition: Register values.

- qcom,eeprom-name
  Usage: required
  Value type: <string>
  Definition: Name of the EEPROM HW.

- qcom,slave-addr
  Usage: required
  Value type: <u32>
  Definition: Slave address of the EEPROM HW.

- qcom,num-blocks
  Usage: required
  Value type: <u32>
  Definition: Total block number that eeprom contains.

- qcom,pageX
  Usage: required
  Value type: <u32>
  Definition: List of values specifying page size, start address,
		address type, data, data type, delay in ms.
		size 0 stand for non-paged.

- qcom,pollX
  Usage: required
  Value type: <u32>
  Definition: List of values specifying poll size, poll reg address,
		address type, data, data type, delay in ms.
		size 0 stand for not used.

- qcom,memX
  Usage: required
  Value type: <u32>
  Definition: List of values specifying memory size, start address,
		address type, data, data type, delay in ms.
		size 0 stand for not used.

- qcom,saddrX
  Usage: required
  Value type: <u32>
  Definition: property should specify the slave address for block (%d).

- regulator-names
  Usage: required
  Value type: <string>
  Definition: Name of the regulator resources for EEPROM HW.

- qcom,cmm-data-support
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data capability flag..

- qcom,cmm-data-compressed
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data compression flag.

- qcom,cmm-data-offset
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data start offset.

- qcom,cmm-data-size
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data size.

- qcom,cam-power-seq-type
  Usage: required
  Value type: <string>
  Definition: should specify the power on sequence types.

- qcom,cam-power-seq-val
  Usage: required
  Value type: <string>
  Definition: should specify the power on sequence values.

- qcom,cam-power-seq-cfg-val
  Usage: required
  Value type: <u32>
  Definition: should specify the power on sequence config values.

- qcom,cam-power-seq-delay
  Usage: required
  Value type: <u32>
  Definition: should specify the power on sequence delay time in ms.

- xxxx-supply
  Usage: required
  Value type: <phandle>
  Definition: Regulator reference corresponding to the names listed in
		"regulator-names".

- rgltr-cntrl-support
  Usage: required
  Value type: <bool>
  Definition: This property specifies if the regulator control is supported
		e.g. rgltr-min-voltage.

- rgltr-min-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain minimum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-max-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain maximum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-load-current
  Usage: required
  Value type: <u32>
  Definition: should contain the maximum current in microamps required for
		the regulators mentioned in regulator-names property.

- gpio-no-mux
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio mux type.

- gpios
  Usage: required
  Value type: <phandle>
  Definition: should specify the gpios to be used for the eeprom.

- gpio-reset
  Usage: required
  Value type: <u32>
  Definition: should specify the reset gpio index.

- gpio-standby
  Usage: required
  Value type: <u32>
  Definition: should specify the standby gpio index.

- gpio-req-tbl-num
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio table index.

- gpio-req-tbl-flags
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio functions.

- gpio-req-tbl-label
  Usage: required
  Value type: <string>
  Definition: should specify the gpio labels.

- sensor-position
  Usage: required
  Value type: <u32>
  Definition: should contain the mount angle of the camera sensor.

- cci-master
  Usage: required
  Value type: <u32>
  Definition: should contain i2c master id to be used for this camera
		sensor.

- sensor-mode
  Usage: required
  Value type: <u32>
  Definition: should contain sensor mode supported.

- clock-cntl-level
  Usage: required
  Value type: <string>
  Definition:  says what all different clock levels eeprom node has.

- clock-names
  Usage: required
  Value type: <string>
  Definition: List of clock names required for EEPROM HW.

- clocks
  Usage: required
  Value type: <phandle>
  Definition: List of clocks used for EEPROM HW.

- clock-rates
  Usage: required
  Value type: <u32>
  Definition: List of clocks rates.

Example:

	eeprom0: qcom,eeprom@0 {
		cell-index = <0>;
		reg = <0x0>;
		qcom,eeprom-name = "msm_eeprom";
		compatible = "qcom,eeprom";
		qcom,slave-addr = <0x60>;
		qcom,num-blocks = <2>;
		qcom,page0 = <1 0x100 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>;
		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>;
		cam_vdig-supply = <&pm8998_l5>;
		cam_vio-supply = <&pm8998_lvs1>;
		regulator-names = "cam_vdig", "cam_vio";
		rgltr-cntrl-support;
		rgltr-min-voltage = <1200000 0>;
		rgltr-max-voltage = <1200000 0>;
		rgltr-load-current = <0 80000 105000 0>;
		qcom,gpio-no-mux = <0>;
		gpios = <&msmgpio 26 0>,
			<&msmgpio 37 0>,
			<&msmgpio 36 0>;
		gpio-reset = <1>;
		gpio-standby = <2>;
		gpio-req-tbl-num = <0 1 2>;
		gpio-req-tbl-flags = <1 0 0>;
		gpio-req-tbl-label = "CAMIF_MCLK",
			"CAM_RESET1",
			"CAM_STANDBY";
		sensor-position = <0>;
		sensor-mode = <0>;
		cci-master = <0>;
		status = "ok";
		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
		clock-cntl-level = "turbo";
		clock-names = "cam_clk";
		clock-rates = <24000000>;
	};
+126 −0
Original line number Diff line number Diff line
* Qualcomm Technologies, Inc. MSM FLASH

The MSM camera Flash driver provides the definitions for
enabling and disabling LED Torch/Flash by requesting it to
PMIC/I2C/GPIO based hardware. It provides the functions for
the Client to control the Flash hardware.

=======================================================
Required Node Structure
=======================================================
The Flash device is described in one level of the device node.

======================================
First Level Node - CAM FLASH device
======================================
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,camera-flash".

- cell-index
  Usage: required
  Value type: <u32>
  Definition: Should specify the hardware index id.

- reg
  Usage: required
  Value type: <u32>
  Definition: Register values.

- flash-source
  Usage: required
  Value type: <phandle>
  Definition: Should contain array of phandles to Flash source nodes.

- torch-source
  Usage: required
  Value type: <phandle>
  Definition: Should contain array of phandles to torch source nodes.

- switch-source
  Usage: Optional
  Value type: <phandle>
  Definition: Should contain phandle to switch source nodes.

- slave-id
  Usage: optional
  Value type: <u32>
  Definition: should contain i2c slave address, device id address
		      and expected id read value.

- cci-master
  Usage: optional
  Value type: <u32>
  Definition: should contain i2c master id to be used for this camera
              flash.

- max-current
  Usage: optional
  Value type: <u32>
  Definition: Max current in mA supported by flash

- max-duration
  Usage: optional
  Value type: <u32>
  Definition: Max duration in ms flash can glow.

- gpios
  Usage: optional
  Value type: <u32>
  Definition: should specify the gpios to be used for the flash.

- gpio-req-tbl-num
  Usage: optional
  Value type: <u32>
  Definition: should specify the gpio table index.

- gpio-req-tbl-flags
  Usage: optional
  Value type: <u32>
  Definition: should specify the gpio functions.

- gpio-req-tbl-label
  Usage: optional
  Value type: <u32>
  Definition: should specify the gpio labels.

- gpio-flash-reset
  Usage: optional
  Value type: <u32>
  Definition: should contain index to gpio used by flash's "flash reset" pin.

- gpio-flash-en
  Usage: optional
  Value type: <u32>
  Definition: should contain index to gpio used by flash's "flash enable" pin.

- gpio-flash-now
  Usage: optional
  Value type: <u32>
  Definition: should contain index to gpio used by flash's "flash now" pin.

Example:

led_flash_rear: qcom,camera-flash@0 {
		reg = <0x00 0x00>;
		cell-index = <0>;
		compatible = "qcom,camera-flash";
		flash-source = <&pmi8998_flash0 &pmi8998_flash1>;
		torch-source = <&pmi8998_torch0 &pmi8998_torch1>;
		switch-source = <&pmi8998_switch0>;
        qcom,slave-id = <0x00 0x00 0x0011>;
		qcom,cci-master = <0>;
		gpios = <&msmgpio 23 0>,
			<&msmgpio 24 0>;
			<&msmgpio 25 0>;
		qcom,gpio-flash-reset = <0>;
		qcom,gpio-flash-en = <0>;
		qcom,gpio-flash-now = <1>;
		qcom,gpio-req-tbl-num = <0 1>;
		qcom,gpio-req-tbl-flags = <0 0>;
		qcom,gpio-req-tbl-label = "FLASH_EN",
			"FLASH_NOW";
		qcom,max-current = <1500>;
		qcom,max-duration = <1200>;
	};
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@
		compatible = "qcom,cam-sensor";
		reg = <0x0>;
		csiphy-sd-index = <0>;
		sensor-position-roll = <90>;
		sensor-position-roll = <270>;
		sensor-position-pitch = <0>;
		sensor-position-yaw = <180>;
		led-flash-src = <&led_flash_rear>;
+9 −21
Original line number Diff line number Diff line
@@ -36,9 +36,7 @@
			<&clock_camcc CAM_CC_CPHY_RX_CLK_SRC>,
			<&clock_camcc CAM_CC_CSIPHY0_CLK>,
			<&clock_camcc CAM_CC_CSI0PHYTIMER_CLK_SRC>,
			<&clock_camcc CAM_CC_CSI0PHYTIMER_CLK>,
			<&clock_camcc CAM_CC_IFE_0_CSID_CLK>,
			<&clock_camcc CAM_CC_IFE_0_CSID_CLK_SRC>;
			<&clock_camcc CAM_CC_CSI0PHYTIMER_CLK>;
		clock-names = "camnoc_axi_clk",
			"soc_ahb_clk",
			"slow_ahb_src_clk",
@@ -46,12 +44,10 @@
			"cphy_rx_clk_src",
			"csiphy0_clk",
			"csi0phytimer_clk_src",
			"csi0phytimer_clk",
			"ife_0_csid_clk",
			"ife_0_csid_clk_src";
			"csi0phytimer_clk";
		clock-cntl-level = "turbo";
		clock-rates =
			<0 0 0 0 320000000 0 269333333 0 0 384000000>;
			<0 0 0 0 320000000 0 269333333 0>;
		status = "ok";
	};

@@ -74,9 +70,7 @@
			<&clock_camcc CAM_CC_CPHY_RX_CLK_SRC>,
			<&clock_camcc CAM_CC_CSIPHY1_CLK>,
			<&clock_camcc CAM_CC_CSI1PHYTIMER_CLK_SRC>,
			<&clock_camcc CAM_CC_CSI1PHYTIMER_CLK>,
			<&clock_camcc CAM_CC_IFE_1_CSID_CLK>,
			<&clock_camcc CAM_CC_IFE_1_CSID_CLK_SRC>;
			<&clock_camcc CAM_CC_CSI1PHYTIMER_CLK>;
		clock-names = "camnoc_axi_clk",
			"soc_ahb_clk",
			"slow_ahb_src_clk",
@@ -84,12 +78,10 @@
			"cphy_rx_clk_src",
			"csiphy1_clk",
			"csi1phytimer_clk_src",
			"csi1phytimer_clk",
			"ife_1_csid_clk",
			"ife_1_csid_clk_src";
			"csi1phytimer_clk";
		clock-cntl-level = "turbo";
		clock-rates =
			<0 0 0 0 320000000 0 269333333 0 0 384000000>;
			<0 0 0 0 320000000 0 269333333 0>;

		status = "ok";
	};
@@ -113,9 +105,7 @@
			<&clock_camcc CAM_CC_CPHY_RX_CLK_SRC>,
			<&clock_camcc CAM_CC_CSIPHY2_CLK>,
			<&clock_camcc CAM_CC_CSI2PHYTIMER_CLK_SRC>,
			<&clock_camcc CAM_CC_CSI2PHYTIMER_CLK>,
			<&clock_camcc CAM_CC_IFE_LITE_CSID_CLK>,
			<&clock_camcc CAM_CC_IFE_LITE_CSID_CLK_SRC>;
			<&clock_camcc CAM_CC_CSI2PHYTIMER_CLK>;
		clock-names = "camnoc_axi_clk",
			"soc_ahb_clk",
			"slow_ahb_src_clk",
@@ -123,12 +113,10 @@
			"cphy_rx_clk_src",
			"csiphy2_clk",
			"csi2phytimer_clk_src",
			"csi2phytimer_clk",
			"ife_lite_csid_clk",
			"ife_lite_csid_clk_src";
			"csi2phytimer_clk";
		clock-cntl-level = "turbo";
		clock-rates =
			<0 0 0 0 320000000 0 269333333 0 0 384000000>;
			<0 0 0 0 320000000 0 269333333 0>;
		status = "ok";
	};

+3 −3
Original line number Diff line number Diff line
@@ -2667,7 +2667,7 @@

			config {
				pins = "gpio80","gpio79";
				bias-disable; /* No PULL */
				bias-pull-down; /* PULL DOWN */
				drive-strength = <2>; /* 2 MA */
			};
		};
@@ -2723,7 +2723,7 @@

			config {
				pins = "gpio28";
				bias-disable; /* No PULL */
				bias-pull-down; /* PULL DOWN */
				drive-strength = <2>; /* 2 MA */
			};
		};
@@ -2780,7 +2780,7 @@
			};
			config {
				pins = "gpio9","gpio8";
				bias-disable; /* No PULL */
				bias-pull-down; /* PULL DOWN */
				drive-strength = <2>; /* 2 MA */
			};
		};
Loading