Skip to content

Commit

Permalink
msm: camera: isp: Added PPI driver functionality
Browse files Browse the repository at this point in the history
PPI is a bridge between CSIPHY and CSID. Responsibilty of this driver is to
enable and configure PPI bridge from CSID as per the configuration.

Change-Id: I3e2a12043088335f62a54670167306d6084c7221
Signed-off-by: Vikram Sharma <[email protected]>
  • Loading branch information
Vikram Sharma authored and Gerrit - the friendly Code Review server committed Jul 31, 2019
1 parent 7f757e6 commit a3133d5
Show file tree
Hide file tree
Showing 9 changed files with 833 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ ccflags-y += -Idrivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/inclu
ccflags-y += -Idrivers/media/platform/msm/camera/cam_smmu/
ccflags-y += -Idrivers/media/platform/msm/camera/cam_req_mgr/

obj-$(CONFIG_SPECTRA_CAMERA) += cam_csid_ppi_dev.o cam_csid_ppi_core.o cam_csid_ppi170.o
obj-$(CONFIG_SPECTRA_CAMERA) += cam_ife_csid_dev.o cam_ife_csid_soc.o cam_ife_csid_core.o
obj-$(CONFIG_SPECTRA_CAMERA) += cam_ife_csid17x.o cam_ife_csid_lite17x.o
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

#include <linux/module.h>
#include "cam_csid_ppi_core.h"
#include "cam_csid_ppi170.h"
#include "cam_csid_ppi_dev.h"

#define CAM_PPI_DRV_NAME "ppi_170"
#define CAM_PPI_VERSION_V170 0x10070000

static struct cam_csid_ppi_hw_info cam_csid_ppi170_hw_info = {
.ppi_reg = &cam_csid_ppi_170_reg_offset,
};

static const struct of_device_id cam_csid_ppi170_dt_match[] = {
{
.compatible = "qcom,ppi170",
.data = &cam_csid_ppi170_hw_info,
},
{}
};

MODULE_DEVICE_TABLE(of, cam_csid_ppi170_dt_match);

static struct platform_driver cam_csid_ppi170_driver = {
.probe = cam_csid_ppi_probe,
.remove = cam_csid_ppi_remove,
.driver = {
.name = CAM_PPI_DRV_NAME,
.owner = THIS_MODULE,
.of_match_table = cam_csid_ppi170_dt_match,
.suppress_bind_attrs = true,
},
};

static int __init cam_csid_ppi170_init_module(void)
{
return platform_driver_register(&cam_csid_ppi170_driver);
}

static void __exit cam_csid_ppi170_exit_module(void)
{
platform_driver_unregister(&cam_csid_ppi170_driver);
}

module_init(cam_csid_ppi170_init_module);
MODULE_DESCRIPTION("CAM CSID_PPI170 driver");
MODULE_LICENSE("GPL v2");
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

#ifndef _CAM_CSID_PPI_170_H_
#define _CAM_CSID_PPI_170_H_

#include "cam_csid_ppi_core.h"

static struct cam_csid_ppi_reg_offset cam_csid_ppi_170_reg_offset = {
.ppi_hw_version_addr = 0,
.ppi_module_cfg_addr = 0x60,
.ppi_irq_status_addr = 0x68,
.ppi_irq_mask_addr = 0x6c,
.ppi_irq_set_addr = 0x70,
.ppi_irq_clear_addr = 0x74,
.ppi_irq_cmd_addr = 0x78,
.ppi_rst_cmd_addr = 0x7c,
.ppi_test_bus_ctrl_addr = 0x1f4,
.ppi_debug_addr = 0x1f8,
.ppi_spare_addr = 0x1fc,
};

#endif /*_CAM_CSID_PPI_170_H_ */
Loading

1 comment on commit a3133d5

@stefanhh0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit is already included in the commit with the ID: f5d777a and changed fixed in follow-up commits.

Please sign in to comment.