@@ -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 {
@@ -3581,6 +3724,7 @@ static int camss_probe(struct platform_device *pdev)
35813724 return - ENOMEM ;
35823725
35833726 if (camss -> res -> version == CAMSS_8x16 ||
3727+ camss -> res -> version == CAMSS_8x39 ||
35843728 camss -> res -> version == CAMSS_8x53 ||
35853729 camss -> res -> version == CAMSS_8x96 ) {
35863730 camss -> ispif = devm_kcalloc (dev , 1 , sizeof (* camss -> ispif ), GFP_KERNEL );
@@ -3726,6 +3870,18 @@ static const struct camss_resources msm8916_resources = {
37263870 .link_entities = camss_link_entities
37273871};
37283872
3873+ static const struct camss_resources msm8939_resources = {
3874+ .version = CAMSS_8x39 ,
3875+ .csiphy_res = csiphy_res_8x39 ,
3876+ .csid_res = csid_res_8x39 ,
3877+ .ispif_res = & ispif_res_8x39 ,
3878+ .vfe_res = vfe_res_8x39 ,
3879+ .csiphy_num = ARRAY_SIZE (csiphy_res_8x39 ),
3880+ .csid_num = ARRAY_SIZE (csid_res_8x39 ),
3881+ .vfe_num = ARRAY_SIZE (vfe_res_8x39 ),
3882+ .link_entities = camss_link_entities
3883+ };
3884+
37293885static const struct camss_resources msm8953_resources = {
37303886 .version = CAMSS_8x53 ,
37313887 .icc_res = icc_res_8x53 ,
@@ -3862,6 +4018,7 @@ static const struct camss_resources x1e80100_resources = {
38624018
38634019static const struct of_device_id camss_dt_match [] = {
38644020 { .compatible = "qcom,msm8916-camss" , .data = & msm8916_resources },
4021+ { .compatible = "qcom,msm8939-camss" , .data = & msm8939_resources },
38654022 { .compatible = "qcom,msm8953-camss" , .data = & msm8953_resources },
38664023 { .compatible = "qcom,msm8996-camss" , .data = & msm8996_resources },
38674024 { .compatible = "qcom,sc7280-camss" , .data = & sc7280_resources },
0 commit comments