summaryrefslogtreecommitdiff
path: root/bindings/msm-cam-jpeg.txt
blob: 73e99b25cd8f370e62059b5dd8e49396f8ef2ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
* Qualcomm Technologies, Inc. MSM Camera JPEG

The MSM camera JPEG devices are implemented multiple device nodes.
The root JPEG device node has properties defined to hint the driver
about the number of Encoder and DMA nodes available during the
probe sequence. Each node has multiple properties defined
for interrupts, clocks and regulators.

=======================
Required Node Structure
=======================
JPEG root interface node takes care of the handling account for number
of Encoder and DMA devices present on the hardware.

- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,cam-jpeg".

- compat-hw-name
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,jpegenc" or "qcom,jpegdma".

- num-jpeg-enc
  Usage: required
  Value type: <u32>
  Definition: Number of supported Encoder HW blocks.

- num-jpeg-dma
  Usage: required
  Value type: <u32>
  Definition: Number of supported DMA HW blocks.

Example:
	qcom,cam-jpeg {
		compatible = "qcom,cam-jpeg";
		compat-hw-name = "qcom,jpegenc",
			"qcom,jpegdma";
		num-jpeg-enc = <1>;
		num-jpeg-dma = <1>;
		status = "ok";
	};


=======================
Required Node Structure
=======================
Encoder/DMA Nodes provide interface for JPEG driver about
the device register map, interrupt map, clocks and regulators.

- cell-index
  Usage: required
  Value type: <u32>
  Definition: Node instance number.

- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,cam_jpeg_enc".

- reg-names
  Usage: optional
  Value type: <string>
  Definition: Name of the register resources.

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

- reg-cam-base
  Usage: optional
  Value type: <u32>
  Definition: Offset of the register space compared to
		to Camera base register space.

- interrupt-names
  Usage: optional
  Value type: <string>
  Definition: Name of the interrupt.

- interrupts
  Usage: optional
  Value type: <u32>
  Definition: Interrupt associated with JPEG HW.

- regulator-names
  Usage: required
  Value type: <string>
  Definition: Name of the regulator resources for JPEG 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 JPEG HW.

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

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

- src-clock-name
  Usage: required
  Value type: <string>
  Definition: Source clock name.

- 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.

Examples:
	cam_jpeg_enc: qcom,jpegenc@ac4e000 {
		cell-index = <0>;
		compatible = "qcom,cam_jpeg_enc";
		reg-names = "jpege_hw";
		reg = <0xac4e000 0x4000>;
		reg-cam-base = <0x4e000>;
		interrupt-names = "jpeg";
		interrupts = <0 474 0>;
		regulator-names = "camss-vdd";
		camss-vdd-supply = <&titan_top_gdsc>;
		clock-names = "camera_ahb",
			"camera_axi",
			"soc_ahb_clk",
			"cpas_ahb_clk",
			"camnoc_axi_clk",
			"jpegenc_clk_src",
			"jpegenc_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_CAMNOC_AXI_CLK>,
			<&clock_camcc CAM_CC_JPEG_CLK_SRC>,
			<&clock_camcc CAM_CC_JPEG_CLK>;

		clock-rates = <0 0 0 0 0 600000000 0>;
		src-clock-name = "jpegenc_clk_src";
		clock-cntl-level = "nominal";
		status = "ok";
	};

	cam_jpeg_dma: qcom,jpegdma@0xac52000{
		cell-index = <0>;
		compatible = "qcom,cam_jpeg_dma";
		reg-names = "jpegdma_hw";
		reg = <0xac52000 0x4000>;
		reg-cam-base = <0x52000>;
		interrupt-names = "jpegdma";
		interrupts = <0 475 0>;
		regulator-names = "camss-vdd";
		camss-vdd-supply = <&titan_top_gdsc>;
		clock-names = "camera_ahb",
			"camera_axi",
			"soc_ahb_clk",
			"cpas_ahb_clk",
			"camnoc_axi_clk",
			"jpegdma_clk_src",
			"jpegdma_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_CAMNOC_AXI_CLK>,
			<&clock_camcc CAM_CC_JPEG_CLK_SRC>,
			<&clock_camcc CAM_CC_JPEG_CLK>;

		clock-rates = <0 0 0 0 0 600000000 0>;
		src-clock-name = "jpegdma_clk_src";
		clock-cntl-level = "nominal";
		status = "ok";
	};