@@ -154,6 +154,149 @@ static const struct camss_subdev_resources vfe_res_8x16[] = {
154154 }
155155};
156156
157+ static const struct camss_subdev_resources csiphy_res_8x39 [] = {
158+ /* CSIPHY0 */
159+ {
160+ .regulators = { "vdda" },
161+ .clock = { "top_ahb" , "ispif_ahb" , "ahb" , "csiphy0_timer" },
162+ .clock_rate = { { 0 },
163+ { 40000000 , 80000000 },
164+ { 0 },
165+ { 100000000 , 200000000 } },
166+ .reg = { "csiphy0" , "csiphy0_clk_mux" },
167+ .interrupt = { "csiphy0" },
168+ .csiphy = {
169+ .id = 0 ,
170+ .hw_ops = & csiphy_ops_2ph_1_0 ,
171+ .formats = & csiphy_formats_8x16
172+ }
173+ },
174+
175+ /* CSIPHY1 */
176+ {
177+ .regulators = { "vdda" },
178+ .clock = { "top_ahb" , "ispif_ahb" , "ahb" , "csiphy1_timer" },
179+ .clock_rate = { { 0 },
180+ { 40000000 , 80000000 },
181+ { 0 },
182+ { 100000000 , 200000000 } },
183+ .reg = { "csiphy1" , "csiphy1_clk_mux" },
184+ .interrupt = { "csiphy1" },
185+ .csiphy = {
186+ .id = 1 ,
187+ .hw_ops = & csiphy_ops_2ph_1_0 ,
188+ .formats = & csiphy_formats_8x16
189+ }
190+ }
191+ };
192+
193+ static const struct camss_subdev_resources csid_res_8x39 [] = {
194+ /* CSID0 */
195+ {
196+ .regulators = {},
197+ .clock = { "top_ahb" , "ispif_ahb" , "csi0_ahb" , "ahb" ,
198+ "csi0" , "csi0_phy" , "csi0_pix" , "csi0_rdi" },
199+ .clock_rate = { { 0 },
200+ { 40000000 , 80000000 },
201+ { 0 },
202+ { 0 },
203+ { 100000000 , 200000000 },
204+ { 0 },
205+ { 0 },
206+ { 0 } },
207+ .reg = { "csid0" },
208+ .interrupt = { "csid0" },
209+ .csid = {
210+ .hw_ops = & csid_ops_4_1 ,
211+ .parent_dev_ops = & vfe_parent_dev_ops ,
212+ .formats = & csid_formats_4_1
213+ }
214+ },
215+
216+ /* CSID1 */
217+ {
218+ .regulators = {},
219+ .clock = { "top_ahb" , "ispif_ahb" , "csi1_ahb" , "ahb" ,
220+ "csi1" , "csi1_phy" , "csi1_pix" , "csi1_rdi" },
221+ .clock_rate = { { 0 },
222+ { 40000000 , 80000000 },
223+ { 0 },
224+ { 0 },
225+ { 100000000 , 200000000 },
226+ { 0 },
227+ { 0 },
228+ { 0 } },
229+ .reg = { "csid1" },
230+ .interrupt = { "csid1" },
231+ .csid = {
232+ .hw_ops = & csid_ops_4_1 ,
233+ .parent_dev_ops = & vfe_parent_dev_ops ,
234+ .formats = & csid_formats_4_1
235+ }
236+ },
237+
238+ /* CSID2 */
239+ {
240+ .regulators = {},
241+ .clock = { "top_ahb" , "ispif_ahb" , "csi2_ahb" , "ahb" ,
242+ "csi2" , "csi2_phy" , "csi2_pix" , "csi2_rdi" },
243+ .clock_rate = { { 0 },
244+ { 40000000 , 80000000 },
245+ { 0 },
246+ { 0 },
247+ { 100000000 , 200000000 },
248+ { 0 },
249+ { 0 },
250+ { 0 } },
251+ .reg = { "csid2" },
252+ .interrupt = { "csid2" },
253+ .csid = {
254+ .hw_ops = & csid_ops_4_1 ,
255+ .parent_dev_ops = & vfe_parent_dev_ops ,
256+ .formats = & csid_formats_4_1
257+ }
258+ },
259+ };
260+
261+ static const struct camss_subdev_resources ispif_res_8x39 = {
262+ /* ISPIF */
263+ .clock = { "top_ahb" , "ispif_ahb" , "ahb" ,
264+ "csi0" , "csi0_pix" , "csi0_rdi" ,
265+ "csi1" , "csi1_pix" , "csi1_rdi" ,
266+ "csi2" , "csi2_pix" , "csi2_rdi" },
267+ .clock_for_reset = { "vfe0" , "csi_vfe0" },
268+ .reg = { "ispif" , "csi_clk_mux" },
269+ .interrupt = { "ispif" },
270+ };
271+
272+ static const struct camss_subdev_resources vfe_res_8x39 [] = {
273+ /* VFE0 */
274+ {
275+ .regulators = {},
276+ .clock = { "top_ahb" , "ispif_ahb" , "vfe0" , "csi_vfe0" ,
277+ "vfe_ahb" , "vfe_axi" , "ahb" },
278+ .clock_rate = { { 0 },
279+ { 40000000 , 80000000 },
280+ { 50000000 , 80000000 , 100000000 , 160000000 ,
281+ 177780000 , 200000000 , 266670000 , 320000000 ,
282+ 400000000 , 465000000 , 480000000 , 600000000 },
283+ { 0 },
284+ { 0 },
285+ { 0 },
286+ { 0 } },
287+ .reg = { "vfe0" },
288+ .interrupt = { "vfe0" },
289+ .vfe = {
290+ .line_num = 3 ,
291+ .has_vbif = true,
292+ .vbif_name = "vfe0_vbif" ,
293+ .hw_ops = & vfe_ops_4_1 ,
294+ .formats_rdi = & vfe_formats_rdi_8x16 ,
295+ .formats_pix = & vfe_formats_pix_8x16
296+ }
297+ }
298+ };
299+
157300static const struct camss_subdev_resources csid_res_8x53 [] = {
158301 /* CSID0 */
159302 {
@@ -4171,6 +4314,7 @@ static int camss_probe(struct platform_device *pdev)
41714314 return - ENOMEM ;
41724315
41734316 if (camss -> res -> version == CAMSS_8x16 ||
4317+ camss -> res -> version == CAMSS_8x39 ||
41744318 camss -> res -> version == CAMSS_8x53 ||
41754319 camss -> res -> version == CAMSS_8x96 ) {
41764320 camss -> ispif = devm_kcalloc (dev , 1 , sizeof (* camss -> ispif ), GFP_KERNEL );
@@ -4302,6 +4446,17 @@ static const struct camss_resources msm8916_resources = {
43024446 .vfe_num = ARRAY_SIZE (vfe_res_8x16 ),
43034447};
43044448
4449+ static const struct camss_resources msm8939_resources = {
4450+ .version = CAMSS_8x39 ,
4451+ .csiphy_res = csiphy_res_8x39 ,
4452+ .csid_res = csid_res_8x39 ,
4453+ .ispif_res = & ispif_res_8x39 ,
4454+ .vfe_res = vfe_res_8x39 ,
4455+ .csiphy_num = ARRAY_SIZE (csiphy_res_8x39 ),
4456+ .csid_num = ARRAY_SIZE (csid_res_8x39 ),
4457+ .vfe_num = ARRAY_SIZE (vfe_res_8x39 ),
4458+ };
4459+
43054460static const struct camss_resources msm8953_resources = {
43064461 .version = CAMSS_8x53 ,
43074462 .icc_res = icc_res_8x53 ,
@@ -4468,6 +4623,7 @@ static const struct camss_resources x1e80100_resources = {
44684623
44694624static const struct of_device_id camss_dt_match [] = {
44704625 { .compatible = "qcom,msm8916-camss" , .data = & msm8916_resources },
4626+ { .compatible = "qcom,msm8939-camss" , .data = & msm8939_resources },
44714627 { .compatible = "qcom,msm8953-camss" , .data = & msm8953_resources },
44724628 { .compatible = "qcom,msm8996-camss" , .data = & msm8996_resources },
44734629 { .compatible = "qcom,qcm2290-camss" , .data = & qcm2290_resources },
0 commit comments