linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>, Icenowy Zheng <icenowy@aosc.io>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org,
	Michael Trimarchi <michael@amarulasolutions.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com
Cc: Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v3 01/18] clk: sunxi-ng: a64: Add minimal rate for video PLLs
Date: Wed, 18 Jul 2018 16:24:41 +0530	[thread overview]
Message-ID: <20180718105458.22304-2-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20180718105458.22304-1-jagan@amarulasolutions.com>

According to documentation and experience with other similar SoCs, video
PLLs don't work stable if their output frequency is set below 192 MHz.

Because of that, set minimal rate to both A64 video PLLs to 192 MHz.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- none 
Changes for v2:
- New patch

 drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 46 ++++++++++++++-------------
 1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
index ee9c12cf3f08..d0e30192f0cf 100644
--- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c
@@ -64,17 +64,18 @@ static SUNXI_CCU_NM_WITH_GATE_LOCK(pll_audio_base_clk, "pll-audio-base",
 				   BIT(28),	/* lock */
 				   CLK_SET_RATE_UNGATE);
 
-static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video0_clk, "pll-video0",
-					"osc24M", 0x010,
-					8, 7,		/* N */
-					0, 4,		/* M */
-					BIT(24),	/* frac enable */
-					BIT(25),	/* frac select */
-					270000000,	/* frac rate 0 */
-					297000000,	/* frac rate 1 */
-					BIT(31),	/* gate */
-					BIT(28),	/* lock */
-					CLK_SET_RATE_UNGATE);
+static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN(pll_video0_clk, "pll-video0",
+					    "osc24M", 0x010,
+					    192000000,	/* Minimum rate */
+					    8, 7,		/* N */
+					    0, 4,		/* M */
+					    BIT(24),	/* frac enable */
+					    BIT(25),	/* frac select */
+					    270000000,	/* frac rate 0 */
+					    297000000,	/* frac rate 1 */
+					    BIT(31),	/* gate */
+					    BIT(28),	/* lock */
+					    CLK_SET_RATE_UNGATE);
 
 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_ve_clk, "pll-ve",
 					"osc24M", 0x018,
@@ -125,17 +126,18 @@ static struct ccu_nk pll_periph1_clk = {
 	},
 };
 
-static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video1_clk, "pll-video1",
-					"osc24M", 0x030,
-					8, 7,		/* N */
-					0, 4,		/* M */
-					BIT(24),	/* frac enable */
-					BIT(25),	/* frac select */
-					270000000,	/* frac rate 0 */
-					297000000,	/* frac rate 1 */
-					BIT(31),	/* gate */
-					BIT(28),	/* lock */
-					CLK_SET_RATE_UNGATE);
+static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN(pll_video1_clk, "pll-video1",
+					    "osc24M", 0x030,
+					    192000000,	/* Minimum rate */
+					    8, 7,		/* N */
+					    0, 4,		/* M */
+					    BIT(24),	/* frac enable */
+					    BIT(25),	/* frac select */
+					    270000000,	/* frac rate 0 */
+					    297000000,	/* frac rate 1 */
+					    BIT(31),	/* gate */
+					    BIT(28),	/* lock */
+					    CLK_SET_RATE_UNGATE);
 
 static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_gpu_clk, "pll-gpu",
 					"osc24M", 0x038,
-- 
2.17.1


  reply	other threads:[~2018-07-18 10:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 10:54 [PATCH v3 00/18] arm64: allwinner: Add A64 DE2 HDMI support Jagan Teki
2018-07-18 10:54 ` Jagan Teki [this message]
2018-07-18 10:54 ` [PATCH v3 02/18] drm/sun4i: Add support for A64 mixer1 Jagan Teki
2018-07-18 10:54 ` [PATCH v3 03/18] dt-bindings: display: Add compatible for A64 DE2 tcon1 blocks Jagan Teki
2018-07-18 10:54 ` [PATCH v3 04/18] drm/sun4i: Add support for A64 display engine Jagan Teki
2018-07-18 10:54 ` [PATCH v3 05/18] dt-bindings: display: Add compatible for A64 HDMI Jagan Teki
2018-07-18 10:54 ` [PATCH v3 06/18] dt-bindings: clock: sun50i-a64-ccu: Add PLL_VIDEO[0-1] macros Jagan Teki
2018-07-18 10:54 ` [PATCH v3 07/18] arm64: dts: allwinner: a64: Add tcon1 HDMI pipeline Jagan Teki
2018-07-18 12:46   ` Icenowy Zheng
2018-07-18 10:54 ` [PATCH v3 08/18] clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I Jagan Teki
2018-07-18 10:54 ` [PATCH v3 09/18] arm64: defconfig: Enable CONFIG_DRM_SUN4I Jagan Teki
2018-07-18 10:54 ` [PATCH v3 10/18] drm/sun4i: Enable DE2 Mixer for SUN8I and SUN50I Jagan Teki
2018-07-18 10:54 ` [PATCH v3 11/18] drm/sun4i: Enable DesignWare HDMI for SUN50I Jagan Teki
2018-07-18 10:54 ` [PATCH v3 12/18] drm: sun4i: add support for HVCC regulator for DWC HDMI glue Jagan Teki
2018-07-18 10:54 ` [PATCH v3 13/18] arm64: dts: allwinner: a64: bananapi-m64: Enable HDMI output Jagan Teki
2018-07-18 10:54 ` [PATCH v3 14/18] arm64: dts: allwinner: a64: nanopi-a64: " Jagan Teki
2018-07-18 10:54 ` [PATCH v3 15/18] arm64: dts: allwinner: a64: orangepi-win: " Jagan Teki
2018-07-18 10:54 ` [PATCH v3 16/18] arm64: dts: allwinner: a64: a64-olinuxino: " Jagan Teki
2018-07-18 10:54 ` [PATCH v3 17/18] arm64: dts: allwinner: a64: pine64: " Jagan Teki
2018-07-18 10:54 ` [PATCH v3 18/18] arm64: dts: allwinner: a64: sopine: " Jagan Teki
2018-07-18 11:30 ` [PATCH v3 00/18] arm64: allwinner: Add A64 DE2 HDMI support Chen-Yu Tsai
2018-07-18 12:44 ` Maxime Ripard
2018-07-18 12:56   ` Jagan Teki
2018-07-23  6:32     ` Icenowy Zheng

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=20180718105458.22304-2-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=airlied@linux.ie \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=icenowy@aosc.io \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=michael@amarulasolutions.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wens@csie.org \
    --cc=will.deacon@arm.com \
    /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).