All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/5] rockchip: clk: rk3399: allow requests for HDMI clocks
Date: Fri, 28 Apr 2017 18:33:57 +0200	[thread overview]
Message-ID: <1493397242-46493-2-git-send-email-philipp.tomsich@theobroma-systems.com> (raw)
In-Reply-To: <1493397242-46493-1-git-send-email-philipp.tomsich@theobroma-systems.com>

This allows requests (via the DTS) for PCLK_HDMI_CTRL/PCLK_VIO_GRF,
which are clock gates in the HDMI output path for the RK3399.

As these are enabled by default (i.e. after reset), we don't implement
any logic to actively open/close these clock gates and simply assume
that their reset-default has not been changed.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---

Changes in v2: None

 drivers/clk/rockchip/clk_rk3399.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index 72395e2..d820ea6 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -879,6 +879,9 @@ static ulong rk3399_clk_get_rate(struct clk *clk)
 	case SCLK_UART0:
 	case SCLK_UART2:
 		return 24000000;
+		break;
+	case PCLK_HDMI_CTRL:
+		break;
 	case DCLK_VOP0:
 	case DCLK_VOP1:
 		break;
@@ -916,6 +919,10 @@ static ulong rk3399_clk_set_rate(struct clk *clk, ulong rate)
 	case SCLK_SPI0...SCLK_SPI5:
 		ret = rk3399_spi_set_clk(priv->cru, clk->id, rate);
 		break;
+	case PCLK_HDMI_CTRL:
+	case PCLK_VIO_GRF:
+		/* the PCLK gates for video are enabled by default */
+		break;
 	case DCLK_VOP0:
 	case DCLK_VOP1:
 		ret = rk3399_vop_set_clk(priv->cru, clk->id, rate);
-- 
1.9.1

  reply	other threads:[~2017-04-28 16:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 16:33 [U-Boot] [PATCH v2 0/5] rockchip: video: rk3399: enable HDMI output Philipp Tomsich
2017-04-28 16:33 ` Philipp Tomsich [this message]
2017-04-30  3:49   ` [U-Boot] [PATCH v2 1/5] rockchip: clk: rk3399: allow requests for HDMI clocks Simon Glass
2017-05-02 11:12     ` sjg at google.com
2017-04-28 16:33 ` [U-Boot] [PATCH v2 2/5] rockchip: pinctrl: rk3399: add support for the HDMI I2C pins Philipp Tomsich
2017-04-30  3:49   ` Simon Glass
2017-05-02 11:12     ` sjg at google.com
2017-04-28 16:33 ` [U-Boot] [PATCH v2 3/5] rockchip: video: rk3399: enable HDMI output (from the rk_vop) for the RK3399 Philipp Tomsich
2017-04-28 16:34 ` [U-Boot] [PATCH v2 4/5] rockchip: video: rk3399: add HDMI TX support on " Philipp Tomsich
2017-04-28 16:34 ` [U-Boot] [PATCH v2 5/5] rockchip: dts: rk3399: enable HDMI output in the DTS Philipp Tomsich
2017-04-30  3:49   ` Simon Glass

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=1493397242-46493-2-git-send-email-philipp.tomsich@theobroma-systems.com \
    --to=philipp.tomsich@theobroma-systems.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.