Skip to content

Commit

Permalink
drm/bridge: tc358775: Configure hs_rate and lp_rate
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tmlind authored and robertfoss committed Apr 23, 2024
1 parent ce2196d commit ec710af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/gpu/drm/bridge/tc358775.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,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");
Expand Down

0 comments on commit ec710af

Please sign in to comment.