dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: dri-devel@lists.freedesktop.org
Cc: devicetree@vger.kernel.org, dafna.hirschfeld@collabora.com,
	cmuellner@linux.com, hjc@rock-chips.com,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	helen.koike@collabora.com, robh+dt@kernel.org,
	sebastian.fricke@posteo.net,
	Heiko Stuebner <heiko.stuebner@theobroma-systems.com>,
	ezequiel@collabora.com, linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: [PATCH 1/6] drm/rockchip: dsi: add own additional pclk handling
Date: Tue,  2 Feb 2021 15:56:27 +0100	[thread overview]
Message-ID: <20210202145632.1263136-2-heiko@sntech.de> (raw)
In-Reply-To: <20210202145632.1263136-1-heiko@sntech.de>

From: Heiko Stuebner <heiko.stuebner@theobroma-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@theobroma-systems.com>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-02-02 14:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 14:56 [PATCH 0/6] Support second Image Signal Processor on rk3399 Heiko Stuebner
2021-02-02 14:56 ` Heiko Stuebner [this message]
2021-02-02 14:56 ` [PATCH 2/6] dt-bindings: display: rockchip-dsi: add optional #phy-cells property Heiko Stuebner
2021-02-09 21:03   ` Rob Herring
2021-02-02 14:56 ` [PATCH 3/6] drm/rockchip: dsi: add ability to work as a phy instead of full dsi Heiko Stuebner
2021-02-02 14:56 ` [PATCH 4/6] arm64: dts: rockchip: add #phy-cells to mipi-dsi1 Heiko Stuebner
2021-02-02 14:56 ` [PATCH 5/6] arm64: dts: rockchip: add cif clk-control pinctrl for rk3399 Heiko Stuebner
2021-02-02 14:56 ` [PATCH 6/6] arm64: dts: rockchip: add isp1 node on rk3399 Heiko Stuebner
2021-02-03 18:14 ` [PATCH 0/6] Support second Image Signal Processor " Sebastian Fricke
2021-02-03 19:54   ` Heiko Stübner
2021-02-05  6:43     ` Sebastian Fricke
2021-02-05  8:15       ` Heiko Stübner
2021-02-05 14:55         ` Heiko Stübner
2021-02-10 11:15           ` Heiko Stübner
2021-02-11  5:25             ` Sebastian Fricke
2021-02-11 14:42               ` Heiko Stübner
2021-02-13 11:19                 ` Sebastian Fricke
2021-02-13 22:33                   ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210202145632.1263136-2-heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=cmuellner@linux.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@collabora.com \
    --cc=heiko.stuebner@theobroma-systems.com \
    --cc=helen.koike@collabora.com \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.fricke@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).