Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  camss.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/*
 * camss.c
 *
 * Qualcomm MSM Camera Subsystem - Core
 *
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 * Copyright (C) 2015-2018 Linaro Ltd.
 */

#include <linux/clk.h>
#include <linux/interconnect.h>
#include <linux/media-bus-format.h>
#include <linux/media.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_graph.h>
#include <linux/pm_runtime.h>
#include <linux/pm_domain.h>
#include <linux/slab.h>
#include <linux/videodev2.h>

#include <media/media-device.h>
#include <media/v4l2-async.h>
#include <media/v4l2-device.h>
#include <media/v4l2-mc.h>
#include <media/v4l2-fwnode.h>

#include "camss.h"

#define CAMSS_CLOCK_MARGIN_NUMERATOR 105
#define CAMSS_CLOCK_MARGIN_DENOMINATOR 100

static const struct parent_dev_ops vfe_parent_dev_ops;

static const struct camss_subdev_resources csiphy_res_8x16[] = {
 /* CSIPHY0 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy0_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000 } },
  .reg = { "csiphy0""csiphy0_clk_mux" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_2ph_1_0,
   .formats = &csiphy_formats_8x16
  }
 },

 /* CSIPHY1 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy1_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000 } },
  .reg = { "csiphy1""csiphy1_clk_mux" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_2ph_1_0,
   .formats = &csiphy_formats_8x16
  }
 }
};

static const struct camss_subdev_resources csid_res_8x16[] = {
 /* CSID0 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi0_ahb""ahb",
      "csi0""csi0_phy""csi0_pix""csi0_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_4_1,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_1
  }
 },

 /* CSID1 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi1_ahb""ahb",
      "csi1""csi1_phy""csi1_pix""csi1_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_4_1,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_1
  }
 },
};

static const struct camss_subdev_resources ispif_res_8x16 = {
 /* ISPIF */
 .clock = { "top_ahb""ahb""ispif_ahb",
     "csi0""csi0_pix""csi0_rdi",
     "csi1""csi1_pix""csi1_rdi" },
 .clock_for_reset = { "vfe0""csi_vfe0" },
 .reg = { "ispif""csi_clk_mux" },
 .interrupt = { "ispif" },
};

static const struct camss_subdev_resources vfe_res_8x16[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "top_ahb""vfe0""csi_vfe0",
      "vfe_ahb""vfe_axi""ahb" },
  .clock_rate = { { 0 },
    { 50000000, 80000000, 100000000, 160000000,
      177780000, 200000000, 266670000, 320000000,
      400000000, 465000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .hw_ops = &vfe_ops_4_1,
   .formats_rdi = &vfe_formats_rdi_8x16,
   .formats_pix = &vfe_formats_pix_8x16
  }
 }
};

static const struct camss_subdev_resources csid_res_8x53[] = {
 /* CSID0 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi0_ahb""ahb",
      "csi0""csi0_phy""csi0_pix""csi0_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      400000000, 465000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID1 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi1_ahb""ahb",
      "csi1""csi1_phy""csi1_pix""csi1_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      400000000, 465000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID2 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi2_ahb""ahb",
      "csi2""csi2_phy""csi2_pix""csi2_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      400000000, 465000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },
};

static const struct camss_subdev_resources ispif_res_8x53 = {
 /* ISPIF */
 .clock = { "top_ahb""ahb""ispif_ahb",
     "csi0""csi0_pix""csi0_rdi",
     "csi1""csi1_pix""csi1_rdi",
     "csi2""csi2_pix""csi2_rdi" },
 .clock_for_reset = { "vfe0""csi_vfe0""vfe1""csi_vfe1" },
 .reg = { "ispif""csi_clk_mux" },
 .interrupt = { "ispif" },
};

static const struct camss_subdev_resources vfe_res_8x53[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "top_ahb""ahb""ispif_ahb",
      "vfe0""csi_vfe0""vfe0_ahb""vfe0_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 50000000, 100000000, 133330000,
      160000000, 200000000, 266670000,
      310000000, 400000000, 465000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .pd_name = "vfe0",
   .hw_ops = &vfe_ops_4_1,
   .formats_rdi = &vfe_formats_rdi_8x16,
   .formats_pix = &vfe_formats_pix_8x16
  }
 },

 /* VFE1 */
 {
  .regulators = {},
  .clock = { "top_ahb""ahb""ispif_ahb",
      "vfe1""csi_vfe1""vfe1_ahb""vfe1_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 50000000, 100000000, 133330000,
      160000000, 200000000, 266670000,
      310000000, 400000000, 465000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .pd_name = "vfe1",
   .hw_ops = &vfe_ops_4_1,
   .formats_rdi = &vfe_formats_rdi_8x16,
   .formats_pix = &vfe_formats_pix_8x16
  }
 }
};

static const struct resources_icc icc_res_8x53[] = {
 {
  .name = "cam_ahb",
  .icc_bw_tbl.avg = 38400,
  .icc_bw_tbl.peak = 76800,
 },
 {
  .name = "cam_vfe0_mem",
  .icc_bw_tbl.avg = 939524,
  .icc_bw_tbl.peak = 1342177,
 },
 {
  .name = "cam_vfe1_mem",
  .icc_bw_tbl.avg = 939524,
  .icc_bw_tbl.peak = 1342177,
 },
};

