Skip to content

Commit a3133d5

Browse files
Vikram SharmaGerrit - the friendly Code Review server
authored andcommitted
msm: camera: isp: Added PPI driver functionality
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]>
1 parent 7f757e6 commit a3133d5

File tree

9 files changed

+833
-13
lines changed

9 files changed

+833
-13
lines changed

drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ ccflags-y += -Idrivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/inclu
88
ccflags-y += -Idrivers/media/platform/msm/camera/cam_smmu/
99
ccflags-y += -Idrivers/media/platform/msm/camera/cam_req_mgr/
1010

11+
obj-$(CONFIG_SPECTRA_CAMERA) += cam_csid_ppi_dev.o cam_csid_ppi_core.o cam_csid_ppi170.o
1112
obj-$(CONFIG_SPECTRA_CAMERA) += cam_ife_csid_dev.o cam_ife_csid_soc.o cam_ife_csid_core.o
1213
obj-$(CONFIG_SPECTRA_CAMERA) += cam_ife_csid17x.o cam_ife_csid_lite17x.o
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
2+
*
3+
* This program is free software; you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License version 2 and
5+
* only version 2 as published by the Free Software Foundation.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
* GNU General Public License for more details.
11+
*/
12+
13+
#include <linux/module.h>
14+
#include "cam_csid_ppi_core.h"
15+
#include "cam_csid_ppi170.h"
16+
#include "cam_csid_ppi_dev.h"
17+
18+
#define CAM_PPI_DRV_NAME "ppi_170"
19+
#define CAM_PPI_VERSION_V170 0x10070000
20+
21+
static struct cam_csid_ppi_hw_info cam_csid_ppi170_hw_info = {
22+
.ppi_reg = &cam_csid_ppi_170_reg_offset,
23+
};
24+
25+
static const struct of_device_id cam_csid_ppi170_dt_match[] = {
26+
{
27+
.compatible = "qcom,ppi170",
28+
.data = &cam_csid_ppi170_hw_info,
29+
},
30+
{}
31+
};
32+
33+
MODULE_DEVICE_TABLE(of, cam_csid_ppi170_dt_match);
34+
35+
static struct platform_driver cam_csid_ppi170_driver = {
36+
.probe = cam_csid_ppi_probe,
37+
.remove = cam_csid_ppi_remove,
38+
.driver = {
39+
.name = CAM_PPI_DRV_NAME,
40+
.owner = THIS_MODULE,
41+
.of_match_table = cam_csid_ppi170_dt_match,
42+
.suppress_bind_attrs = true,
43+
},
44+
};
45+
46+
static int __init cam_csid_ppi170_init_module(void)
47+
{
48+
return platform_driver_register(&cam_csid_ppi170_driver);
49+
}
50+
51+
static void __exit cam_csid_ppi170_exit_module(void)
52+
{
53+
platform_driver_unregister(&cam_csid_ppi170_driver);
54+
}
55+
56+
module_init(cam_csid_ppi170_init_module);
57+
MODULE_DESCRIPTION("CAM CSID_PPI170 driver");
58+
MODULE_LICENSE("GPL v2");
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
2+
*
3+
* This program is free software; you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License version 2 and
5+
* only version 2 as published by the Free Software Foundation.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
* GNU General Public License for more details.
11+
*/
12+
13+
#ifndef _CAM_CSID_PPI_170_H_
14+
#define _CAM_CSID_PPI_170_H_
15+
16+
#include "cam_csid_ppi_core.h"
17+
18+
static struct cam_csid_ppi_reg_offset cam_csid_ppi_170_reg_offset = {
19+
.ppi_hw_version_addr = 0,
20+
.ppi_module_cfg_addr = 0x60,
21+
.ppi_irq_status_addr = 0x68,
22+
.ppi_irq_mask_addr = 0x6c,
23+
.ppi_irq_set_addr = 0x70,
24+
.ppi_irq_clear_addr = 0x74,
25+
.ppi_irq_cmd_addr = 0x78,
26+
.ppi_rst_cmd_addr = 0x7c,
27+
.ppi_test_bus_ctrl_addr = 0x1f4,
28+
.ppi_debug_addr = 0x1f8,
29+
.ppi_spare_addr = 0x1fc,
30+
};
31+
32+
#endif /*_CAM_CSID_PPI_170_H_ */

0 commit comments

Comments
 (0)