summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvyatoslav Ryhel <clamor95@gmail.com>2025-02-21 14:06:00 +0200
committerSvyatoslav Ryhel <clamor95@gmail.com>2025-03-13 19:13:18 +0200
commit4b03bd25086b5ba7d481c1cd6ec2364b6aff70c2 (patch)
tree905f53997f0d4ac57a3788b452a84350df9a500e
parent86b0c2f2e8fed503a51065664cf41bd59dcdfe52 (diff)
video: bridge: ssd2825: set default minimum tx_clk
If TX_CLK is not set or gives an error, use SSD2825_REF_MIN_CLK. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
-rw-r--r--drivers/video/bridge/ssd2825.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/bridge/ssd2825.c b/drivers/video/bridge/ssd2825.c
index eafd9f55913..b8653cc7297 100644
--- a/drivers/video/bridge/ssd2825.c
+++ b/drivers/video/bridge/ssd2825.c
@@ -311,6 +311,9 @@ static void ssd2825_setup_pll(struct udevice *dev)
u8 hzd, hpd;
tx_freq_khz = clk_get_rate(priv->tx_clk) / 1000;
+ if (!tx_freq_khz || tx_freq_khz < 0)
+ tx_freq_khz = SSD2825_REF_MIN_CLK;
+
pd_lines = mipi_dsi_pixel_format_to_bpp(device->format);
pclk_mult = pd_lines / device->lanes + 1;
@@ -539,7 +542,7 @@ static int ssd2825_bridge_probe(struct udevice *dev)
}
/* get clk */
- priv->tx_clk = devm_clk_get(dev, "tx_clk");
+ priv->tx_clk = devm_clk_get_optional(dev, NULL);
if (IS_ERR(priv->tx_clk)) {
log_err("cannot get tx_clk: %ld\n", PTR_ERR(priv->tx_clk));
return PTR_ERR(priv->tx_clk);