[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210210111020.2476369-2-heiko@sntech.de>
Date: Wed, 10 Feb 2021 12:10:15 +0100
From: Heiko Stuebner <heiko@...ech.de>
To: dri-devel@...ts.freedesktop.org
Cc: devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
hjc@...k-chips.com, heiko@...ech.de, robh+dt@...nel.org,
sebastian.fricke@...teo.net, linux-media@...r.kernel.org,
dafna.hirschfeld@...labora.com, helen.koike@...labora.com,
ezequiel@...labora.com, cmuellner@...ux.com,
Heiko Stuebner <heiko.stuebner@...obroma-systems.com>
Subject: [PATCH v2 1/6] drm/rockchip: dsi: add own additional pclk handling
From: Heiko Stuebner <heiko.stuebner@...obroma-systems.com>
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: Heiko Stuebner <heiko.stuebner@...obroma-systems.com>
Tested-by: Sebastian Fricke <sebastian.fricke@...teo.net>
---
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 24a71091759c..18e112e30f6e 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -223,6 +223,7 @@ struct dw_mipi_dsi_rockchip {
void __iomem *base;
struct regmap *grf_regmap;
+ struct clk *pclk;
struct clk *pllref_clk;
struct clk *grf_clk;
struct clk *phy_cfg_clk;
@@ -1051,6 +1052,13 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
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");
if (IS_ERR(dsi->pllref_clk)) {
if (dsi->phy) {
--
2.29.2
Powered by blists - more mailing lists