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

Commit f1388330 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: Version changes for new csid on MSM8917"

parents 3b4dd640 c4805881
Loading
Loading
Loading
Loading
+63 −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 MSM_CSID_3_4_3_HWREG_H
#define MSM_CSID_3_4_3_HWREG_H

#include <sensor/csid/msm_csid.h>

static uint8_t csid_lane_assign_v3_4_3[PHY_LANE_MAX] = {0, 4, 1, 2, 3};
static struct csid_reg_parms_t csid_v3_4_3 = {
	/* MIPI	CSID registers */
	0x0,
	0x4,
	0x8,
	0xC,
	0x10,
	0x14,
	0x18,
	0x1C,
	0x20,
	0x60,
	0x64,
	0x68,
	0x6C,
	0x70,
	0x74,
	0x78,
	0x7C,
	0x80,
	0x84,
	0x88,
	0x8C,
	0x90,
	0x94,
	0x98,
	0xA0,
	0xA4,
	0xAC,
	0xB0,
	0xB4,
	11,
	0x7FFF,
	0x4,
	17,
	0x30040003,
	0xFFFFFFFF,
	0xFFFFFFFF,
	0xFFFFFFFF,
	0x7f010800,
	20,
	0xFFFFFFFF,
	0xFFFFFFFF,
};
#endif
+8 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include "include/msm_csid_3_5_hwreg.h"
#include "include/msm_csid_3_4_1_hwreg.h"
#include "include/msm_csid_3_4_2_hwreg.h"
#include "include/msm_csid_3_4_3_hwreg.h"
#include "include/msm_csid_3_6_0_hwreg.h"
#include "include/msm_csid_3_5_1_hwreg.h"
#include "cam_hw_ops.h"
@@ -42,6 +43,7 @@
#define CSID_VERSION_V34                      0x30040000
#define CSID_VERSION_V34_1                    0x30040001
#define CSID_VERSION_V34_2                    0x30040002
#define CSID_VERSION_V34_3                    0x30040003
#define CSID_VERSION_V36                      0x30060000
#define CSID_VERSION_V37                      0x30070000
#define CSID_VERSION_V35                      0x30050000
@@ -1178,6 +1180,12 @@ static int csid_probe(struct platform_device *pdev)
		new_csid_dev->hw_dts_version = CSID_VERSION_V34_2;
		new_csid_dev->ctrl_reg->csid_lane_assign =
			csid_lane_assign_v3_4_2;
	} else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node,
		"qcom,csid-v3.4.3")) {
		new_csid_dev->ctrl_reg->csid_reg = csid_v3_4_3;
		new_csid_dev->hw_dts_version = CSID_VERSION_V34_3;
		new_csid_dev->ctrl_reg->csid_lane_assign =
			csid_lane_assign_v3_4_3;
	} else if (of_device_is_compatible(new_csid_dev->pdev->dev.of_node,
		"qcom,csid-v3.6.0")) {
		new_csid_dev->ctrl_reg->csid_reg = csid_v3_6_0;