From: Tony Lindgren <tony@atomide.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>, Simha BN <simhavcs@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Michael Walle <mwalle@kernel.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
Subject: [PATCH v5 10/10] drm/bridge: tc358775: Configure hs_rate and lp_rate
Date: Sun, 25 Feb 2024 08:19:39 +0200 [thread overview]
Message-ID: <20240225062008.33191-11-tony@atomide.com> (raw)
In-Reply-To: <20240225062008.33191-1-tony@atomide.com>
The hs_rate and lp_rate may be used by the dsi host for timing
calculations. The tc358775 has a maximum bit rate of 1 Gbps/lane,
tc358765 has maximurate of 800 Mbps per lane.
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/gpu/drm/bridge/tc358775.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
--- a/drivers/gpu/drm/bridge/tc358775.c
+++ b/drivers/gpu/drm/bridge/tc358775.c
@@ -637,6 +637,19 @@ static int tc_attach_host(struct tc_data *tc)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM;
+ /*
+ * The hs_rate and lp_rate are data rate values. The HS mode is
+ * differential, while the LP mode is single ended. As the HS mode
+ * uses DDR, the DSI clock frequency is half the hs_rate. The 10 Mbs
+ * data rate for LP mode is not specified in the bridge data sheet,
+ * but seems to be part of the MIPI DSI spec.
+ */
+ if (tc->type == TC358765)
+ dsi->hs_rate = 800000000;
+ else
+ dsi->hs_rate = 1000000000;
+ dsi->lp_rate = 10000000;
+
ret = devm_mipi_dsi_attach(dev, dsi);
if (ret < 0) {
dev_err(dev, "failed to attach dsi to host\n");
--
2.43.1
next prev parent reply other threads:[~2024-02-25 6:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 6:19 [PATCH v5 00/10] Improvments for tc358775 with support for tc358765 Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 01/10] dt-bindings: display: bridge: tc358775: make stby gpio optional Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 02/10] dt-bindings: display: bridge: tc358775: Add data-lanes Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 03/10] dt-bindings: display: bridge: tc358775: Add support for tc358765 Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 04/10] drm/bridge: tc358775: fix support for jeida-18 and jeida-24 Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 05/10] drm/bridge: tc358775: make standby GPIO optional Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 06/10] drm/bridge: tc358775: Get bridge data lanes instead of the DSI host lanes Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 07/10] drm/bridge: tc358775: Add burst and low-power modes Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 08/10] drm/bridge: tc358775: Enable pre_enable_prev_first flag Tony Lindgren
2024-02-25 6:19 ` [PATCH v5 09/10] drm/bridge: tc358775: Add support for tc358765 Tony Lindgren
2024-02-25 6:19 ` Tony Lindgren [this message]
2024-04-02 7:00 ` [PATCH v5 00/10] Improvments for tc358775 with " Michael Walle
2024-04-23 15:38 ` 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=20240225062008.33191-11-tony@atomide.com \
--to=tony@atomide.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=mwalle@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=simhavcs@gmail.com \
--cc=tzimmermann@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.