-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Vikram Sharma
authored and
Gerrit - the friendly Code Review server
committed
Jul 31, 2019
1 parent
7f757e6
commit a3133d5
Showing
9 changed files
with
833 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_csid_ppi170.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
32 changes: 32 additions & 0 deletions
32
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_csid_ppi170.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_ */ |
Oops, something went wrong.
a3133d5
There was a problem hiding this comment.
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.