static const struct camss_subdev_resources csiphy_res_8x96[] = {
 /* CSIPHY0 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy0_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 } },
  .reg = { "csiphy0""csiphy0_clk_mux" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_8x96
  }
 },

 /* CSIPHY1 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy1_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 } },
  .reg = { "csiphy1""csiphy1_clk_mux" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_8x96
  }
 },

 /* CSIPHY2 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy2_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 } },
  .reg = { "csiphy2""csiphy2_clk_mux" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_8x96
  }
 }
};

static const struct camss_subdev_resources csid_res_8x96[] = {
 /* CSID0 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi0_ahb""ahb",
      "csi0""csi0_phy""csi0_pix""csi0_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID1 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi1_ahb""ahb",
      "csi1""csi1_phy""csi1_pix""csi1_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID2 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi2_ahb""ahb",
      "csi2""csi2_phy""csi2_pix""csi2_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID3 */
 {
  .regulators = { "vdda" },
  .clock = { "top_ahb""ispif_ahb""csi3_ahb""ahb",
      "csi3""csi3_phy""csi3_pix""csi3_rdi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 266666667 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid3" },
  .interrupt = { "csid3" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 }
};

static const struct camss_subdev_resources ispif_res_8x96 = {
 /* ISPIF */
 .clock = { "top_ahb""ahb""ispif_ahb",
     "csi0""csi0_pix""csi0_rdi",
     "csi1""csi1_pix""csi1_rdi",
     "csi2""csi2_pix""csi2_rdi",
     "csi3""csi3_pix""csi3_rdi" },
 .clock_for_reset = { "vfe0""csi_vfe0""vfe1""csi_vfe1" },
 .reg = { "ispif""csi_clk_mux" },
 .interrupt = { "ispif" },
};

static const struct camss_subdev_resources vfe_res_8x96[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "top_ahb""ahb""vfe0""csi_vfe0""vfe_ahb",
      "vfe0_ahb""vfe_axi""vfe0_stream"},
  .clock_rate = { { 0 },
    { 0 },
    { 75000000, 100000000, 300000000,
      320000000, 480000000, 600000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .hw_ops = &vfe_ops_4_7,
   .formats_rdi = &vfe_formats_rdi_8x96,
   .formats_pix = &vfe_formats_pix_8x96
  }
 },

 /* VFE1 */
 {
  .regulators = {},
  .clock = { "top_ahb""ahb""vfe1""csi_vfe1""vfe_ahb",
      "vfe1_ahb""vfe_axi""vfe1_stream"},
  .clock_rate = { { 0 },
    { 0 },
    { 75000000, 100000000, 300000000,
      320000000, 480000000, 600000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .hw_ops = &vfe_ops_4_7,
   .formats_rdi = &vfe_formats_rdi_8x96,
   .formats_pix = &vfe_formats_pix_8x96
  }
 }
};

static const struct camss_subdev_resources csiphy_res_660[] = {
 /* CSIPHY0 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy0_timer",
      "csi0_phy""csiphy_ahb2crif" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 269333333 },
    { 0 } },
  .reg = { "csiphy0""csiphy0_clk_mux" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_8x96
  }
 },

 /* CSIPHY1 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy1_timer",
      "csi1_phy""csiphy_ahb2crif" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 269333333 },
    { 0 } },
  .reg = { "csiphy1""csiphy1_clk_mux" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_8x96
  }
 },

 /* CSIPHY2 */
 {
  .regulators = {},
  .clock = { "top_ahb""ispif_ahb""ahb""csiphy2_timer",
      "csi2_phy""csiphy_ahb2crif" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 269333333 },
    { 0 } },
  .reg = { "csiphy2""csiphy2_clk_mux" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_8x96
  }
 }
};

