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

Commit 09295759 authored by Suresh Vankadara's avatar Suresh Vankadara
Browse files

msm: camera: cpas: Add support for holi camnoc



Holi has different version of camnoc and CPAS version
which requires separate register space and camnoc
interface changes and CPAS version change.
This change adds the same.

CRs-Fixed: 2701462
Change-Id: I9fbfab592278ba7804809872b4b4b235895477f2
Signed-off-by: default avatarSuresh Vankadara <svankada@codeaurora.org>
parent f65f27de
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@ ifeq ($(CONFIG_ARCH_LAHAINA), y)
include $(srctree)/techpack/camera/config/lahainacamera.conf
endif

ifeq ($(CONFIG_ARCH_HOLI), y)
include $(srctree)/techpack/camera/config/holicamera.conf
endif

ifeq ($(CONFIG_ARCH_KONA), y)
LINUXINCLUDE    += \
		-include $(srctree)/techpack/camera/config/konacameraconf.h
@@ -37,6 +41,12 @@ ifeq ($(CONFIG_ARCH_LAHAINA), y)
LINUXINCLUDE    += \
		-include $(srctree)/techpack/camera/config/lahainacameraconf.h
endif

ifeq ($(CONFIG_ARCH_HOLI), y)
LINUXINCLUDE    += \
		-include $(srctree)/techpack/camera/config/holicameraconf.h
endif

endif

ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m))

config/holicamera.conf

0 → 100644
+17 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) 2020, The Linux Foundation. All rights reserved.

ifeq ($(CONFIG_QGKI),y)
export CONFIG_SPECTRA_CAMERA=y
$(info "SPECTRA_CAMERA IS STATIC")
else
$(info "SPECTRA_CAMERA IS MODULAR")
export CONFIG_SPECTRA_CAMERA=m
endif

ifneq (,$(filter $(CONFIG_SPECTRA_CAMERA), y m))
export CONFIG_SPECTRA_ISP=y
export CONFIG_SPECTRA_OPE=y
export CONFIG_SPECTRA_TFE=y
export CONFIG_SPECTRA_SENSOR=y
endif
+10 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 */

#define CONFIG_SPECTRA_CAMERA      1
#define CONFIG_SPECTRA_ISP         1
#define CONFIG_SPECTRA_OPE         1
#define CONFIG_SPECTRA_TFE         1
#define CONFIG_SPECTRA_SENSOR      1
+17 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "cpastop_v580_100.h"
#include "cpastop_v540_100.h"
#include "cpastop_v520_100.h"
#include "cpastop_v545_100.h"

struct cam_camnoc_info *camnoc_info;

@@ -106,6 +107,15 @@ static const uint32_t cam_cpas_hw_version_map
		0,
		0,
	},
	/* for camera_545 */
	{
		CAM_CPAS_TITAN_545_V100,
		0,
		0,
		0,
		0,
		0,
	},
};

static int cam_cpas_translate_camera_cpas_version_id(
@@ -145,6 +155,10 @@ static int cam_cpas_translate_camera_cpas_version_id(
		*cam_version_id = CAM_CPAS_CAMERA_VERSION_ID_580;
		break;

	case CAM_CPAS_CAMERA_VERSION_545:
		*cam_version_id = CAM_CPAS_CAMERA_VERSION_ID_545;
		break;

	default:
		CAM_ERR(CAM_CPAS, "Invalid cam version %u",
			cam_version);
@@ -747,6 +761,9 @@ static int cam_cpastop_init_hw_version(struct cam_hw_info *cpas_hw,
	case CAM_CPAS_TITAN_520_V100:
		camnoc_info = &cam520_cpas100_camnoc_info;
		break;
	case CAM_CPAS_TITAN_545_V100:
		camnoc_info = &cam545_cpas100_camnoc_info;
		break;
	default:
		CAM_ERR(CAM_CPAS, "Camera Version not supported %d.%d.%d",
			hw_caps->camera_version.major,
+5 −1
Original line number Diff line number Diff line
@@ -115,7 +115,9 @@ enum cam_camnoc_hw_irq_type {
 * @CAM_CAMNOC_JPEG: Indicates JPEG HW connection to camnoc
 * @CAM_CAMNOC_FD: Indicates FD HW connection to camnoc
 * @CAM_CAMNOC_ICP: Indicates ICP HW connection to camnoc
 * @CAM_CAMNOC_TFE: Indicates TFE HW connection to camnoc
 * @CAM_CAMNOC_TFE: Indicates TFE0 HW connection to camnoc
 * @CAM_CAMNOC_TFE_1: Indicates TFE1 HW connection to camnoc
 * @CAM_CAMNOC_TFE_2: Indicates TFE2 HW connection to camnoc
 * @CAM_CAMNOC_OPE: Indicates OPE HW connection to camnoc
 */
enum cam_camnoc_port_type {
@@ -142,6 +144,8 @@ enum cam_camnoc_port_type {
	CAM_CAMNOC_FD,
	CAM_CAMNOC_ICP,
	CAM_CAMNOC_TFE,
	CAM_CAMNOC_TFE_1,
	CAM_CAMNOC_TFE_2,
	CAM_CAMNOC_OPE,
};

Loading