Files
android_kernel_samsung_sm87…/bindings/msm-cam-cpas.txt
Atiya Kailany 9b361f64a4 ARM: dts: msm: Add flag indicating crmb api support
This flag is added in cpas node to indicate that the src clk
in this node supports crmb api passthrough when voting.

CRs-Fixed: 3799575
Change-Id: Ic11d376e2d04b49dad3185ef32ae863f60f1d759
Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
2024-05-22 17:14:29 -07:00

634 lines
19 KiB
Plaintext

* Qualcomm Technologies, Inc. MSM Camera CPAS
The MSM camera CPAS device provides dependency definitions for
enabling Camera CPAS HW and provides the Client definitions
for all HW blocks that use CPAS driver for BW voting. These
definitions consist of various properties that define the list
of clients supported, AHB, AXI master-slave IDs used for BW
voting.
=======================
Required Node Structure
=======================
The camera CPAS device must be described in five levels. The first level has
general description of cpas including compatibility, interrupts, power info
etc.
The second level deals with information related to CPAS clients and how
the BW should be calculated. For simplicity in BW vote consolidation, the
grouping of granular votes pertaining to CPAS clients is represented as nodes
at four CAMNOC levels. The nodes at a particular level have some common
properties such as traffic merge type which indicates whether the votes at a
node have to be summed up, sum divided by two or taken max of all. CAMNOC Level
zero node usually represents granular vote info for clients. CAMNOC Level one
represents nodes which are clubbed together by arbiter in CAMNOC diagram. CAMNOC
Level two represents consolidated read and write nodes for RT and NRT paths.
CAMNOC Level three provides axi port information and these have nodes where all
paths from clients eventually converge according to their properties. This
includes master-slave IDs, ab, ib values for mnoc, camnoc bus interface
==================================
First Level Node - CAM CPAS device
==================================
- cell-index
Usage: required
Value type: <u32>
Definition: Node instance number.
- compatible
Usage: required
Value type: <string>
Definition: Should be "qcom,cam-cpas".
- label
Usage: required
Value type: <string>
Definition: Should be "cpas".
- arch-compat
Usage: required
Value type: <string>
Definition: Should be "cpas_top" or "camss_top".
- reg-names
Usage: required
Value type: <string>
Definition: Name of the register resources.
- reg
Usage: required
Value type: <u32>
Definition: Register values.
- reg-cam-base
Usage: required
Value type: <u32>
Definition: Offset of the register space compared to
to Camera base register space.
- cam_hw_fuse
Usage: optional
Value type: <u32:fuse_id> <u32:fuse_address> <u32:fuse_mask> <u32:fuse_type> <u32:hw_map>
Definition: List of fuse based features and respective fuse info.
fuse_id: fuse id for each features
fuse_address: fuse register io address
fuse_mask: fuse mask for the fuse registers
fuse_type: fuse feature is enable, disable or value type
hw_map: Hw map of the feature, set bit positions which HWs are
supported for that feature. Use 0xFF if all HWs supported
- interrupt-names
Usage: optional
Value type: <string>
Definition: Name of the interrupt.
- interrupts
Usage: optional
Value type: <u32>
Definition: Interrupt associated with CAMNOC HW.
- qcom,cpas-hw-ver
Usage: required
Value type: <u32>
Definition: CAM HW Version information.
- camnoc-axi-min-ib-bw
Usage: optional
Value type: <u64>
Definition: Min camnoc axi bw for the given target.
- cam-max-rt-axi-bw
Usage: optional
Value type: <u64>
Definition: Max RT axi bw allowed to be voted for the given target.
- regulator-names
Usage: required
Value type: <string>
Definition: Name of the regulator resources for CPAS HW.
- camss-vdd-supply
Usage: required
Value type: <phandle>
Definition: Regulator reference corresponding to the names listed
in "regulator-names".
- clock-names
Usage: required
Value type: <string>
Definition: List of clock names required for CPAS HW.
- clocks
Usage: required
Value type: <phandle>
Definition: List of clocks used for CPAS HW.
- src-clock-name
Usage: required
Value type: <string>
Definition: Source clock name.
- clock-rates
Usage: required
Value type: <u32>
Definition: List of clocks rates.
- clock-cntl-level
Usage: required
Value type: <string>
Definition: List of strings corresponds clock-rates levels.
Supported strings: minsvs, lowsvs, svs, svs_l1, nominal, turbo.
- qcom,cam-cx-ipeak
Usage: required
Value type: <u32>
Definition: Camera Cx Ipeak ID.
- control-camnoc-axi-clk
Usage: optional
Value type: <empty>
Definition: Bool property specifying whether to control camnoc axi
clock from cpas driver.
- cam-crmb-clk
Usage: required
Value type: <empty>
Definition: Flag indicating whether the src clk in this node is
a crmb clk or not
- camnoc-bus-width
Usage: required if control-camnoc-axi-clk is enabled
Value type: <u32>
Definition: camnoc bus width.
- camnoc-axi-clk-bw-margin-perc
Usage: optional
Value type: <u32>
Definition: Percentage value to be added to camnoc bw while calculating
camnoc axi clock frequency.
- rpmh-bcm-info
Usage: optional
Value type: <u32:idx> <u32:bcm_fe> <u32:bcm_be> <u32:ddr_idx> <u32:mmnoc_idx>
Definition: Rpmh bcm register map
idx: Total number of BCMs
bcm_fe: First BCM FE (front-end) register offset.
bcm_be: First BCM BE (back-end) register offset.
ddr_idx: DDR BCM index
mmnoc_idx: MMNOC BCM index
- qcom,msm-bus,name
- qcom,msm-bus,num-cases
- qcom,msm-bus,num-paths
- qcom,msm-bus,vectors-KBps
Please refer Documentation/devicetree/bindings/arm/msm/msm_bus.txt
for the properties above.
- vdd-corners
Usage: required
Value type: <u32>
Definition: List of vdd corners to map for ahb level.
- vdd-corner-ahb-mapping
Usage: required
Value type: <string>
Definition: List of ahb level strings corresponds to vdd-corners.
Supported strings: suspend, svs, nominal, turbo
- client-id-based
Usage: required
Value type: <empty>
Definition: Bool property specifying whether CPAS clients are ID based.
- client-names
Usage: required
Value type: <string>
Definition: List of Clients supported by CPAS.
- client-bus-camnoc-based
Usage: optional
Value type: <empty>
Definition: Bool property specifying whether Clients are connected
through CAMNOC for AXI access.
- sys-cache-names
Usage: optional
Value type: <string>
Definition: last level cache info for camera. Specifies the type
of cache; small or large. Small cache is around 256K and its
read property is self-evict. Large cache is around 3.2M which
is pre-determined for a target based on the calulations done
for concerned use cases. Large cache is Non-self evict.
UIDs value and their usage can vary from target to target.
for example; same UID 38 is used as small and large in different
targets.
- sys-cache-uids
Usage: optional
Value type: <u32>
Definition: Client ID for camera caches. ID is used to differentiate
the property of the cache like being Forget, Dealloc.
- enable-smart-qos
Usage: optional
Value type: <empty>
Definition: Bool property specifying whether Smart Qos feature is enabled.
- enable-cam-drv
Usage: optional
Value type: <u32>
Definition: Bit mask value specifying the DRV features enabled.
Supported: CAM_DDR_DRV
Please refer dt-bindings/msm-camera.h for all supported
definitions.
- rt-wr-priority-min
Usage: optional
Value type: <u32>
Definition: Minimum priority value for rt write NIUs.
- rt-wr-priority-max
Usage: optional
Value type: <u32>
Definition: Maximum priority value for rt write NIUs.
- rt-wr-priority-clamp
Usage: optional
Value type: <u32>
Definition: Clamp priority value for rt write NIUs.
- rt-wr-slope-factor
Usage: optional
Value type: <u32>
Definition: Slope factor value for rt write NIUs. Take in percentages
to avoid confusion, such as take value 100 for 1, take value 70 for 0.7.
- rt-wr-leaststressed-clamp-threshold
Usage: optional
Value type: <u32>
Definition: Least stressed clamp threshold value for rt write NIUs.
- rt-wr-moststressed-clamp-threshold
Usage: optional
Value type: <u32>
Definition: Most stressed clamp threshold value for rt write NIUs.
- rt-wr-highstress-indicator-threshold
Usage: optional
Value type: <u32>
Definition: High stress indicator threshold value for rt write NIUs.
Take in percentages to avoid confusion, such as take value 100 for 1,
take value 50 for 0.5. If the buf bw ratio for a NIU is larger than
high stress indicator threshold, this NIU is more stressed.
- rt-wr-lowstress-indicator-threshold
Usage: optional
Value type: <u32>
Definition: Low stress indicator threshold value for rt write NIUs.
Take in percentages to avoid confusion.
- rt-wr-bw-ratio-scale-factor
Usage: optional
Value type: <u32>
Definition: BW ratio scale factor value for rt write NIUs.
- domain-id
Usage: optional
Value type: <u32>
Definition: List of mapping between domain types and their IDs.
See dt-bindings/msm-camera.h for definitions of
supported domain types.
- domain-id-support-clks
Usage: optional
Value type: <string>
Definition: Clocks needed to be turned on for domain-id support.
Note that this property builds on top of clock-names-option,
clocks-option, clock-rates-option and shared-clks-option
(if any of these clocks are shared), so the associated
properties for those need to be included for this
property to work.
- 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.
- cam-version
Usage: optional
Value type: <u32>
Definition: should specify camera version.
- cpas-version
Usage: optional
Value type: <u32>
Definition: should specify cpas version.
- camera-capability
Usage: optional
Value type: <u32>
Definition: should specify camera capability.
===================================================================
Third Level Node - CAMNOC Level nodes
===================================================================
- level-index
Usage: required
Value type: <u32>
Definition: Number representing level index for ndoes at current CAMNOC level
- camnoc-max-needed
Usage: optional
Value type: <empty>
Definition: Bool property for all votes at current level to be taken maximum
for CAMNOC BW calculation.
===================================================================
Fourth Level Node - Generic CAMNOC node properties
===================================================================
- cell-index
Usage: required
Value type: <u32>
Definition: Unique index of node to be used by CPAS driver.
- node-name
Usage: required
Value type: <string>
Definition: Unique name representing this node.
- path-data-type
Usage: required if a CAMNOC Level 0 Node
Value type: <u32>
Definition: Type of path data for a specific client.
Supported : CAM_CPAS_PATH_DATA_IFE_LINEAR, CAM_CPAS_PATH_DATA_ALL, etc.
Please refer dt-bindings/msm-camera.h for all supported
definitions.
- path-transaction-type
Usage: required if a CAMNOC Level 0 Node
Value type: <u32>
Definition: Type of path transaction for a specific client.
Supported : CAM_CPAS_TRANSACTION_READ, CAM_CPAS_TRANSACTION_WRITE
- client-name
Usage: required if a CAMNOC Level 0 Node
Value type: <string>
Definition: Name of the client with above properties.
Supported : From "client-names" property in CPAS node
- constituent-paths
Usage: optional, applicable only to CAMNOC Level 0 Nodes
Value type: <u32>
Definition: List of constituents of path data type of current node.
Supported : CAM_CPAS_PATH_DATA_IFE_VID, CAM_CPAS_PATH_DATA_IFE_DISP, etc.
Please refer dt-bindings/msm-camera.h for all supported
definitions.
- drv-voting-index
Usage: optional, applicable only to CAMNOC Level 0 Nodes
Value type: <u32>
Definition: Voting index pointing to Bus Ids for Camera DRV (HLOS DRV by default).
Supported : CAM_CPAS_PORT_DRV_0, CAM_CPAS_PORT_DRV_1, etc.
Please refer dt-bindings/msm-camera.h for all supported
definitions.
- traffic-merge-type
Usage: required if NOT a CAMNOC Level 0 Node
Value type: <u32>
Definition: Type of traffic merge for that node.
Supported : CAM_CPAS_TRAFFIC_MERGE_SUM, CAM_CPAS_TRAFFIC_MERGE_SUM_INTERLEAVE.
- parent-node
Usage: required for all except CAMNOC Level 3 Nodes
Value type: <phandle>
Definition: Parent node of this node. Parent node must be at least
one level above the current level.
- rt-wr-niu
Usage: optional
Value type: <empty>
Definition: Bool property representing whether this node represents a
Real Time Write NIU node.
- niu-size
Usage: optional
Value type: <u32>
Definition: Size of NIU represented by this node.
- priority-lut-low-offset
Usage: optional
Value type: <u32>
Definition: Priority lut low register offset of NIU represented by this node.
- priority-lut-high-offset
Usage: optional
Value type: <u32>
Definition: Priority lut high register offset of NIU represented by this node.
- bus-width-factor
Usage: optional
Value type: <u32>
Definition: For bus width factor consideration in CAMNOC BW calculation
- qcom,axi-port-name
Usage: required at CAMNOC Level 3
Value type: <string>
Definition: Name of the AXI Port.
- ib-bw-voting-needed
Usage: optional
Value type: <empty>
Definition: Bool property indicating axi port requires instantaneous bandwidth
- rt-axi-port
Usage: optional
Value type: <empty>
Definition: Bool property indicating whether this axi port represents
a real time port.
===================================================================
Fifth Level Node - CAM AXI Bus Properties
===================================================================
- qcom,msm-bus,name
- qcom,msm-bus,num-cases
- qcom,msm-bus,num-paths
- qcom,msm-bus,vectors-KBps
Please refer Documentation/devicetree/bindings/arm/msm/msm_bus.txt
for the properties above.
- qcom,msm-bus-vector-dyn-vote
Usage: optional
Value type: <empty>
Definition: Bool property specifying whether this bus client
is dynamic vote based.
Example:
qcom,cam-cpas@ac40000 {
cell-index = <0>;
compatible = "qcom,cam-cpas";
label = "cpas";
arch-compat = "cpas_top";
status = "ok";
reg-names = "cam_cpas_top", "cam_camnoc";
reg = <0xac40000 0x1000>,
<0xac42000 0x5000>;
reg-cam-base = <0x40000 0x42000>;
cam_hw_fuse = <CAM_CPAS_QCFA_BINNING_ENABLE 0x00780210 29>,
<CAM_CPAS_SECURE_CAMERA_ENABLE 0x00780210 18>;
interrupt-names = "cpas_camnoc";
interrupts = <0 459 0>;
qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */
regulator-names = "camss-vdd";
camss-vdd-supply = <&titan_top_gdsc>;
clock-names = "gcc_ahb_clk",
"gcc_axi_clk",
"soc_ahb_clk",
"cpas_ahb_clk",
"slow_ahb_clk_src",
"camnoc_axi_clk";
clocks = <&clock_gcc GCC_CAMERA_AHB_CLK>,
<&clock_gcc GCC_CAMERA_AXI_CLK>,
<&clock_camcc CAM_CC_SOC_AHB_CLK>,
<&clock_camcc CAM_CC_CPAS_AHB_CLK>,
<&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>,
<&clock_camcc CAM_CC_CAMNOC_AXI_CLK>;
src-clock-name = "slow_ahb_clk_src";
domain-id-support-clks = "ife_lite_csid_clk",
"ife_lite_ahb", "csid_clk_src", "csid_clk";
/* domain-id-support-clks property dependent on below clock option properties */
clock-names-option = "cam_icp_clk",
"ife_lite_csid_clk",
"ife_lite_ahb", "csid_clk_src", "csid_clk";
clocks-option = <&camcc CAM_CC_ICP_CLK>,
<&camcc CAM_CC_IFE_LITE_CSID_CLK>,
<&camcc CAM_CC_IFE_LITE_AHB_CLK>,
<&camcc CAM_CC_CSID_CLK_SRC>,
<&camcc CAM_CC_CSID_CLK>;
clock-rates-option = <400000000>,
<0>, <0>, <0>, <0>;
shared-clks-option = <0 0 0 1 0>;
domain-id = <CAM_CPAS_SECURE_DOMAIN 16>,
<CAM_CPAS_NON_SECURE_DOMAIN 0>;
clock-rates = <0 0 0 0 80000000 0>;
clock-cntl-level = "turbo";
qcom,cam-cx-ipeak = <&cx_ipeak_lm 8>;
control-camnoc-axi-clk;
cam-crmb-clk;
camnoc-bus-width = <32>;
camnoc-axi-clk-bw-margin-perc = <10>;
qcom,msm-bus,name = "cam_ahb";
qcom,msm-bus,num-cases = <4>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps =
<MSM_BUS_MASTER_AMPSS_M0
MSM_BUS_SLAVE_CAMERA_CFG 0 0>,
<MSM_BUS_MASTER_AMPSS_M0
MSM_BUS_SLAVE_CAMERA_CFG 0 300000>,
<MSM_BUS_MASTER_AMPSS_M0
MSM_BUS_SLAVE_CAMERA_CFG 0 640000>,
<MSM_BUS_MASTER_AMPSS_M0
MSM_BUS_SLAVE_CAMERA_CFG 0 640000>;
client-id-based;
client-names =
"csiphy0", "csiphy1", "csiphy2", "csiphy3",
"csiphy4", "csiphy5", "cci0", "cci1",
"csid0", "csid1", "csid2", "csid3",
"csid4", "csid5", "csid6",
"ife0", "ife1", "ife2", "ife3", "custom0",
"ipe0", "cam-cdm-intf0", "cpas-cdm0", "cpas-cdm1",
"cpas-cdm2",
"bps0", "icp0", "jpeg-dma0", "jpeg-enc0",
"fd0";
sys-cache-names = "small-1", "large-1", "large-2", "large-3", "large-4";
sys-cache-uids = <34 38 50 51 52>;
enable-smart-qos;
rt-wr-priority-min = <3>;
rt-wr-priority-max = <6>;
rt-wr-priority-clamp = <6>;
rt-wr-slope-factor = <100>;
rt-wr-leaststressed-clamp-threshold = <7>;
rt-wr-moststressed-clamp-threshold = <7>;
rt-wr-highstress-indicator-threshold = <100>;
rt-wr-lowstress-indicator-threshold = <0>;
rt-wr-bw-ratio-scale-factor = <1>;
enable-cam-drv;
vmrm-resource-ids = <10 10 10>;
cam-version = <0x80800>;
cpas-version = <0x10000000>;
camera-capability = <0x9fffedeb 0x8>;
camera-bus-nodes {
level3-nodes {
level-index = <3>;
level3_rt0_rd_wr_sum: level3-rt0-rd-wr-sum {
cell-index = <0>;
node-name = "level3-rt0-rd-wr-sum";
traffic-merge-type =
<CAM_CPAS_TRAFFIC_MERGE_SUM>;
qcom,axi-port-name = "cam_hf_0";
ib-bw-voting-needed;
rt-axi-port;
qcom,axi-port-mnoc {
qcom,msm-bus,name =
"cam_hf_0_mnoc";
qcom,msm-bus-vector-dyn-vote;
qcom,msm-bus,num-cases = <2>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps =
<MSM_BUS_MASTER_CAMNOC_HF
MSM_BUS_SLAVE_EBI_CH0 0 0>,
<MSM_BUS_MASTER_CAMNOC_HF
MSM_BUS_SLAVE_EBI_CH0 0 0>;
};
};
};
level2-nodes {
level-index = <2>;
camnoc-max-needed;
level2_rt0_wr: level2-rt0-wr {
cell-index = <3>;
node-name = "level2-rt0-wr";
parent-node = <&level3_rt0_rd_wr_sum>;
traffic-merge-type =
<CAM_CPAS_TRAFFIC_MERGE_SUM_INTERLEAVE>;
};
};
level1-nodes {
level-index = <1>;
camnoc-max-needed;
level1_rt0_wr0: level1-rt0-wr0 {
cell-index = <8>;
node-name = "level1-rt0-wr0";
parent-node = <&level2_rt0_wr>;
traffic-merge-type =
<CAM_CPAS_TRAFFIC_MERGE_SUM>;
rt-wr-niu;
niu-size = <175>;
priority-lut-low-offset = <0x5830>;
priority-lut-high-offset = <0x5834>;
};
};
level0-nodes {
level-index = <0>;
ife0_ubwc_stats_wr: ife0-ubwc-stats-wr {
cell-index = <16>;
node-name = "ife0-ubwc-stats-wr";
client-name = "ife0";
traffic-data =
<CAM_CPAS_PATH_DATA_IFE_UBWC_STATS>;
traffic-transaction-type =
<CAM_CPAS_TRANSACTION_WRITE>;
constituent-paths =
<CAM_CPAS_PATH_DATA_IFE_VID
CAM_CPAS_PATH_DATA_IFE_DISP
CAM_CPAS_PATH_DATA_IFE_STATS>;
drv-voting-index =
<CAM_CPAS_PORT_DRV_0>;
parent-node = <&level1_rt0_wr0>;
};
};
};
};