From: Fabio Estevam <festevam@gmail.com>
To: victor.liu@nxp.com
Cc: marek.vasut@mailbox.org, neil.armstrong@linaro.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
frank.li@nxp.com, Fabio Estevam <festevam@nabladev.com>
Subject: [PATCH v3 2/2] drm/bridge: fsl-ldb: Allow the termination resistor to be enabled
Date: Tue, 20 Jan 2026 20:19:30 -0300 [thread overview]
Message-ID: <20260120231930.2782444-2-festevam@gmail.com> (raw)
In-Reply-To: <20260120231930.2782444-1-festevam@gmail.com>
From: Fabio Estevam <festevam@nabladev.com>
The LVDS Control Register (LVDS_CTRL) register has an HS_EN bit that allows
the 100 Ohm termination resistor in the chip to be enabled.
Add support to setting the HS_EN bit when the optional property
"nxp,enable-termination-resistor" is present.
The motivation for introducing this property was a custom i.MX8MP board
that was showing visual artifacts. After enabling the 100 Ohm termination
resistor the LVDS signal quality improved causing the artifacts to
disappear.
Signed-off-by: Fabio Estevam <festevam@nabladev.com>
---
Changes since v2:
- Rename variable to 'use_termination_resistor'. (Liu Ying)
- Remove clearing the LVDS_CTRL_HS_EN bit. (Liu Ying)
- Use dev->of_node. (Liu Ying)
drivers/gpu/drm/bridge/fsl-ldb.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c
index 5c3cf37200bc..7b71cde173e0 100644
--- a/drivers/gpu/drm/bridge/fsl-ldb.c
+++ b/drivers/gpu/drm/bridge/fsl-ldb.c
@@ -92,6 +92,7 @@ struct fsl_ldb {
const struct fsl_ldb_devdata *devdata;
bool ch0_enabled;
bool ch1_enabled;
+ bool use_termination_resistor;
};
static bool fsl_ldb_is_dual(const struct fsl_ldb *fsl_ldb)
@@ -212,6 +213,9 @@ static void fsl_ldb_atomic_enable(struct drm_bridge *bridge,
/* Program LVDS_CTRL */
reg = LVDS_CTRL_CC_ADJ(2) | LVDS_CTRL_PRE_EMPH_EN |
LVDS_CTRL_PRE_EMPH_ADJ(3) | LVDS_CTRL_VBG_EN;
+
+ if (fsl_ldb->use_termination_resistor)
+ reg |= LVDS_CTRL_HS_EN;
regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->lvds_ctrl, reg);
/* Wait for VBG to stabilize. */
@@ -340,6 +344,9 @@ static int fsl_ldb_probe(struct platform_device *pdev)
if (IS_ERR(panel))
return PTR_ERR(panel);
+ if (of_property_present(dev->of_node, "nxp,enable-termination-resistor"))
+ fsl_ldb->use_termination_resistor = true;
+
fsl_ldb->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
if (IS_ERR(fsl_ldb->panel_bridge))
return PTR_ERR(fsl_ldb->panel_bridge);
--
2.34.1
next prev parent reply other threads:[~2026-01-20 23:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 23:19 [PATCH v3 1/2] dt-bindings: display: bridge: ldb: Document nxp,enable-termination-resistor Fabio Estevam
2026-01-20 23:19 ` Fabio Estevam [this message]
2026-01-21 8:24 ` [PATCH v3 2/2] drm/bridge: fsl-ldb: Allow the termination resistor to be enabled Liu Ying
2026-01-27 11:37 ` Fabio Estevam
2026-01-28 3:41 ` Liu Ying
2026-01-21 2:36 ` [PATCH v3 1/2] dt-bindings: display: bridge: ldb: Document nxp,enable-termination-resistor Rob Herring (Arm)
2026-01-28 3:40 ` Liu Ying
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=20260120231930.2782444-2-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@nabladev.com \
--cc=frank.li@nxp.com \
--cc=krzk+dt@kernel.org \
--cc=marek.vasut@mailbox.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=victor.liu@nxp.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