Commit 26a839b3 authored by Jagan Teki's avatar Jagan Teki Committed by Maxime Ripard

drm/sun4i: dsi: Get the mod clock for A31

As per the user manual, look like mod clock is not mandatory
for all Allwinner MIPI DSI controllers, it is connected to
CLK_DSI_SCLK for A31 and not available in A64.

So, add compatible check for A31 and get mod clock accordingly.
Tested-by: default avatarMerlijn Wajer <merlijn@wizzup.org>
Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-4-jagan@amarulasolutions.com
parent db08ca5a
...@@ -1120,10 +1120,13 @@ static int sun6i_dsi_probe(struct platform_device *pdev) ...@@ -1120,10 +1120,13 @@ static int sun6i_dsi_probe(struct platform_device *pdev)
return PTR_ERR(dsi->reset); return PTR_ERR(dsi->reset);
} }
dsi->mod_clk = devm_clk_get(dev, "mod"); if (of_device_is_compatible(dev->of_node,
if (IS_ERR(dsi->mod_clk)) { "allwinner,sun6i-a31-mipi-dsi")) {
dev_err(dev, "Couldn't get the DSI mod clock\n"); dsi->mod_clk = devm_clk_get(dev, "mod");
return PTR_ERR(dsi->mod_clk); if (IS_ERR(dsi->mod_clk)) {
dev_err(dev, "Couldn't get the DSI mod clock\n");
return PTR_ERR(dsi->mod_clk);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment