Due to cci is using pinctrl, but it does not define gpio info and vmrm is checking the gpios parameter to get the device use gpio info, so need to add gpio for cci. And due to cci is using pinctrl, so there is not need to define gpio-req-tbl-num for cci, so cci just has gpios without gpio-req-tbl-num. This commit add gpio_for_vmrm_purpose to identify the scene and add gpio resources. CRs-Fixed: 3685452 Change-Id: I75450c252c62899c6b563745ef3322520595a8eb Signed-off-by: zhuo <quic_zhuo@quicinc.com>
1083 lines
30 KiB
Plaintext
1083 lines
30 KiB
Plaintext
* Qualcomm Technologies, Inc. MSM CCI
|
|
|
|
CCI (Camera Control Interface) is module that is use for camera sensor module
|
|
I2C communication.
|
|
|
|
=======================
|
|
Required Node Structure
|
|
=======================
|
|
The camera CCI node must be described in two levels of device nodes. The
|
|
first level describe the overall CCI node structure. Second level nodes
|
|
describe camera sensor submodule nodes which is using CCI for
|
|
i2c communication.
|
|
|
|
======================================
|
|
First Level Node - CCI device
|
|
======================================
|
|
|
|
- cell-index: cci hardware core index
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: Should specify the Hardware index id.
|
|
|
|
- compatible
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Should be "qcom,cci".
|
|
In case of cci version 1.2,
|
|
use "qcom,cci-v1.2".
|
|
|
|
- reg
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: offset and length of the register set
|
|
for the device for the cci operating in
|
|
compatible mode.
|
|
|
|
- reg-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Should specify relevant names to each
|
|
reg property defined.
|
|
|
|
- reg-cam-base
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: List of bases.
|
|
|
|
- interrupt-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Name of the interrupt.
|
|
|
|
- interrupts
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: Interrupt associated with CCI HW.
|
|
|
|
- gpios
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should specify the gpios to be used for the CCI.
|
|
|
|
- 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 in
|
|
gpio-req-tbl-num property (in the same order)
|
|
|
|
- clock-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: List of clock names required for CCI HW.
|
|
|
|
- clock-rates
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: List of clock rates in Hz for CCI HW.
|
|
|
|
- clock-cntl-level
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: All different clock level node can support.
|
|
|
|
- clocks
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: all clock phandle and source clocks.
|
|
|
|
- src-clock-name
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: name for the source clock.
|
|
|
|
- regulator-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: name of the voltage regulators required for the device.
|
|
|
|
- gdscr-supply
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain gdsr regulator used for cci clocks.
|
|
|
|
- pctrl-idx-mapping
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain master index associated with cci hw.
|
|
|
|
- pctrl-map-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: should contain pctrl-idx-mapping associated mapping name.
|
|
|
|
- mmagic-supply
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: should contain mmagic regulator used for mmagic clocks.
|
|
|
|
- vmrm-resource-ids
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should specify vmrm resource id list order is mem label,
|
|
mem tag, irq1 label, irq2 label.
|
|
|
|
- gpios
|
|
Usage: required when enable vmrm
|
|
Value type: <phandle>
|
|
Definition: should specify the gpios to be used for the cci.
|
|
|
|
- gpio_for_vmrm_purpose
|
|
Usage: required when enable vmrm
|
|
Value type: <boolean>
|
|
Definition: A boolean flag to indicate the gpios is only for vmrm.
|
|
|
|
=========================
|
|
CCI clock settings
|
|
=========================
|
|
- I2c speed settings (*)
|
|
Usage: required
|
|
Definition: List of i2c rates for CCI HW.
|
|
- i2c_freq_100Khz
|
|
Definition: qcom,i2c_standard_mode - node should contain clock settings for
|
|
100Khz
|
|
- i2c_freq_400Khz
|
|
Definition: qcom,i2c_fast_mode - node should contain clock settings for
|
|
400Khz
|
|
- i2c_freq_custom
|
|
Definition: qcom,i2c_custom_mode - node can contain clock settings for
|
|
frequencies other than 100Khz and 400Khz which is specific to usecase.
|
|
Currently it has settings for 375Khz.
|
|
- i2c_freq_1Mhz
|
|
Definition: qcom,i2c_fast_plus_mode - node should contain clock
|
|
settings for 1Mhz
|
|
* if speed settings is not defined the low level driver can use "i2c_freq_custom"
|
|
like default
|
|
|
|
- hw-thigh
|
|
Definition: should contain high period of the SCL clock in terms of CCI clock cycle
|
|
- hw-tlow
|
|
Definition: should contain high period of the SCL clock in terms of CCI clock cycle
|
|
- hw-tsu-sto
|
|
Definition: should contain setup time for STOP condition
|
|
- hw-tsu-sta
|
|
Definition: should contain setup time for Repeated START condition
|
|
- hw-thd-dat
|
|
Definition: should contain hold time for the data
|
|
- hw-thd-sta
|
|
Definition: should contain hold time for START condition
|
|
- hw-tbuf
|
|
Definition: should contain free time between a STOP and a START condition
|
|
- hw-scl-stretch-en
|
|
Definition: should contain enable or disable clock stretching
|
|
- hw-trdhld
|
|
Definition: should contain internal hold time for SDA
|
|
- hw-tsp
|
|
Definition: should contain filtering of glitches
|
|
|
|
Example:
|
|
|
|
qcom,cci@0xfda0c000 {
|
|
cell-index = <0>;
|
|
compatible = "qcom,cci";
|
|
reg = <0xfda0c000 0x300>;
|
|
reg-names = "cci";
|
|
interrupts = <0 50 0>;
|
|
interrupt-names = "cci";
|
|
clock-names = "camnoc_axi_clk", "soc_ahb_clk",
|
|
"slow_ahb_src_clk", "cpas_ahb_clk",
|
|
"cci_clk", "cci_clk_src";
|
|
clock-rates = <0 0 80000000 0 0 37500000>;
|
|
clock-cntl-level = "turbo";
|
|
gpios = <&tlmm 17 0>,
|
|
<&tlmm 18 0>,
|
|
<&tlmm 19 0>,
|
|
<&tlmm 20 0>;
|
|
gpio-tbl-num = <0 1 2 3>;
|
|
gpio-tbl-flags = <1 1 1 1>;
|
|
gpio-tbl-label = "CCI_I2C_DATA0",
|
|
"CCI_I2C_CLK0",
|
|
"CCI_I2C_DATA1",
|
|
"CCI_I2C_CLK1";
|
|
pctrl-idx-mapping = <CCI_MASTER_0 CCI_MASTER_1>;
|
|
pctrl-map-names = "m0", "m1";
|
|
pinctrl-names = "m0_active", "m0_suspend",
|
|
"m1_active", "m1_suspend";
|
|
pinctrl-0 = <&cci0_active>;
|
|
pinctrl-1 = <&cci0_suspend>;
|
|
pinctrl-2 = <&cci1_active>;
|
|
pinctrl-3 = <&cci1_suspend>;
|
|
vmrm-resource-ids = <7 7 7>;
|
|
i2c_freq_100Khz: qcom,i2c_standard_mode {
|
|
hw-thigh = <78>;
|
|
hw-tlow = <114>;
|
|
hw-tsu-sto = <28>;
|
|
hw-tsu-sta = <28>;
|
|
hw-thd-dat = <10>;
|
|
hw-thd-sta = <77>;
|
|
hw-tbuf = <118>;
|
|
hw-scl-stretch-en = <0>;
|
|
hw-trdhld = <6>;
|
|
hw-tsp = <1>;
|
|
status = "ok";
|
|
};
|
|
i2c_freq_400Khz: qcom,i2c_fast_mode {
|
|
hw-thigh = <20>;
|
|
hw-tlow = <28>;
|
|
hw-tsu-sto = <21>;
|
|
hw-tsu-sta = <21>;
|
|
hw-thd-dat = <13>;
|
|
hw-thd-sta = <18>;
|
|
hw-tbuf = <25>;
|
|
hw-scl-stretch-en = <0>;
|
|
hw-trdhld = <6>;
|
|
hw-tsp = <3>;
|
|
status = "ok";
|
|
};
|
|
i2c_freq_custom: qcom,i2c_custom_mode {
|
|
hw-thigh = <15>;
|
|
hw-tlow = <28>;
|
|
hw-tsu-sto = <21>;
|
|
hw-tsu-sta = <21>;
|
|
hw-thd-dat = <13>;
|
|
hw-thd-sta = <18>;
|
|
hw-tbuf = <25>;
|
|
hw-scl-stretch-en = <1>;
|
|
hw-trdhld = <6>;
|
|
hw-tsp = <3>;
|
|
status = "ok";
|
|
};
|
|
i2c_freq_1Mhz: qcom,i2c_fast_plus_mode {
|
|
hw-thigh = <16>;
|
|
hw-tlow = <22>;
|
|
hw-tsu-sto = <17>;
|
|
hw-tsu-sta = <18>;
|
|
hw-thd-dat = <16>;
|
|
hw-thd-sta = <15>;
|
|
hw-tbuf = <19>;
|
|
hw-scl-stretch-en = <1>;
|
|
hw-trdhld = <3>;
|
|
hw-tsp = <3>;
|
|
cci-clk-src = <37500000>;
|
|
status = "ok";
|
|
};
|
|
};
|
|
|
|
=======================================
|
|
Second Level Node - CAM SENSOR MODULES
|
|
=======================================
|
|
|
|
=======================================
|
|
CAM SENSOR RESOURCE MANAGER
|
|
=======================================
|
|
Camera Sensor Resource manager node contains properties of shared camera
|
|
sensor resource.
|
|
|
|
- compatible
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Should be "qcom,cam-res-mgr".
|
|
|
|
- gpios-shared
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain the gpios which are used by two or more
|
|
cameras, and these cameras may be opened together.
|
|
|
|
- gpios-shared-pinctrl
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain the pinctrl gpios which are used by two or more
|
|
cameras, and these cameras may be opened together.
|
|
|
|
- shared-pctrl-gpio-names
|
|
Usage: optional
|
|
Value type: <string>
|
|
Definition: List of names to assign the shared pinctrl gpio defined in
|
|
shared-pinctrl-gpios entry
|
|
e.g "mclk0", "xyz"
|
|
|
|
- pinctrl-names
|
|
Usage: optional
|
|
Value type: <string>
|
|
Definition: List of names to assign the shared pin state defined in pinctrl device node
|
|
string should follow the strict rule which needs to start with shared-pinctrl-gpio-names
|
|
and followed by "_active" and "_suspend"
|
|
e.g. "mclk0_active", "mclk0_suspend", "xyz_active", "xyz_suspend"
|
|
|
|
- pinctrl-<0..n>
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: Lists phandles each pointing to the pin configuration node within a pin
|
|
controller. These pin configurations are installed in the pinctrl device node.
|
|
|
|
|
|
==============================
|
|
CAMERA IMAGE SENSOR/TPG MODULE
|
|
==============================
|
|
Image sensor node contains properties of camera image sensor
|
|
|
|
- compatible
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Should be "qcom,cam-sensor".
|
|
|
|
- cell-index: cci hardware core index
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: Should specify the Hardware index id.
|
|
|
|
- reg
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: offset and length of the register set
|
|
for the device for the cci operating in
|
|
compatible mode.
|
|
|
|
- cci-device
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain i2c device id to be used for this camera
|
|
sensor
|
|
|
|
- cci-master
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain i2c master id to be used for this camera
|
|
sensor
|
|
- 0 -> MASTER 0
|
|
- 1 -> MASTER 1
|
|
|
|
- csiphy-sd-index
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain csiphy instance that will used to
|
|
receive sensor data (0, 1, 2, 3).
|
|
|
|
- cam_vdig-supply
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which digital voltage is
|
|
supplied
|
|
|
|
- cam_vana-supply
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which analog voltage is
|
|
supplied
|
|
|
|
- cam_vio-supply
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which IO voltage is supplied
|
|
|
|
- cam_bob-supply
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which BoB voltage is supplied
|
|
|
|
- i3c-target
|
|
Usage: required for I3C targets
|
|
Value type: <boolean>
|
|
Definition: A boolean flag to indicate the target being used as an pure I3C
|
|
target on a I3C bus.
|
|
|
|
- i3c-i2c-target
|
|
Usage: required for I3C and I2C mixed bus targets
|
|
Value type: <boolean>
|
|
Definition: A boolean flag to indicate the target being used as a I3C as
|
|
well as I2C target on a I3C bus.
|
|
|
|
- regulator-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: should contain names of all regulators needed by this
|
|
sensor
|
|
|
|
- rgltr-cntrl-support
|
|
Usage: required
|
|
Value type: <boolean>
|
|
Definition: This property is required if the sw control regulator parameters
|
|
e.g. rgltr-min-voltage
|
|
|
|
- aon-camera-id
|
|
Usage: required
|
|
Value type: <u8>
|
|
Definition: This property is required if the sensor is being shared for Main and AON camera.
|
|
It refers to index of AON Camera.
|
|
e.g. aon-camera-id = <AON_CAM1>;
|
|
|
|
- rgltr-min-voltage
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain minimum voltage level for regulators mentioned
|
|
in regulator-names property (in the same order)
|
|
|
|
- rgltr-max-voltage
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain maximum voltage level for regulators mentioned
|
|
in regulator-names property (in the same order)
|
|
|
|
- rgltr-load-current
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain optimum voltage level for regulators mentioned
|
|
in regulator-names property (in the same order)
|
|
|
|
- sensor-position-roll
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain sensor rotational angle with respect to axis of
|
|
reference. i.e. 0, 90, 180, 360
|
|
|
|
- sensor-position-pitch
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain sensor rotational angle with respect to axis of
|
|
reference. i.e. 0, 90, 180, 360
|
|
|
|
- sensor-position-yaw
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain sensor rotational angle with respect to axis of
|
|
reference. i.e. 0, 90, 180, 360
|
|
|
|
- qcom,secure
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should be enabled to operate the camera in secure mode
|
|
|
|
- gpio-no-mux
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain field to indicate whether gpio mux table is
|
|
available. i.e. 1 if gpio mux is not available, 0 otherwise
|
|
|
|
- cam_vaf-supply
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain regulator from which AF voltage is supplied
|
|
|
|
- pwm-switch
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: This property is required for regulator to switch into PWM mode.
|
|
|
|
- gpios
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain phandle to gpio controller node and array of
|
|
#gpio-cells specifying specific gpio (controller specific)
|
|
|
|
- gpio-reset
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors reset_n
|
|
|
|
- gpio-standby
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors standby_n
|
|
|
|
- gpio-vio
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors io vreg enable
|
|
|
|
- gpio-vana
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors analog vreg enable
|
|
|
|
- gpio-vdig
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors digital vreg enable
|
|
|
|
- gpio-vaf
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors af vreg enable
|
|
|
|
- gpio-af-pwdm
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpio used by sensors af pwdm_n
|
|
|
|
- gpio-req-tbl-num
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index to gpios specific to this sensor
|
|
|
|
- gpio-req-tbl-flags
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain direction of gpios present in
|
|
gpio-req-tbl-num property (in the same order)
|
|
|
|
- gpio-req-tbl-label
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain name of gpios present in
|
|
gpio-req-tbl-num property (in the same order)
|
|
|
|
- gpio-set-tbl-num
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain index of gpios that need to be
|
|
configured by msm
|
|
|
|
- gpio-set-tbl-flags
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain value to be configured for the gpios
|
|
present in gpio-set-tbl-num property (in the same order)
|
|
|
|
- gpio-set-tbl-delay
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain amount of delay after configuring
|
|
gpios as specified in gpio_set_tbl_flags property (in the same order)
|
|
|
|
- actuator-src
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: if auto focus is supported by this sensor, this
|
|
property should contain phandle of respective actuator node
|
|
|
|
- led-flash-src
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: if LED flash is supported by this sensor, this
|
|
property should contain phandle of respective LED flash node
|
|
|
|
- qcom,vdd-cx-supply
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which cx voltage is supplied
|
|
|
|
- qcom,vdd-cx-name
|
|
Usage: optional
|
|
Value type: <string>
|
|
Definition: should contain names of cx regulator
|
|
|
|
- eeprom-src
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: if eeprom memory is supported by this sensor, this
|
|
property should contain phandle of respective eeprom nodes
|
|
|
|
- ois-src
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: if optical image stabilization is supported by this sensor,
|
|
this property should contain phandle of respective ois node
|
|
|
|
- ir-led-src
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: if ir led is supported by this sensor, this property
|
|
should contain phandle of respective ir-led node
|
|
|
|
- qcom,ir-cut-src
|
|
Usage: optional
|
|
Value type: <phandle>
|
|
Definition: if ir cut is supported by this sensor, this property
|
|
should contain phandle of respective ir-cut node
|
|
|
|
- qcom,special-support-sensors
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: if only some special sensors are supported
|
|
on this board, add sensor name in this property.
|
|
|
|
- use-shared-clk
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: It is booloean property. This property is required
|
|
if the clk is shared clk between different sensor and ois, if this
|
|
device need to be opened together.
|
|
|
|
- clock-rates
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: clock rate in Hz.
|
|
|
|
- clock-cntl-level
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: All different clock level node can support.
|
|
|
|
- clock-cntl-support
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: Says whether clock control support is present or not
|
|
|
|
- clocks
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: all clock phandle and source clocks.
|
|
|
|
- clock-control
|
|
Usage: optional
|
|
Value type: <string>
|
|
Definition: The valid fields are "NO_SET_RATE", "INIT_RATE" and
|
|
"SET_RATE". "NO_SET_RATE" the corresponding clock is enabled without setting
|
|
the rate assuming some other driver has already set it to appropriate rate.
|
|
"INIT_RATE" clock rate is not queried assuming some other driver has set
|
|
the clock rate and ispif will set the the clock to this rate.
|
|
"SET_RATE" clock is enabled and the rate is set to the value specified
|
|
in the property clock-rates.
|
|
|
|
=============================
|
|
ACTUATOR MODULE
|
|
=============================
|
|
|
|
- compatible
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Should be "qcom,actuator".
|
|
|
|
- cell-index: cci hardware core index
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: Should specify the Hardware index id.
|
|
|
|
- reg
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: offset and length of the register set
|
|
for the device for the cci operating in
|
|
compatible mode.
|
|
|
|
- cci-device
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain i2c device id to be used for this camera
|
|
sensor
|
|
|
|
- cci-master
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain i2c master id to be used for this camera
|
|
sensor
|
|
- 0 -> MASTER 0
|
|
- 1 -> MASTER 1
|
|
|
|
- cam_vaf-supply
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which AF voltage is supplied
|
|
|
|
- regulator-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: should contain names of all regulators needed by this
|
|
actuator. i.e. "cam_vaf"
|
|
|
|
- aon-user
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: AON support detection
|
|
|
|
- i3c-target
|
|
Usage: required for I3C Targets
|
|
Value type: <boolean>
|
|
Definition: A boolean flag to indicate the target being used as an pure I3C
|
|
target on a I3C bus.
|
|
|
|
- rgltr-cntrl-support
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: It is booloean property. This property is required
|
|
if the code and regulator control parameters e.g. rgltr-min-voltage
|
|
|
|
- rgltr-min-voltage
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain minimum voltage level in mcrovolts
|
|
for regulators mentioned in regulator-names property (in the same order)
|
|
|
|
- rgltr-max-voltage
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain maximum voltage level in mcrovolts
|
|
for regulators mentioned in regulator-names property (in the same order)
|
|
|
|
- rgltr-load-current
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain the maximum current in microamps
|
|
required from the regulators mentioned in the regulator-names property
|
|
(in the same order).
|
|
|
|
=============================
|
|
OIS MODULE
|
|
=============================
|
|
|
|
- compatible
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: Should be "qcom,ois".
|
|
|
|
- cell-index: cci hardware core index
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: Should specify the Hardware index id.
|
|
|
|
- reg
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: offset and length of the register set
|
|
for the device for the cci operating in
|
|
compatible mode.
|
|
|
|
- cci-device
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain i2c device id to be used for this camera
|
|
sensor
|
|
|
|
- cci-master
|
|
Usage: required
|
|
Value type: <u32>
|
|
Definition: should contain i2c master id to be used for this camera
|
|
sensor
|
|
- 0 -> MASTER 0
|
|
- 1 -> MASTER 1
|
|
|
|
- cam_vaf-supply
|
|
Usage: required
|
|
Value type: <phandle>
|
|
Definition: should contain regulator from which AF voltage is supplied
|
|
|
|
- regulator-names
|
|
Usage: required
|
|
Value type: <string>
|
|
Definition: should contain names of all regulators needed by this
|
|
actuator. i.e. "cam_vaf"
|
|
|
|
- rgltr-cntrl-support
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: It is booloean property. This property is required
|
|
if the code and regulator control parameters e.g. rgltr-min-voltage
|
|
|
|
- i3c-target
|
|
Usage: required for I3C Targets
|
|
Value type: <boolean>
|
|
Definition: A boolean flag to indicate the target being used as an pure I3C
|
|
target on a I3C bus.
|
|
|
|
- rgltr-min-voltage
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain minimum voltage level in mcrovolts
|
|
for regulators mentioned in regulator-names property (in the same order)
|
|
|
|
- rgltr-max-voltage
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain maximum voltage level in mcrovolts
|
|
for regulators mentioned in regulator-names property (in the same order)
|
|
|
|
- rgltr-load-current
|
|
Usage: optional
|
|
Value type: <u32>
|
|
Definition: should contain the maximum current in microamps
|
|
required from the regulators mentioned in the regulator-names property
|
|
(in the same order).
|
|
|
|
- use-shared-clk
|
|
Usage: optional
|
|
Value type: <boolean>
|
|
Definition: This property is required if the clk is shared clk between different
|
|
sensor and ois, if this device need to be opened together.
|
|
|
|
=============================
|
|
I3C ID Table MODULE
|
|
=============================
|
|
|
|
- i3c-sensor-id-table
|
|
Usage: optional
|
|
Value type: <u32 array>
|
|
Definition: Contains entries for supported I3C Sensors. One entry of this property is
|
|
of form <mid_num pid_num>.
|
|
|
|
- i3c-eeprom-id-table
|
|
Usage: optional
|
|
Value type: <u32 array>
|
|
Definition: Contains entries for supported I3C EEPROMs. One entry of this property is
|
|
of form <mid_num pid_num>.
|
|
|
|
- i3c-actuator-id-table
|
|
Usage: optional
|
|
Value type: <u32 array>
|
|
Definition: Contains entries for supported I3C actuators. One entry of this property is
|
|
of form <mid_num pid_num>.
|
|
|
|
- i3c-ois-id-table
|
|
Usage: optional
|
|
Value type: <u32 array>
|
|
Definition: Contains entries for supported I3C OIS slaves. One entry of this property is
|
|
of form <mid_num pid_num>.
|
|
|
|
|
|
Example:
|
|
&soc {
|
|
led_flash0: qcom,camera-flash@0 {
|
|
cell-index = <0>;
|
|
compatible = "qcom,camera-flash";
|
|
flash-source = <&pmi8994_flash0 &pmi8994_flash1>;
|
|
torch-source = <&pmi8998_torch0 &pmi8998_torch1>;
|
|
switch-source = <&pmi8998_switch>;
|
|
status = "ok";
|
|
};
|
|
|
|
qcom,cam-i3c-id-table {
|
|
i3c-sensor-id-table = <0x1B0 0x0766>;
|
|
i3c-eeprom-id-table = <>;
|
|
i3c-actuator-id-table = <>;
|
|
i3c-ois-id-table = <>;
|
|
status = "disabled";
|
|
};
|
|
};
|
|
|
|
&cam_cci0 {
|
|
actuator0: qcom,actuator0 {
|
|
cell-index = <0>;
|
|
reg = <0x0>;
|
|
compatible = "qcom,actuator";
|
|
cci-device = <0>;
|
|
cci-master = <0>;
|
|
cam_vaf-supply = <&pmi8998_bob>;
|
|
regulator-names = "cam_vaf";
|
|
rgltr-cntrl-support;
|
|
rgltr-min-voltage = <2800000>;
|
|
rgltr-max-voltage = <2800000>;
|
|
rgltr-load-current = <100000>;
|
|
};
|
|
|
|
ois0: qcom,ois0 {
|
|
cell-index = <0>;
|
|
reg = <0x0>;
|
|
compatible = "qcom,ois";
|
|
cci-device = <0>;
|
|
cci-master = <0>;
|
|
cam_vaf-supply = <&pmi8998_bob>;
|
|
regulator-names = "cam_vaf";
|
|
rgltr-cntrl-support;
|
|
rgltr-min-voltage = <2800000>;
|
|
rgltr-max-voltage = <2800000>;
|
|
rgltr-load-current = <100000>;
|
|
};
|
|
|
|
qcom,cam-res-mgr {
|
|
compatible = "qcom,cam-res-mgr";
|
|
status = "ok";
|
|
gpios-shared = <18 19>;
|
|
gpios-shared-pinctrl = <408 409>;
|
|
shared-pctrl-gpio-names = "mclk0", "mclk1";
|
|
pinctrl-names = "mclk0_active", "mclk0_suspend",
|
|
"mclk1_active", "mclk1_suspend";
|
|
pinctrl-0 = <&cam_sensor_mclk0_active>;
|
|
pinctrl-1 = <&cam_sensor_mclk0_suspend>;
|
|
pintcrl-2 = <&cam_sensor_mclk1_active>;
|
|
pinctrl-3 = <&cam_sensor_mclk1_suspend>;
|
|
};
|
|
|
|
qcom,cam-sensor0 {
|
|
cell-index = <0>;
|
|
compatible = "qcom,camera";
|
|
reg = <0x0>;
|
|
csiphy-sd-index = <0>;
|
|
sensor-position-roll = <90>;
|
|
sensor-position-pitch = <0>;
|
|
sensor-position-yaw = <180>;
|
|
secure = <1>;
|
|
led-flash-src = <&led_flash0>;
|
|
actuator-src = <&actuator0>;
|
|
ois-src = <&ois0>;
|
|
eeprom-src = <&eeprom0>;
|
|
cam_vdig-supply = <&pm8009_l2>;
|
|
cam_vio-supply = <&pm8009l_l1>;
|
|
cam_vana-supply = <&pm8009l_l5>;
|
|
cam_bob-supply = <&pm8150l_bob>;
|
|
cam_clk-supply = <&tital_top_gdsc>;
|
|
regulator-names = "cam_vio", "cam_vana", "cam_vdig",
|
|
"cam_clk", "cam_bob";
|
|
rgltr-cntrl-support;
|
|
aon-camera-id = <AON_CAM1>;
|
|
pwm-switch;
|
|
rgltr-min-voltage = <0 2800000 1200000 0 3008000>;
|
|
rgltr-max-voltage = <0 2800000 1200000 0 4000000>;
|
|
rgltr-load-current = <0 80000 1200000 0 2000000>;
|
|
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 13 0>,
|
|
<&tlmm 80 0>,
|
|
<&tlmm 79 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_MCLK0",
|
|
"CAM_RESET0",
|
|
"CAM_VANA";
|
|
sensor-position = <0>;
|
|
sensor-mode = <0>;
|
|
cci-device = <0>;
|
|
cci-master = <0>;
|
|
status = "ok";
|
|
use-shared-clk;
|
|
clocks = <&clock_mmss clk_mclk0_clk_src>,
|
|
<&clock_mmss clk_camss_mclk0_clk>;
|
|
clock-names = "cam_src_clk", "cam_clk";
|
|
clock-cntl-leveli = "turbo";
|
|
clock-rates = <24000000>;
|
|
};
|
|
|
|
qcom,cam-tpg0 {
|
|
cell-index = <4>;
|
|
compatible = "qcom,cam-sensor";
|
|
csiphy-sd-index = <4>;
|
|
sensor-position-roll = <270>;
|
|
sensor-position-pitch = <0>;
|
|
sensor-position-yaw = <180>;
|
|
gpios = <&tlmm 30 0>,
|
|
<&tlmm 35 0>;
|
|
gpio-reset = <1>;
|
|
gpio-req-tbl-num = <0 1>;
|
|
gpio-req-tbl-flags = <1 0>;
|
|
gpio-req-tbl-label = "CAMIF_MCLK1",
|
|
"CAM_RESET1";
|
|
sensor-mode = <0>;
|
|
status = "ok";
|
|
clocks = <&gcc GCC_CAMSS_MCLK1_CLK>;
|
|
clock-names = "cam_clk";
|
|
clock-cntl-level = "turbo";
|
|
clock-rates = <19200000>;
|
|
};
|
|
};
|
|
|
|
&i3c0 {
|
|
se-clock-frequency = <100000000>;
|
|
i3c-scl-hz = <12500000>;
|
|
dfs-index = <0>;
|
|
i2c-scl-hz = <100000>;
|
|
compatible = "qcom,geni-i3c", "simple-bus";
|
|
status = "ok";
|
|
|
|
actuator_i3c_triple_wide: qcom,actuator1@c {
|
|
cell-index = <1>;
|
|
compatible = "qcom,cam-i2c-actuator", "qcom,actuator";
|
|
reg = <0x0C 0x00 0x10>;
|
|
cam_vaf-supply = <&L7N>;
|
|
i3c-i2c-target;
|
|
regulator-names = "cam_vaf";
|
|
rgltr-cntrl-support;
|
|
rgltr-min-voltage = <2960000>;
|
|
rgltr-max-voltage = <2960000>;
|
|
rgltr-load-current = <103000>;
|
|
status = "ok";
|
|
};
|
|
|
|
eeprom_i3c_wide: qcom,eeprom2@50 {
|
|
cell-index = <2>;
|
|
reg = <0x50 0x00 0x10>;
|
|
compatible = "qcom,cam-i2c-eeprom", "qcom,eeprom";
|
|
cam_vio-supply = <&L5N>;
|
|
cam_vdig-supply = <&L1N>;
|
|
cam_clk-supply = <&cam_cc_titan_top_gdsc>;
|
|
cam_vana-supply = <&L7M>;
|
|
cam_vaf-supply = <&L7N>;
|
|
cam_v_custom1-supply = <&L5M>;
|
|
i3c-i2c-target;
|
|
regulator-names = "cam_vio", "cam_vdig", "cam_clk", "cam_vana",
|
|
"cam_vaf", "cam_v_custom1";
|
|
rgltr-cntrl-support;
|
|
rgltr-min-voltage = <1800000 1104000 0 2904000 2960000 1800000>;
|
|
rgltr-max-voltage = <1800000 1104000 0 2904000 2960000 1800000>;
|
|
rgltr-load-current = <3500 913200 0 91300 103000 63100>;
|
|
gpio-no-mux = <0>;
|
|
pinctrl-names = "cam_default", "cam_suspend";
|
|
pinctrl-0 = <&cam_sensor_mclk2_active
|
|
&cam_sensor_active_rst2>;
|
|
pinctrl-1 = <&cam_sensor_mclk2_suspend
|
|
&cam_sensor_suspend_rst2>;
|
|
gpios = <&tlmm 102 0>,
|
|
<&tlmm 118 0>;
|
|
gpio-reset = <1>;
|
|
gpio-req-tbl-num = <0 1>;
|
|
gpio-req-tbl-flags = <1 0>;
|
|
gpio-req-tbl-label = "CAMIF_MCLK2",
|
|
"CAM_RESET2";
|
|
clocks = <&camcc CAM_CC_MCLK2_CLK>;
|
|
clock-names = "cam_clk";
|
|
clock-cntl-level = "nominal";
|
|
clock-rates = <24000000>;
|
|
status = "ok";
|
|
};
|
|
|
|
qcom,cam-sensor@34,36007660000 {
|
|
cell-index = <2>;
|
|
reg = <0x34 0x360 0x07660000>;
|
|
assigned-address = <0xa>;
|
|
scl-hz = <4000000>;
|
|
compatible = "qcom,cam-sensor";
|
|
csiphy-sd-index = <2>;
|
|
sensor-position-roll = <90>;
|
|
sensor-position-pitch = <0>;
|
|
sensor-position-yaw = <180>;
|
|
actuator-src = <&actuator_i3c_triple_wide>;
|
|
eeprom-src = <&eeprom_i3c_wide>;
|
|
led-flash-src = <&led_flash_triple_rear_wide>;
|
|
cam_vio-supply = <&L5N>;
|
|
cam_vdig-supply = <&L1N>;
|
|
cam_clk-supply = <&cam_cc_titan_top_gdsc>;
|
|
cam_vana-supply = <&L7M>;
|
|
cam_vaf-supply = <&L7N>;
|
|
cam_v_custom1-supply = <&L5M>;
|
|
i3c-target;
|
|
regulator-names = "cam_vio", "cam_vdig", "cam_clk", "cam_vana",
|
|
"cam_vaf", "cam_v_custom1";
|
|
rgltr-cntrl-support;
|
|
rgltr-min-voltage = <1800000 1104000 0 2904000 2960000 1800000>;
|
|
rgltr-max-voltage = <1800000 1104000 0 2904000 2960000 1800000>;
|
|
rgltr-load-current = <3500 913200 0 91300 103000 63100>;
|
|
gpio-no-mux = <0>;
|
|
pinctrl-names = "cam_default", "cam_suspend";
|
|
pinctrl-0 = <&cam_sensor_mclk2_active
|
|
&cam_sensor_active_rst2>;
|
|
pinctrl-1 = <&cam_sensor_mclk2_suspend
|
|
&cam_sensor_suspend_rst2>;
|
|
gpios = <&tlmm 102 0>,
|
|
<&tlmm 118 0>;
|
|
gpio-reset = <1>;
|
|
gpio-req-tbl-num = <0 1>;
|
|
gpio-req-tbl-flags = <1 0>;
|
|
gpio-req-tbl-label = "CAMIF_MCLK2",
|
|
"CAM_RESET2";
|
|
clocks = <&camcc CAM_CC_MCLK2_CLK>;
|
|
clock-names = "cam_clk";
|
|
clock-cntl-level = "nominal";
|
|
clock-rates = <24000000>;
|
|
status = "ok";
|
|
};
|
|
};
|