On Friday, July 18, 2025 6:19 PM Svyatoslav Ryhel wrote: > пт, 18 лип. 2025 р. о 12:15 Mikko Perttunen <mperttu...@nvidia.com> пише: > > On Thursday, July 17, 2025 11:21 PM Svyatoslav Ryhel wrote: > > > Tegra20/Tegra30 are fully compatible with existing tegra DSI driver > > > apart > > > > 'apart from' > > > > > clock configuration and MIPI calibration which are addressed by this > > > patch. > > > > > > Signed-off-by: Svyatoslav Ryhel <clamo...@gmail.com> > > > --- > > > > > > drivers/gpu/drm/tegra/drm.c | 2 ++ > > > drivers/gpu/drm/tegra/dsi.c | 69 ++++++++++++++++++++++--------------- > > > drivers/gpu/drm/tegra/dsi.h | 10 ++++++ > > > 3 files changed, 54 insertions(+), 27 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c > > > index 4596073fe28f..5d64cd57e764 100644 > > > --- a/drivers/gpu/drm/tegra/drm.c > > > +++ b/drivers/gpu/drm/tegra/drm.c > > > @@ -1359,10 +1359,12 @@ static SIMPLE_DEV_PM_OPS(host1x_drm_pm_ops, > > > host1x_drm_suspend, > > > > > > static const struct of_device_id host1x_drm_subdevs[] = { > > > > > > { .compatible = "nvidia,tegra20-dc", }, > > > > > > + { .compatible = "nvidia,tegra20-dsi", }, > > > > > > { .compatible = "nvidia,tegra20-hdmi", }, > > > { .compatible = "nvidia,tegra20-gr2d", }, > > > { .compatible = "nvidia,tegra20-gr3d", }, > > > { .compatible = "nvidia,tegra30-dc", }, > > > > > > + { .compatible = "nvidia,tegra30-dsi", }, > > > > > > { .compatible = "nvidia,tegra30-hdmi", }, > > > { .compatible = "nvidia,tegra30-gr2d", }, > > > { .compatible = "nvidia,tegra30-gr3d", }, > > > > > > diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c > > > index 3f91a24ebef2..85bcb8bee1ae 100644 > > > --- a/drivers/gpu/drm/tegra/dsi.c > > > +++ b/drivers/gpu/drm/tegra/dsi.c > > > @@ -662,39 +662,48 @@ static int tegra_dsi_pad_enable(struct tegra_dsi > > > *dsi) { > > > > > > u32 value; > > > > > > - value = DSI_PAD_CONTROL_VS1_PULLDN(0) | > > > DSI_PAD_CONTROL_VS1_PDIO(0); > > > - tegra_dsi_writel(dsi, value, DSI_PAD_CONTROL_0); > > > + /* Tegra20/30 uses DSIv0 while Tegra114+ uses DSIv1 */ > > > + if (of_device_is_compatible(dsi->dev->of_node, > > > "nvidia,tegra20-dsi") > > > > > > + of_device_is_compatible(dsi->dev->of_node, > > > "nvidia,tegra30-dsi")) > > > > You need to add "soc data" structures to the of_match table instead of > > checking for compatible string in the code itself. > > I assumed that introducing "soc data" for 2 occurrences would be excessive.
Even one occurrence is enough :) No device tree properties should be accessed after probe. Cheers, Mikko > > > Thanks, > > Mikko