linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kholk11@gmail.com
To: todor.too@gmail.com
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	mchehab@kernel.org, robh+dt@kernel.org, marijns95@gmail.com,
	konradybcio@gmail.com, martin.botka1@gmail.com,
	linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	robert.foss@linaro.org,
	AngeloGioacchino Del Regno <kholk11@gmail.com>
Subject: [PATCH v2 5/7] media: camss: csiphy-3ph: Add support for SDM630/660
Date: Thu, 22 Oct 2020 19:47:04 +0200	[thread overview]
Message-ID: <20201022174706.8813-6-kholk11@gmail.com> (raw)
In-Reply-To: <20201022174706.8813-1-kholk11@gmail.com>

From: AngeloGioacchino Del Regno <kholk11@gmail.com>

The CSIPHY on SDM630/660 needs a slightly longer T_HS_CLK_MISS
configuration on lanes CFG4.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
---
 drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
index 2e65caf1ecae..97cb9de85031 100644
--- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
+++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2016-2018 Linaro Ltd.
  */
 
+#include "camss.h"
 #include "camss-csiphy.h"
 
 #include <linux/delay.h>
@@ -21,6 +22,7 @@
 #define CSIPHY_3PH_LNn_CFG3(n)			(0x008 + 0x100 * (n))
 #define CSIPHY_3PH_LNn_CFG4(n)			(0x00c + 0x100 * (n))
 #define CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS	0xa4
+#define CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS_660	0xa5
 #define CSIPHY_3PH_LNn_CFG5(n)			(0x010 + 0x100 * (n))
 #define CSIPHY_3PH_LNn_CFG5_T_HS_DTERM		0x02
 #define CSIPHY_3PH_LNn_CFG5_HS_REC_EQ_FQ_INT	0x50
@@ -198,7 +200,10 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy,
 	val = CSIPHY_3PH_LNn_CFG1_SWI_REC_DLY_PRG;
 	writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG1(l));
 
-	val = CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS;
+	if (csiphy->camss->version == CAMSS_660)
+		val = CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS_660;
+	else
+		val = CSIPHY_3PH_LNn_CFG4_T_HS_CLK_MISS;
 	writel_relaxed(val, csiphy->base + CSIPHY_3PH_LNn_CFG4(l));
 
 	val = CSIPHY_3PH_LNn_MISC1_IS_CLKLANE;
-- 
2.28.0


  parent reply	other threads:[~2020-10-22 17:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 17:46 [PATCH v2 0/7] Add support for SDM630/660 Camera Subsystem kholk11
2020-10-22 17:47 ` [PATCH v2 1/7] media: camss: ispif: Correctly reset based on the VFE ID kholk11
2022-05-25  9:03   ` Vladimir Zapolskiy
2022-05-25 11:33     ` Dmitry Baryshkov
2020-10-22 17:47 ` [PATCH v2 2/7] media: camss: vfe-4-7: Rename get_ub_size, set_qos, set_ds, wm_enable kholk11
2020-10-22 17:47 ` [PATCH v2 3/7] media: camss: vfe: Add support for VFE 4.8 kholk11
2020-10-22 17:47 ` [PATCH v2 4/7] media: camss: Add support for SDM630/636/660 camera subsystem kholk11
2020-10-22 17:47 ` kholk11 [this message]
2020-10-22 17:47 ` [PATCH v2 6/7] media: dt-bindings: media: qcom,camss: Add bindings for SDM660 camss kholk11
2020-10-30 15:43   ` Rob Herring
2020-10-22 17:47 ` [PATCH v2 7/7] media: camss: csiphy: Set rate on csiX_phy clock on SDM630/660 kholk11
2020-10-26 19:50 ` [PATCH v2 0/7] Add support for SDM630/660 Camera Subsystem Robert Foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022174706.8813-6-kholk11@gmail.com \
    --to=kholk11@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marijns95@gmail.com \
    --cc=martin.botka1@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robert.foss@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=todor.too@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).