From: Jan Kotas <jank@cadence.com>
To: <maxime.ripard@bootlin.com>, <mchehab@kernel.org>,
<robh+dt@kernel.org>, <mark.rutland@arm.com>
Cc: <rafalc@cadence.com>, <linux-media@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Jan Kotas <jank@cadence.com>
Subject: [PATCH v2 3/4] media: Fix Lane mapping in Cadence CSI2TX
Date: Mon, 22 Jul 2019 09:22:22 +0100 [thread overview]
Message-ID: <20190722082223.18693-4-jank@cadence.com> (raw)
In-Reply-To: <20190722082223.18693-1-jank@cadence.com>
This patch fixes mapping of lanes in DPHY_CFG register
of the controller. In the register, bit 0 means first data lane.
In Linux we currently assume lane 0 is clock.
Signed-off-by: Jan Kotas <jank@cadence.com>
---
drivers/media/platform/cadence/cdns-csi2tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/cadence/cdns-csi2tx.c b/drivers/media/platform/cadence/cdns-csi2tx.c
index 232259c71..c72c8a065 100644
--- a/drivers/media/platform/cadence/cdns-csi2tx.c
+++ b/drivers/media/platform/cadence/cdns-csi2tx.c
@@ -236,7 +236,7 @@ static int csi2tx_start(struct csi2tx_priv *csi2tx)
/* Put our lanes (clock and data) out of reset */
reg = CSI2TX_DPHY_CFG_CLK_RESET | CSI2TX_DPHY_CFG_MODE_LPDT;
for (i = 0; i < csi2tx->num_lanes; i++)
- reg |= CSI2TX_DPHY_CFG_LANE_RESET(csi2tx->lanes[i]);
+ reg |= CSI2TX_DPHY_CFG_LANE_RESET(csi2tx->lanes[i] - 1);
writel(reg, csi2tx->base + CSI2TX_DPHY_CFG_REG);
udelay(10);
@@ -244,7 +244,7 @@ static int csi2tx_start(struct csi2tx_priv *csi2tx)
/* Enable our (clock and data) lanes */
reg |= CSI2TX_DPHY_CFG_CLK_ENABLE;
for (i = 0; i < csi2tx->num_lanes; i++)
- reg |= CSI2TX_DPHY_CFG_LANE_ENABLE(csi2tx->lanes[i]);
+ reg |= CSI2TX_DPHY_CFG_LANE_ENABLE(csi2tx->lanes[i] - 1);
writel(reg, csi2tx->base + CSI2TX_DPHY_CFG_REG);
udelay(10);
--
2.15.0
next prev parent reply other threads:[~2019-07-22 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 8:22 [PATCH v2 0/4] media: Add support for Cadence CSI2TX version 2.1 Jan Kotas
2019-07-22 8:22 ` [PATCH v2 1/4] media: dt-bindings: Update bindings " Jan Kotas
2019-07-22 8:22 ` [PATCH v2 2/4] media: Add lane checks for Cadence CSI2TX Jan Kotas
2019-07-22 8:22 ` Jan Kotas [this message]
2019-07-22 8:22 ` [PATCH v2 4/4] media: Add support for Cadence CSI2TX 2.1 Jan Kotas
2019-07-22 10:01 ` [PATCH v2 0/4] media: Add support for Cadence CSI2TX version 2.1 Maxime Ripard
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=20190722082223.18693-4-jank@cadence.com \
--to=jank@cadence.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=mchehab@kernel.org \
--cc=rafalc@cadence.com \
--cc=robh+dt@kernel.org \
/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).