Commit c92ecb4e authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Heiko Stuebner

drm/rockchip: dsi: add own additional pclk handling

In a followup patch, we'll need to access the pclk ourself to enable some
functionality, so get and store it in the rockchip dw-dsi variant as well.

Clocks are refcounted, so possible cascading enablements are
no problem.
Signed-off-by: default avatarHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Tested-by: default avatarSebastian Fricke <sebastian.fricke@posteo.net>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210210111020.2476369-2-heiko@sntech.de
parent 1f49bf8b
...@@ -223,6 +223,7 @@ struct dw_mipi_dsi_rockchip { ...@@ -223,6 +223,7 @@ struct dw_mipi_dsi_rockchip {
void __iomem *base; void __iomem *base;
struct regmap *grf_regmap; struct regmap *grf_regmap;
struct clk *pclk;
struct clk *pllref_clk; struct clk *pllref_clk;
struct clk *grf_clk; struct clk *grf_clk;
struct clk *phy_cfg_clk; struct clk *phy_cfg_clk;
...@@ -1065,6 +1066,13 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev) ...@@ -1065,6 +1066,13 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
return ret; return ret;
} }
dsi->pclk = devm_clk_get(dev, "pclk");
if (IS_ERR(dsi->pclk)) {
ret = PTR_ERR(dsi->pclk);
DRM_DEV_ERROR(dev, "Unable to get pclk: %d\n", ret);
return ret;
}
dsi->pllref_clk = devm_clk_get(dev, "ref"); dsi->pllref_clk = devm_clk_get(dev, "ref");
if (IS_ERR(dsi->pllref_clk)) { if (IS_ERR(dsi->pllref_clk)) {
if (dsi->phy) { if (dsi->phy) {
......
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