static const struct camss_subdev_resources csid_res_660[] = {
 /* CSID0 */
 {
  .regulators = { "vdda""vdd_sec" },
  .clock = { "top_ahb""ispif_ahb""csi0_ahb""ahb",
      "csi0""csi0_phy""csi0_pix""csi0_rdi",
      "cphy_csid0" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      404000000, 465000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID1 */
 {
  .regulators = { "vdda""vdd_sec" },
  .clock = { "top_ahb""ispif_ahb""csi1_ahb""ahb",
      "csi1""csi1_phy""csi1_pix""csi1_rdi",
      "cphy_csid1" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      404000000, 465000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID2 */
 {
  .regulators = { "vdda""vdd_sec" },
  .clock = { "top_ahb""ispif_ahb""csi2_ahb""ahb",
      "csi2""csi2_phy""csi2_pix""csi2_rdi",
      "cphy_csid2" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      404000000, 465000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 },

 /* CSID3 */
 {
  .regulators = { "vdda""vdd_sec" },
  .clock = { "top_ahb""ispif_ahb""csi3_ahb""ahb",
      "csi3""csi3_phy""csi3_pix""csi3_rdi",
      "cphy_csid3" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 310000000,
      404000000, 465000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid3" },
  .interrupt = { "csid3" },
  .csid = {
   .hw_ops = &csid_ops_4_7,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_4_7
  }
 }
};

static const struct camss_subdev_resources ispif_res_660 = {
 /* ISPIF */
 .clock = { "top_ahb""ahb""ispif_ahb",
     "csi0""csi0_pix""csi0_rdi",
     "csi1""csi1_pix""csi1_rdi",
     "csi2""csi2_pix""csi2_rdi",
     "csi3""csi3_pix""csi3_rdi" },
 .clock_for_reset = { "vfe0""csi_vfe0""vfe1""csi_vfe1" },
 .reg = { "ispif""csi_clk_mux" },
 .interrupt = { "ispif" },
};

static const struct camss_subdev_resources vfe_res_660[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "throttle_axi""top_ahb""ahb""vfe0",
      "csi_vfe0""vfe_ahb""vfe0_ahb""vfe_axi",
      "vfe0_stream"},
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 120000000, 200000000, 256000000,
      300000000, 404000000, 480000000,
      540000000, 576000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .hw_ops = &vfe_ops_4_8,
   .formats_rdi = &vfe_formats_rdi_8x96,
   .formats_pix = &vfe_formats_pix_8x96
  }
 },

 /* VFE1 */
 {
  .regulators = {},
  .clock = { "throttle_axi""top_ahb""ahb""vfe1",
      "csi_vfe1""vfe_ahb""vfe1_ahb""vfe_axi",
      "vfe1_stream"},
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 120000000, 200000000, 256000000,
      300000000, 404000000, 480000000,
      540000000, 576000000 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .hw_ops = &vfe_ops_4_8,
   .formats_rdi = &vfe_formats_rdi_8x96,
   .formats_pix = &vfe_formats_pix_8x96
  }
 }
};

static const struct camss_subdev_resources csiphy_res_670[] = {
 /* CSIPHY0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "soc_ahb""cpas_ahb",
      "csiphy0""csiphy0_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },

 /* CSIPHY1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "soc_ahb""cpas_ahb",
      "csiphy1""csiphy1_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },

 /* CSIPHY2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "soc_ahb""cpas_ahb",
      "csiphy2""csiphy2_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 }
};

static const struct camss_subdev_resources csid_res_670[] = {
 /* CSID0 */
 {
  .regulators = {},
  .clock = { "cpas_ahb""soc_ahb""vfe0",
      "vfe0_cphy_rx""csi0" },
  .clock_rate = { { 0 },
    { 0 },
    { 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 384000000 },
    { 19200000, 75000000, 384000000, 538666667 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },

 /* CSID1 */
 {
  .regulators = {},
  .clock = { "cpas_ahb""soc_ahb""vfe1",
      "vfe1_cphy_rx""csi1" },
  .clock_rate = { { 0 },
    { 0 },
    { 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 384000000 },
    { 19200000, 75000000, 384000000, 538666667 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },

 /* CSID2 */
 {
  .regulators = {},
  .clock = { "cpas_ahb""soc_ahb""vfe_lite",
      "vfe_lite_cphy_rx""csi2" },
  .clock_rate = { { 0 },
    { 0 },
    { 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 384000000 },
    { 19200000, 75000000, 384000000, 538666667 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 }
};

static const struct camss_subdev_resources vfe_res_670[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""cpas_ahb""soc_ahb",
      "vfe0""vfe0_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 0 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 4,
   .has_pd = true,
   .pd_name = "ife0",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },

 /* VFE1 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""cpas_ahb""soc_ahb",
      "vfe1""vfe1_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 0 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 4,
   .has_pd = true,
   .pd_name = "ife1",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },

 /* VFE-lite */
 {
  .regulators = {},
  .clock = { "camnoc_axi""cpas_ahb""soc_ahb",
      "vfe_lite" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 100000000, 320000000, 404000000, 480000000, 600000000 } },
  .reg = { "vfe_lite" },
  .interrupt = { "vfe_lite" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 }
};

static const struct camss_subdev_resources csiphy_res_845[] = {
 /* CSIPHY0 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""soc_ahb""slow_ahb_src",
    "cpas_ahb""cphy_rx_src""csiphy0",
    "csiphy0_timer_src""csiphy0_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },

 /* CSIPHY1 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""soc_ahb""slow_ahb_src",
    "cpas_ahb""cphy_rx_src""csiphy1",
    "csiphy1_timer_src""csiphy1_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },

 /* CSIPHY2 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""soc_ahb""slow_ahb_src",
    "cpas_ahb""cphy_rx_src""csiphy2",
    "csiphy2_timer_src""csiphy2_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },

 /* CSIPHY3 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""soc_ahb""slow_ahb_src",
    "cpas_ahb""cphy_rx_src""csiphy3",
    "csiphy3_timer_src""csiphy3_timer" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 19200000, 240000000, 269333333 } },
  .reg = { "csiphy3" },
  .interrupt = { "csiphy3" },
  .csiphy = {
   .id = 3,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 }
};

static const struct camss_subdev_resources csid_res_845[] = {
 /* CSID0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "cpas_ahb""cphy_rx_src""slow_ahb_src",
    "soc_ahb""vfe0""vfe0_src",
    "vfe0_cphy_rx""csi0",
    "csi0_src" },
  .clock_rate = { { 0 },
    { 384000000 },
    { 80000000 },
    { 0 },
    { 19200000, 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 320000000 },
    { 0 },
    { 19200000, 75000000, 384000000, 538666667 },
    { 384000000 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },

 /* CSID1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "cpas_ahb""cphy_rx_src""slow_ahb_src",
    "soc_ahb""vfe1""vfe1_src",
    "vfe1_cphy_rx""csi1",
    "csi1_src" },
  .clock_rate = { { 0 },
    { 384000000 },
    { 80000000 },
    { 0 },
    { 19200000, 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 320000000 },
    { 0 },
    { 19200000, 75000000, 384000000, 538666667 },
    { 384000000 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },

 /* CSID2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "cpas_ahb""cphy_rx_src""slow_ahb_src",
    "soc_ahb""vfe_lite""vfe_lite_src",
    "vfe_lite_cphy_rx""csi2",
    "csi2_src" },
  .clock_rate = { { 0 },
    { 384000000 },
    { 80000000 },
    { 0 },
    { 19200000, 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 320000000 },
    { 0 },
    { 19200000, 75000000, 384000000, 538666667 },
    { 384000000 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 }
};

static const struct camss_subdev_resources vfe_res_845[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""cpas_ahb""slow_ahb_src",
    "soc_ahb""vfe0""vfe0_axi",
    "vfe0_src""csi0",
    "csi0_src"},
  .clock_rate = { { 0 },
    { 0 },
    { 80000000 },
    { 0 },
    { 19200000, 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 0 },
    { 320000000 },
    { 19200000, 75000000, 384000000, 538666667 },
    { 384000000 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife0",
   .has_pd = true,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },

 /* VFE1 */
 {
  .regulators = {},
  .clock = { "camnoc_axi""cpas_ahb""slow_ahb_src",
    "soc_ahb""vfe1""vfe1_axi",
    "vfe1_src""csi1",
    "csi1_src"},
  .clock_rate = { { 0 },
    { 0 },
    { 80000000 },
    { 0 },
    { 19200000, 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 0 },
    { 320000000 },
    { 19200000, 75000000, 384000000, 538666667 },
    { 384000000 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife1",
   .has_pd = true,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },

 /* VFE-lite */
 {
  .regulators = {},
  .clock = { "camnoc_axi""cpas_ahb""slow_ahb_src",
    "soc_ahb""vfe_lite",
    "vfe_lite_src""csi2",
    "csi2_src"},
  .clock_rate = { { 0 },
    { 0 },
    { 80000000 },
    { 0 },
    { 19200000, 100000000, 320000000, 404000000, 480000000, 600000000 },
    { 320000000 },
    { 19200000, 75000000, 384000000, 538666667 },
    { 384000000 } },
  .reg = { "vfe_lite" },
  .interrupt = { "vfe_lite" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 }
};

static const struct camss_subdev_resources csiphy_res_8250[] = {
 /* CSIPHY0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy0""csiphy0_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy1""csiphy1_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy2""csiphy2_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY3 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy3""csiphy3_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy3" },
  .interrupt = { "csiphy3" },
  .csiphy = {
   .id = 3,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY4 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy4""csiphy4_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy4" },
  .interrupt = { "csiphy4" },
  .csiphy = {
   .id = 4,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY5 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy5""csiphy5_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy5" },
  .interrupt = { "csiphy5" },
  .csiphy = {
   .id = 5,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 }
};

static const struct camss_subdev_resources csid_res_8250[] = {
 /* CSID0 */
 {
  .regulators = {},
  .clock = { "vfe0_csid""vfe0_cphy_rx""vfe0""vfe0_areg""vfe0_ahb" },
  .clock_rate = { { 400000000 },
    { 400000000 },
    { 350000000, 475000000, 576000000, 720000000 },
    { 100000000, 200000000, 300000000, 400000000 },
    { 0 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID1 */
 {
  .regulators = {},
  .clock = { "vfe1_csid""vfe1_cphy_rx""vfe1""vfe1_areg""vfe1_ahb" },
  .clock_rate = { { 400000000 },
    { 400000000 },
    { 350000000, 475000000, 576000000, 720000000 },
    { 100000000, 200000000, 300000000, 400000000 },
    { 0 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID2 */
 {
  .regulators = {},
  .clock = { "vfe_lite_csid""vfe_lite_cphy_rx""vfe_lite",  "vfe_lite_ahb" },
  .clock_rate = { { 400000000 },
    { 400000000 },
    { 400000000, 480000000 },
    { 0 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID3 */
 {
  .regulators = {},
  .clock = { "vfe_lite_csid""vfe_lite_cphy_rx""vfe_lite",  "vfe_lite_ahb" },
  .clock_rate = { { 400000000 },
    { 400000000 },
    { 400000000, 480000000 },
    { 0 } },
  .reg = { "csid3" },
  .interrupt = { "csid3" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 }
};

static const struct camss_subdev_resources vfe_res_8250[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "camnoc_axi_src""slow_ahb_src""cpas_ahb",
      "camnoc_axi""vfe0_ahb""vfe0_areg""vfe0",
      "vfe0_axi""cam_hf_axi" },
  .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
    { 19200000, 80000000 },
    { 19200000 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 300000000, 400000000 },
    { 350000000, 475000000, 576000000, 720000000 },
    { 0 },
    { 0 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .pd_name = "ife0",
   .hw_ops = &vfe_ops_480,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE1 */
 {
  .regulators = {},
  .clock = { "camnoc_axi_src""slow_ahb_src""cpas_ahb",
      "camnoc_axi""vfe1_ahb""vfe1_areg""vfe1",
      "vfe1_axi""cam_hf_axi" },
  .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
    { 19200000, 80000000 },
    { 19200000 },
    { 0 },
    { 0 },
    { 100000000, 200000000, 300000000, 400000000 },
    { 350000000, 475000000, 576000000, 720000000 },
    { 0 },
    { 0 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 3,
   .has_pd = true,
   .pd_name = "ife1",
   .hw_ops = &vfe_ops_480,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE2 (lite) */
 {
  .regulators = {},
  .clock = { "camnoc_axi_src""slow_ahb_src""cpas_ahb",
      "camnoc_axi""vfe_lite_ahb""vfe_lite_axi",
      "vfe_lite""cam_hf_axi" },
  .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
    { 19200000, 80000000 },
    { 19200000 },
    { 0 },
    { 0 },
    { 0 },
    { 400000000, 480000000 },
    { 0 } },
  .reg = { "vfe_lite0" },
  .interrupt = { "vfe_lite0" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_480,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE3 (lite) */
 {
  .regulators = {},
  .clock = { "camnoc_axi_src""slow_ahb_src""cpas_ahb",
      "camnoc_axi""vfe_lite_ahb""vfe_lite_axi",
      "vfe_lite""cam_hf_axi" },
  .clock_rate = { { 19200000, 300000000, 400000000, 480000000 },
    { 19200000, 80000000 },
    { 19200000 },
    { 0 },
    { 0 },
    { 0 },
    { 400000000, 480000000 },
    { 0 } },
  .reg = { "vfe_lite1" },
  .interrupt = { "vfe_lite1" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_480,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
};

static const struct resources_icc icc_res_sm8250[] = {
 {
  .name = "cam_ahb",
  .icc_bw_tbl.avg = 38400,
  .icc_bw_tbl.peak = 76800,
 },
 {
  .name = "cam_hf_0_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "cam_sf_0_mnoc",
  .icc_bw_tbl.avg = 0,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "cam_sf_icp_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
};

static const struct camss_subdev_resources csiphy_res_7280[] = {
 /* CSIPHY0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },

  .clock = { "csiphy0""csiphy0_timer" },
  .clock_rate = { { 300000000, 400000000 },
    { 300000000 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845,
  }
 },
 /* CSIPHY1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },

  .clock = { "csiphy1""csiphy1_timer" },
  .clock_rate = { { 300000000, 400000000 },
    { 300000000 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845,
  }
 },
 /* CSIPHY2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },

  .clock = { "csiphy2""csiphy2_timer" },
  .clock_rate = { { 300000000, 400000000 },
    { 300000000 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845,
  }
 },
 /* CSIPHY3 */
 {
  .regulators = { "vdda-phy""vdda-pll" },

  .clock = { "csiphy3""csiphy3_timer" },
  .clock_rate = { { 300000000, 400000000 },
    { 300000000 } },
  .reg = { "csiphy3" },
  .interrupt = { "csiphy3" },
  .csiphy = {
   .id = 3,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845,
  }
 },
 /* CSIPHY4 */
 {
  .regulators = { "vdda-phy""vdda-pll" },

  .clock = { "csiphy4""csiphy4_timer" },
  .clock_rate = { { 300000000, 400000000 },
    { 300000000 } },
  .reg = { "csiphy4" },
  .interrupt = { "csiphy4" },
  .csiphy = {
   .id = 4,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845,
  }
 },
};

static const struct camss_subdev_resources csid_res_7280[] = {
 /* CSID0 */
 {
  .regulators = {},

  .clock = { "vfe0_csid""vfe0_cphy_rx""vfe0" },
  .clock_rate = { { 300000000, 400000000 },
    { 0 },
    { 380000000, 510000000, 637000000, 760000000 }
  },

  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .is_lite = false,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID1 */
 {
  .regulators = {},

  .clock = { "vfe1_csid""vfe1_cphy_rx""vfe1" },
  .clock_rate = { { 300000000, 400000000 },
    { 0 },
    { 380000000, 510000000, 637000000, 760000000 }
  },

  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .is_lite = false,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID2 */
 {
  .regulators = {},

  .clock = { "vfe2_csid""vfe2_cphy_rx""vfe2" },
  .clock_rate = { { 300000000, 400000000 },
    { 0 },
    { 380000000, 510000000, 637000000, 760000000 }
  },

  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .is_lite = false,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID3 */
 {
  .regulators = {},

  .clock = { "vfe_lite0_csid""vfe_lite0_cphy_rx""vfe_lite0" },
  .clock_rate = { { 300000000, 400000000 },
    { 0 },
    { 320000000, 400000000, 480000000, 600000000 }
  },

  .reg = { "csid_lite0" },
  .interrupt = { "csid_lite0" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID4 */
 {
  .regulators = {},

  .clock = { "vfe_lite1_csid""vfe_lite1_cphy_rx""vfe_lite1" },
  .clock_rate = { { 300000000, 400000000 },
    { 0 },
    { 320000000, 400000000, 480000000, 600000000 }
  },

  .reg = { "csid_lite1" },
  .interrupt = { "csid_lite1" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
};

static const struct camss_subdev_resources vfe_res_7280[] = {
 /* VFE0 */
 {
  .regulators = {},

  .clock = { "camnoc_axi""cpas_ahb""icp_ahb""vfe0",
      "vfe0_axi""gcc_axi_hf""gcc_axi_sf" },
  .clock_rate = { { 150000000, 240000000, 320000000, 400000000, 480000000 },
    { 80000000 },
    { 0 },
    { 380000000, 510000000, 637000000, 760000000 },
    { 0 },
    { 0 },
    { 0 } },

  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .is_lite = false,
   .has_pd = true,
   .pd_name = "ife0",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE1 */
 {
  .regulators = {},

  .clock = { "camnoc_axi""cpas_ahb""icp_ahb""vfe1",
      "vfe1_axi""gcc_axi_hf""gcc_axi_sf" },
  .clock_rate = { { 150000000, 240000000, 320000000, 400000000, 480000000 },
    { 80000000 },
    { 0 },
    { 380000000, 510000000, 637000000, 760000000 },
    { 0 },
    { 0 },
    { 0 } },

  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 3,
   .is_lite = false,
   .has_pd = true,
   .pd_name = "ife1",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE2 */
 {
  .regulators = {},

  .clock = { "camnoc_axi""cpas_ahb""icp_ahb""vfe2",
      "vfe2_axi""gcc_axi_hf""gcc_axi_sf" },
  .clock_rate = { { 150000000, 240000000, 320000000, 400000000, 480000000 },
    { 80000000 },
    { 0 },
    { 380000000, 510000000, 637000000, 760000000 },
    { 0 },
    { 0 },
    { 0 } },

  .reg = { "vfe2" },
  .interrupt = { "vfe2" },
  .vfe = {
   .line_num = 3,
   .is_lite = false,
   .hw_ops = &vfe_ops_170,
   .has_pd = true,
   .pd_name = "ife2",
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE3 (lite) */
 {
  .clock = { "camnoc_axi""cpas_ahb""icp_ahb",
      "vfe_lite0""gcc_axi_hf""gcc_axi_sf" },
  .clock_rate = { { 150000000, 240000000, 320000000, 400000000, 480000000 },
    { 80000000 },
    { 0 },
    { 320000000, 400000000, 480000000, 600000000 },
    { 0 },
    { 0 } },

  .regulators = {},
  .reg = { "vfe_lite0" },
  .interrupt = { "vfe_lite0" },
  .vfe = {
   .line_num = 4,
   .is_lite = true,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE4 (lite) */
 {
  .clock = { "camnoc_axi""cpas_ahb""icp_ahb",
      "vfe_lite1""gcc_axi_hf""gcc_axi_sf" },
  .clock_rate = { { 150000000, 240000000, 320000000, 400000000, 480000000 },
    { 80000000 },
    { 0 },
    { 320000000, 400000000, 480000000, 600000000 },
    { 0 },
    { 0 } },

  .regulators = {},
  .reg = { "vfe_lite1" },
  .interrupt = { "vfe_lite1" },
  .vfe = {
   .line_num = 4,
   .is_lite = true,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
};

static const struct resources_icc icc_res_sc7280[] = {
 {
  .name = "ahb",
  .icc_bw_tbl.avg = 38400,
  .icc_bw_tbl.peak = 76800,
 },
 {
  .name = "hf_0",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
};

static const struct camss_subdev_resources csiphy_res_sc8280xp[] = {
 /* CSIPHY0 */
 {
  .regulators = {},
  .clock = { "csiphy0""csiphy0_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY1 */
 {
  .regulators = {},
  .clock = { "csiphy1""csiphy1_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY2 */
 {
  .regulators = {},
  .clock = { "csiphy2""csiphy2_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY3 */
 {
  .regulators = {},
  .clock = { "csiphy3""csiphy3_timer" },
  .clock_rate = { { 400000000 },
    { 300000000 } },
  .reg = { "csiphy3" },
  .interrupt = { "csiphy3" },
  .csiphy = {
   .id = 3,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
};

static const struct camss_subdev_resources csid_res_sc8280xp[] = {
 /* CSID0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe0_csid""vfe0_cphy_rx""vfe0""vfe0_axi" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe1_csid""vfe1_cphy_rx""vfe1""vfe1_axi" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe2_csid""vfe2_cphy_rx""vfe2""vfe2_axi" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID3 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe3_csid""vfe3_cphy_rx""vfe3""vfe3_axi" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 },
    { 0 } },
  .reg = { "csid3" },
  .interrupt = { "csid3" },
  .csid = {
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID_LITE0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe_lite0_csid""vfe_lite0_cphy_rx""vfe_lite0" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 }, },
  .reg = { "csid0_lite" },
  .interrupt = { "csid0_lite" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID_LITE1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe_lite1_csid""vfe_lite1_cphy_rx""vfe_lite1" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 }, },
  .reg = { "csid1_lite" },
  .interrupt = { "csid1_lite" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID_LITE2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe_lite2_csid""vfe_lite2_cphy_rx""vfe_lite2" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 }, },
  .reg = { "csid2_lite" },
  .interrupt = { "csid2_lite" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID_LITE3 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "vfe_lite3_csid""vfe_lite3_cphy_rx""vfe_lite3" },
  .clock_rate = { { 400000000, 480000000, 600000000 },
    { 0 },
    { 0 }, },
  .reg = { "csid3_lite" },
  .interrupt = { "csid3_lite" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_gen2,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 }
};

static const struct camss_subdev_resources vfe_res_sc8280xp[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe0""vfe0_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 400000000, 558000000, 637000000, 760000000 },
    { 0 }, },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife0",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE1 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe1""vfe1_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 400000000, 558000000, 637000000, 760000000 },
    { 0 }, },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife1",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE2 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe2""vfe2_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 400000000, 558000000, 637000000, 760000000 },
    { 0 }, },
  .reg = { "vfe2" },
  .interrupt = { "vfe2" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife2",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE3 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe3""vfe3_axi" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 400000000, 558000000, 637000000, 760000000 },
    { 0 }, },
  .reg = { "vfe3" },
  .interrupt = { "vfe3" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife3",
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE_LITE_0 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe_lite0" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 320000000, 400000000, 480000000, 600000000 }, },
  .reg = { "vfe_lite0" },
  .interrupt = { "vfe_lite0" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE_LITE_1 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe_lite1" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 320000000, 400000000, 480000000, 600000000 }, },
  .reg = { "vfe_lite1" },
  .interrupt = { "vfe_lite1" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE_LITE_2 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe_lite2" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 320000000, 400000000, 480000000, 600000000, }, },
  .reg = { "vfe_lite2" },
  .interrupt = { "vfe_lite2" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE_LITE_3 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb""camnoc_axi""vfe_lite3" },
  .clock_rate = { { 0 },
    { 0 },
    { 19200000, 80000000},
    { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 },
    { 320000000, 400000000, 480000000, 600000000 }, },
  .reg = { "vfe_lite3" },
  .interrupt = { "vfe_lite3" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_170,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
};

static const struct resources_icc icc_res_sc8280xp[] = {
 {
  .name = "cam_ahb",
  .icc_bw_tbl.avg = 150000,
  .icc_bw_tbl.peak = 300000,
 },
 {
  .name = "cam_hf_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "cam_sf_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "cam_sf_icp_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
};

static const struct camss_subdev_resources csiphy_res_8550[] = {
 /* CSIPHY0 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy0""csiphy0_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY1 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy1""csiphy1_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY2 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy2""csiphy2_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY3 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy3""csiphy3_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy3" },
  .interrupt = { "csiphy3" },
  .csiphy = {
   .id = 3,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY4 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy4""csiphy4_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy4" },
  .interrupt = { "csiphy4" },
  .csiphy = {
   .id = 4,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY5 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy5""csiphy5_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy5" },
  .interrupt = { "csiphy5" },
  .csiphy = {
   .id = 5,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY6 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy6""csiphy6_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy6" },
  .interrupt = { "csiphy6" },
  .csiphy = {
   .id = 6,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 },
 /* CSIPHY7 */
 {
  .regulators = { "vdda-phy""vdda-pll" },
  .clock = { "csiphy7""csiphy7_timer" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000 } },
  .reg = { "csiphy7" },
  .interrupt = { "csiphy7" },
  .csiphy = {
   .id = 7,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  }
 }
};

static const struct resources_wrapper csid_wrapper_res_sm8550 = {
 .reg = "csid_wrapper",
};

static const struct camss_subdev_resources csid_res_8550[] = {
 /* CSID0 */
 {
  .regulators = {},
  .clock = { "csid""csiphy_rx" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000, 480000000 } },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .is_lite = false,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .hw_ops = &csid_ops_780,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID1 */
 {
  .regulators = {},
  .clock = { "csid""csiphy_rx" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000, 480000000 } },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .is_lite = false,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .hw_ops = &csid_ops_780,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID2 */
 {
  .regulators = {},
  .clock = { "csid""csiphy_rx" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000, 480000000 } },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .is_lite = false,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .hw_ops = &csid_ops_780,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID3 */
 {
  .regulators = {},
  .clock = { "vfe_lite_csid""vfe_lite_cphy_rx" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000, 480000000 } },
  .reg = { "csid_lite0" },
  .interrupt = { "csid_lite0" },
  .csid = {
   .is_lite = true,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .hw_ops = &csid_ops_780,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID4 */
 {
  .regulators = {},
  .clock = { "vfe_lite_csid""vfe_lite_cphy_rx" },
  .clock_rate = { { 400000000, 480000000 },
    { 400000000, 480000000 } },
  .reg = { "csid_lite1" },
  .interrupt = { "csid_lite1" },
  .csid = {
   .is_lite = true,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .hw_ops = &csid_ops_780,
   .formats = &csid_formats_gen2
  }
 }
};

static const struct camss_subdev_resources vfe_res_8550[] = {
 /* VFE0 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""cpas_ahb""cpas_fast_ahb_clk""vfe0_fast_ahb",
      "vfe0""cpas_vfe0""camnoc_axi" },
  .clock_rate = { { 0 },
    { 80000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 },
    { 466000000, 594000000, 675000000, 785000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 } },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 3,
   .is_lite = false,
   .has_pd = true,
   .pd_name = "ife0",
   .hw_ops = &vfe_ops_780,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE1 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""cpas_ahb""cpas_fast_ahb_clk""vfe1_fast_ahb",
      "vfe1""cpas_vfe1""camnoc_axi" },
  .clock_rate = { { 0 },
    { 80000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 },
    { 466000000, 594000000, 675000000, 785000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 } },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 3,
   .is_lite = false,
   .has_pd = true,
   .pd_name = "ife1",
   .hw_ops = &vfe_ops_780,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE2 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""cpas_ahb""cpas_fast_ahb_clk""vfe2_fast_ahb",
      "vfe2""cpas_vfe2""camnoc_axi" },
  .clock_rate = { { 0 },
    { 80000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 },
    { 466000000, 594000000, 675000000, 785000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 } },
  .reg = { "vfe2" },
  .interrupt = { "vfe2" },
  .vfe = {
   .line_num = 3,
   .is_lite = false,
   .has_pd = true,
   .pd_name = "ife2",
   .hw_ops = &vfe_ops_780,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE3 lite */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""cpas_ahb""cpas_fast_ahb_clk""vfe_lite_ahb",
      "vfe_lite""cpas_ife_lite""camnoc_axi" },
  .clock_rate = { { 0 },
    { 80000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 },
    { 400000000, 480000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 } },
  .reg = { "vfe_lite0" },
  .interrupt = { "vfe_lite0" },
  .vfe = {
   .line_num = 4,
   .is_lite = true,
   .hw_ops = &vfe_ops_780,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
 /* VFE4 lite */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""cpas_ahb""cpas_fast_ahb_clk""vfe_lite_ahb",
      "vfe_lite""cpas_ife_lite""camnoc_axi" },
  .clock_rate = { { 0 },
    { 80000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 },
    { 400000000, 480000000 },
    { 300000000, 400000000 },
    { 300000000, 400000000 } },
  .reg = { "vfe_lite1" },
  .interrupt = { "vfe_lite1" },
  .vfe = {
   .line_num = 4,
   .is_lite = true,
   .hw_ops = &vfe_ops_780,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  }
 },
};

static const struct resources_icc icc_res_sm8550[] = {
 {
  .name = "ahb",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "hf_0_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
};

static const struct camss_subdev_resources csiphy_res_x1e80100[] = {
 /* CSIPHY0 */
 {
  .regulators = { "vdd-csiphy-0p8",
    "vdd-csiphy-1p2" },
  .clock = { "csiphy0""csiphy0_timer" },
  .clock_rate = { { 300000000, 400000000, 480000000 },
    { 266666667, 400000000 } },
  .reg = { "csiphy0" },
  .interrupt = { "csiphy0" },
  .csiphy = {
   .id = 0,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  },
 },
 /* CSIPHY1 */
 {
  .regulators = { "vdd-csiphy-0p8",
    "vdd-csiphy-1p2" },
  .clock = { "csiphy1""csiphy1_timer" },
  .clock_rate = { { 300000000, 400000000, 480000000 },
    { 266666667, 400000000 } },
  .reg = { "csiphy1" },
  .interrupt = { "csiphy1" },
  .csiphy = {
   .id = 1,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  },
 },
 /* CSIPHY2 */
 {
  .regulators = { "vdd-csiphy-0p8",
    "vdd-csiphy-1p2" },
  .clock = { "csiphy2""csiphy2_timer" },
  .clock_rate = { { 300000000, 400000000, 480000000 },
    { 266666667, 400000000 } },
  .reg = { "csiphy2" },
  .interrupt = { "csiphy2" },
  .csiphy = {
   .id = 2,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  },
 },
 /* CSIPHY4 */
 {
  .regulators = { "vdd-csiphy-0p8",
    "vdd-csiphy-1p2" },
  .clock = { "csiphy4""csiphy4_timer" },
  .clock_rate = { { 300000000, 400000000, 480000000 },
    { 266666667, 400000000 } },
  .reg = { "csiphy4" },
  .interrupt = { "csiphy4" },
  .csiphy = {
   .id = 4,
   .hw_ops = &csiphy_ops_3ph_1_0,
   .formats = &csiphy_formats_sdm845
  },
 },
};

static const struct camss_subdev_resources csid_res_x1e80100[] = {
 /* CSID0 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb",
      "cpas_fast_ahb""csid""csid_csiphy_rx" },
  .clock_rate = { { 0 },
    { 0 },
    { 64000000, 80000000 },
    { 80000000,  100000000, 200000000,
      300000000, 400000000 },
    { 300000000, 400000000, 480000000 },
    { 300000000, 400000000, 480000000 }, },
  .reg = { "csid0" },
  .interrupt = { "csid0" },
  .csid = {
   .hw_ops = &csid_ops_680,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  },
 },
 /* CSID1 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb",
      "cpas_fast_ahb""csid""csid_csiphy_rx" },
  .clock_rate = { { 0 },
    { 0 },
    { 64000000, 80000000 },
    { 80000000,  100000000, 200000000,
      300000000, 400000000 },
    { 300000000, 400000000, 480000000 },
    { 300000000, 400000000, 480000000 }, },
  .reg = { "csid1" },
  .interrupt = { "csid1" },
  .csid = {
   .hw_ops = &csid_ops_680,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  },
 },
 /* CSID2 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb",
      "cpas_fast_ahb""csid""csid_csiphy_rx" },
  .clock_rate = { { 0 },
    { 0 },
    { 64000000, 80000000 },
    { 80000000,  100000000, 200000000,
      300000000, 400000000 },
    { 300000000, 400000000, 480000000 },
    { 300000000, 400000000, 480000000 }, },
  .reg = { "csid2" },
  .interrupt = { "csid2" },
  .csid = {
   .hw_ops = &csid_ops_680,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  },
 },
 /* CSID_LITE0 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb",
      "cpas_fast_ahb""csid""csid_csiphy_rx" },
  .clock_rate = { { 0 },
    { 0 },
    { 64000000, 80000000 },
    { 80000000,  100000000, 200000000,
      300000000, 400000000 },
    { 300000000, 400000000, 480000000 },
    { 300000000, 400000000, 480000000 }, },
  .reg = { "csid_lite0" },
  .interrupt = { "csid_lite0" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_680,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
 /* CSID_LITE1 */
 {
  .regulators = {},
  .clock = { "gcc_axi_hf""gcc_axi_sf""cpas_ahb",
      "cpas_fast_ahb""csid""csid_csiphy_rx" },
  .clock_rate = { { 0 },
    { 0 },
    { 64000000, 80000000 },
    { 80000000,  100000000, 200000000,
      300000000, 400000000 },
    { 300000000, 400000000, 480000000 },
    { 300000000, 400000000, 480000000 }, },

  .reg = { "csid_lite1" },
  .interrupt = { "csid_lite1" },
  .csid = {
   .is_lite = true,
   .hw_ops = &csid_ops_680,
   .parent_dev_ops = &vfe_parent_dev_ops,
   .formats = &csid_formats_gen2
  }
 },
};

static const struct camss_subdev_resources vfe_res_x1e80100[] = {
 /* IFE0 */
 {
  .regulators = {},
  .clock = {"camnoc_rt_axi""camnoc_nrt_axi""cpas_ahb",
     "cpas_fast_ahb""cpas_vfe0""vfe0_fast_ahb",
     "vfe0" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 345600000, 432000000, 594000000, 675000000,
      727000000 }, },
  .reg = { "vfe0" },
  .interrupt = { "vfe0" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife0",
   .hw_ops = &vfe_ops_680,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  },
 },
 /* IFE1 */
 {
  .regulators = {},
  .clock = { "camnoc_rt_axi""camnoc_nrt_axi""cpas_ahb",
      "cpas_fast_ahb""cpas_vfe1""vfe1_fast_ahb",
      "vfe1"  },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 345600000, 432000000, 594000000, 675000000,
      727000000 }, },
  .reg = { "vfe1" },
  .interrupt = { "vfe1" },
  .vfe = {
   .line_num = 4,
   .pd_name = "ife1",
   .hw_ops = &vfe_ops_680,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  },
 },
 /* IFE_LITE_0 */
 {
  .regulators = {},
  .clock = { "camnoc_rt_axi""camnoc_nrt_axi""cpas_ahb",
      "vfe_lite_ahb""cpas_vfe_lite""vfe_lite",
      "vfe_lite_csid" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 266666667, 400000000, 480000000 },
    { 266666667, 400000000, 480000000 }, },
  .reg = { "vfe_lite0" },
  .interrupt = { "vfe_lite0" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_680,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  },
 },
 /* IFE_LITE_1 */
 {
  .regulators = {},
  .clock = { "camnoc_rt_axi""camnoc_nrt_axi""cpas_ahb",
      "vfe_lite_ahb""cpas_vfe_lite""vfe_lite",
      "vfe_lite_csid" },
  .clock_rate = { { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 0 },
    { 266666667, 400000000, 480000000 },
    { 266666667, 400000000, 480000000 }, },
  .reg = { "vfe_lite1" },
  .interrupt = { "vfe_lite1" },
  .vfe = {
   .is_lite = true,
   .line_num = 4,
   .hw_ops = &vfe_ops_680,
   .formats_rdi = &vfe_formats_rdi_845,
   .formats_pix = &vfe_formats_pix_845
  },
 },
};

static const struct resources_icc icc_res_x1e80100[] = {
 {
  .name = "ahb",
  .icc_bw_tbl.avg = 150000,
  .icc_bw_tbl.peak = 300000,
 },
 {
  .name = "hf_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "sf_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
 {
  .name = "sf_icp_mnoc",
  .icc_bw_tbl.avg = 2097152,
  .icc_bw_tbl.peak = 2097152,
 },
};

static const struct resources_wrapper csid_wrapper_res_x1e80100 = {
 .reg = "csid_wrapper",
};

/*
 * camss_add_clock_margin - Add margin to clock frequency rate
 * @rate: Clock frequency rate
 *
 * When making calculations with physical clock frequency values
 * some safety margin must be added. Add it.
 */

inline void camss_add_clock_margin(u64 *rate)
{
 *rate *= CAMSS_CLOCK_MARGIN_NUMERATOR;
 *rate = div_u64(*rate, CAMSS_CLOCK_MARGIN_DENOMINATOR);
}

/*
 * camss_enable_clocks - Enable multiple clocks
 * @nclocks: Number of clocks in clock array
 * @clock: Clock array
 * @dev: Device
 *
 * Return 0 on success or a negative error code otherwise
 */

int camss_enable_clocks(int nclocks, struct camss_clock *clock,
   struct device *dev)
{
 int ret;
 int i;

 for (i = 0; i < nclocks; i++) {
  ret = clk_prepare_enable(clock[i].clk);
  if (ret) {
--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5
C=96 H=95 G=95

¤ Dauer der Verarbeitung: 0.28 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge