Skip to content

Commit ec710af

Browse files
tmlindrobertfoss
authored andcommitted
drm/bridge: tc358775: Configure hs_rate and lp_rate
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> Reviewed-by: Robert Foss <rfoss@kernel.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-11-tony@atomide.com
1 parent ce2196d commit ec710af

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

drivers/gpu/drm/bridge/tc358775.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,19 @@ static int tc_attach_host(struct tc_data *tc)
635635
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
636636
MIPI_DSI_MODE_LPM;
637637

638+
/*
639+
* The hs_rate and lp_rate are data rate values. The HS mode is
640+
* differential, while the LP mode is single ended. As the HS mode
641+
* uses DDR, the DSI clock frequency is half the hs_rate. The 10 Mbs
642+
* data rate for LP mode is not specified in the bridge data sheet,
643+
* but seems to be part of the MIPI DSI spec.
644+
*/
645+
if (tc->type == TC358765)
646+
dsi->hs_rate = 800000000;
647+
else
648+
dsi->hs_rate = 1000000000;
649+
dsi->lp_rate = 10000000;
650+
638651
ret = devm_mipi_dsi_attach(dev, dsi);
639652
if (ret < 0) {
640653
dev_err(dev, "failed to attach dsi to host\n");

0 commit comments

Comments
 (0)