Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp841205imm; Sun, 2 Sep 2018 00:31:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYb+I3jTXI/8OLZpQJFLFliP0Ua4zBLEbUIZzC6ovTz3BpSGr+/ltqv+aVI10aSTLidiBle X-Received: by 2002:aa7:8118:: with SMTP id b24-v6mr23893038pfi.78.1535873413531; Sun, 02 Sep 2018 00:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535873413; cv=none; d=google.com; s=arc-20160816; b=XKilohq41DQ2SMXuhKGtozI4X8KP7LWYMpOrc4rViPik7XaG1+xMIRhCLkHRH/ozuS aCp+gv8g/MbfS/YoUUA5Zzu3mrLZxIVK3ZhDbvn/wT6XmZF7zFoSVbQBPwsQJZ3hp8tL Y+grglEmaFsya35W8mYBpQ4iR/Qt/pA7KrTs6ZYj9Ah3X0kad87jZXE09HHNULH2bNwk ZUaqH0yVc8tBQ/TFOAWjAXQpQHT7JIcpOJMArbdq8niPNWgBs6WQAacLz5sMEzTtkSTi xHpDArOWzKu6d1uTa5XxmzOmsizB8b4nybM3qfxdL8YClwND2+G5UAYgNwzwZjYZV1SJ n0Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=evlhjwAfQt5yfyARnzZ03GgfY5fcsWOksqkJSQCcdpQ=; b=eUFHsZ5UpqKbzloA2+eLqFblgQMZErgtpC3QDazp9Slr70qTxk1MHrDQMLmchIEmsH EXiy19czTgdcNWGlq9TzbG14Yq7ie8JniZJmdBloVV8vTNeTVDbJT+gYCoyiPzeDnluj d8ahB6Ff2x8rh7SmDuzfuW7rP3Rmg+MNGJak2gqGtOWLle8NwdJzJ439VTKjIBmMp7zs gfF4NQU9AQfmLFOAqNNDxB9ee8SvXAJHKRYvNEGdbps92mhLQST+WUiBRrLxPo/RuC53 9AdSEkZiiW3Y8x5Xk4CRsRhi8uacUQqEVBaHU5osG4W6mWptOfZypMwozJKiy/w8CGfC qYog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m86-v6si15775775pfj.48.2018.09.02.00.29.41; Sun, 02 Sep 2018 00:30:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbeIBLmF (ORCPT + 99 others); Sun, 2 Sep 2018 07:42:05 -0400 Received: from mailoutvs22.siol.net ([185.57.226.213]:54607 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725905AbeIBLmE (ORCPT ); Sun, 2 Sep 2018 07:42:04 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 4A63E520B26; Sun, 2 Sep 2018 09:27:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta10.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta10.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jKFuyyPVjnto; Sun, 2 Sep 2018 09:27:13 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id D09FD520B2B; Sun, 2 Sep 2018 09:27:13 +0200 (CEST) Received: from localhost.localdomain (unknown [194.152.15.144]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id 4A920520B26; Sun, 2 Sep 2018 09:27:11 +0200 (CEST) From: Jernej Skrabec To: robh+dt@kernel.org, maxime.ripard@bootlin.com, wens@csie.org Cc: mark.rutland@arm.com, mturquette@baylibre.com, sboyd@kernel.org, airlied@linux.ie, architt@codeaurora.org, a.hajda@samsung.com, jernej.skrabec@siol.net, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com Subject: [PATCH 06/27] clk: sunxi-ng: h6: Set video PLLs limits Date: Sun, 2 Sep 2018 09:26:22 +0200 Message-Id: <20180902072643.4917-7-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180902072643.4917-1-jernej.skrabec@siol.net> References: <20180902072643.4917-1-jernej.skrabec@siol.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Video PLL factors can be set in a way that final PLL rate is outside stable range. H6 user manual specifically says that N factor should not be below 12. While it doesn't says anything about maximum stable rate, it is clear that PLL doesn't work at 6.096 GHz (254 * 24 MHz). Set minimum allowed PLL video rate to 288 MHz (12 * 24 MHz) and maximum to 2.4 GHz, which is maximum in BSP driver. Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c index 2193e1495086..f44d314b2285 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c @@ -120,6 +120,8 @@ static struct ccu_nm pll_video0_clk = { .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ .fixed_post_div = 4, + .min_rate = 288000000, + .max_rate = 2400000000, .common = { .reg = 0x040, .features = CCU_FEATURE_FIXED_POSTDIV, @@ -136,6 +138,8 @@ static struct ccu_nm pll_video1_clk = { .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ .fixed_post_div = 4, + .min_rate = 288000000, + .max_rate = 2400000000, .common = { .reg = 0x048, .features = CCU_FEATURE_FIXED_POSTDIV, -- 2.18.0