Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ea03064 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: fd: Add support for fd v5 hw" into dev/msm-4.9-camx

parents 87085f2f 9af66407
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ about the device register map, interrupt map, clocks, regulators.
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,fd41".
  Definition: Should be one of "qcom,fd41", "qcom,fd501".

- reg-names
  Usage: optional
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, 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
@@ -22,6 +22,7 @@
#include "cam_fd_hw_core.h"
#include "cam_fd_hw_soc.h"
#include "cam_fd_hw_v41.h"
#include "cam_fd_hw_v501.h"

static int cam_fd_hw_dev_probe(struct platform_device *pdev)
{
@@ -193,6 +194,10 @@ static const struct of_device_id cam_fd_hw_dt_match[] = {
		.compatible = "qcom,fd41",
		.data = &cam_fd_wrapper120_core410_info,
	},
	{
		.compatible = "qcom,fd501",
		.data = &cam_fd_wrapper200_core501_info,
	},
	{}
};
MODULE_DEVICE_TABLE(of, cam_fd_hw_dt_match);
+70 −0
Original line number Diff line number Diff line
/* Copyright (c) 2018, 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_FD_HW_V501_H_
#define _CAM_FD_HW_V501_H_

static struct cam_fd_hw_static_info cam_fd_wrapper200_core501_info = {
	.core_version = {
		.major  = 5,
		.minor  = 0,
		.incr   = 1,
	},
	.wrapper_version = {
		.major  = 2,
		.minor  = 0,
		.incr   = 0,
	},
	.core_regs = {
		.version               = 0x38,
		.control               = 0x0,
		.result_cnt            = 0x4,
		.result_addr           = 0x20,
		.image_addr            = 0x24,
		.work_addr             = 0x28,
		.ro_mode               = 0x34,
		.results_reg_base      = 0x400,
		.raw_results_reg_base  = 0x800,
	},
	.wrapper_regs = {
		.wrapper_version       = 0x0,
		.cgc_disable           = 0x4,
		.hw_stop               = 0x8,
		.sw_reset              = 0x10,
		.vbif_req_priority     = 0x20,
		.vbif_priority_level   = 0x24,
		.vbif_done_status      = 0x34,
		.irq_mask              = 0x50,
		.irq_status            = 0x54,
		.irq_clear             = 0x58,
	},
	.results = {
		.max_faces             = 35,
		.per_face_entries      = 4,
		.raw_results_available = true,
		.raw_results_entries   = 512,
	},
	.enable_errata_wa = {
		.single_irq_only         = true,
		.ro_mode_enable_always   = true,
		.ro_mode_results_invalid = true,
	},
	.irq_mask = CAM_FD_IRQ_TO_MASK(CAM_FD_IRQ_FRAME_DONE) |
		CAM_FD_IRQ_TO_MASK(CAM_FD_IRQ_HALT_DONE) |
		CAM_FD_IRQ_TO_MASK(CAM_FD_IRQ_RESET_DONE),
	.qos_priority       = 4,
	.qos_priority_level = 4,
	.supported_modes    = CAM_FD_MODE_FACEDETECTION | CAM_FD_MODE_PYRAMID,
	.ro_mode_supported  = true,
};

#endif /* _CAM_FD_HW_V501_H_ */