Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2647542imj; Mon, 11 Feb 2019 06:26:06 -0800 (PST) X-Google-Smtp-Source: AHgI3Iapqy0VDOO0gRY+op+FKWH9R72W5fLJhlYJi3Akp604p+3MFPqp2UV4G9s99vBNTS5btw9X X-Received: by 2002:a63:29c3:: with SMTP id p186mr846459pgp.24.1549895165956; Mon, 11 Feb 2019 06:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895165; cv=none; d=google.com; s=arc-20160816; b=knhtw0JKGUFWDaa1NfQGtxXL9dt5oQzwvLkrBxBYweEXw8DOBwTkqoj0zS2XvpDaXV 01dklhJ/C4QkzayYvK1aOzcnVHQNV3exmrtpYnLgQ5evwWUqwu6NEFzVRoebVh8fs4/E 5SVPwZT9EA7v8xUgMhupOF+TLDovwzIPVOc3Ic5UX8oqpmwPxrvhHRT+bMpZfeP3ahGG y6rZfMZBcMqAjuuSushtAEKDcM+Qx8cNjN5l8duE/KOWSUuhkzRsBn7tr7XUnHDKDdHy 6JSN92F0GGPEonxiBcmU94/W7A3NDtRUvG5M6GbkpkkyXsU6xqlJMJ9x9y27lGullMrh 97jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JU14wNdHnuLdjyaYSPdzlLgg0gYfpHXfGPjqcCTrIi0=; b=HkjuR90l0CU0jGDNMfO2n5HlRDxD2UUIXAiLVoxd9WRv+bo96rmArPJqeE2ZLpMQIM 5uaW1yoefoq0S+wy+IrGPoNEjjgt229ESBdO7pnS7hltV6aIVov7patc9m9pk1kX+AeZ U2wZo+YEJLNJdC2i/GSbzNxf/kPTcilnd0SxLqdVPxhknOaDbygorkdO90YMsIrITgCi g2l6C+/+aWyT0eQfw+JhaKNMLzZi/O3iFfi3SGPG7E3S9OuxxKDE80w4+m+djsOf8kbf PlYbwOHl+JKzddb4daGUQc1Od32Ls2R/QVcaiZus5gLEz4SIBLpDjBdnOEUCiCAaMNjW k6mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VNgOTDTb; 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 i129si10824388pfb.32.2019.02.11.06.25.50; Mon, 11 Feb 2019 06:26:05 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=VNgOTDTb; 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 S1728474AbfBKOVJ (ORCPT + 99 others); Mon, 11 Feb 2019 09:21:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:53940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728459AbfBKOVG (ORCPT ); Mon, 11 Feb 2019 09:21:06 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B50120838; Mon, 11 Feb 2019 14:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894866; bh=MWuz8As0fElrjSqDzMxgqYltaiWXMlwVlmGeAtuAt7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VNgOTDTb6T2sIzuulpHa9UNPZGOqsqv0NP3xwBKzai7BL0hHo7t62BimiH69YxP51 Lk/c56QRX7GEvmQtyHi9Pk5q5iHcBJ7M39W2FUadz1kWXa7sVPr+vXq2XTr0YO2W2W a0rSZz6LcenfdS2DScklZNXE22DM+rWz3GlTle00= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Maxime Ripard , Sasha Levin Subject: [PATCH 4.20 006/352] clk: sunxi-ng: h6: Set video PLLs limits Date: Mon, 11 Feb 2019 15:13:53 +0100 Message-Id: <20190211141846.888888662@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit ed4433419d45bf8b58aef34c4450a27e1c8699e8 ] 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 Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- 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..19ff09f610e4 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 = 2400000000UL, .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 = 2400000000UL, .common = { .reg = 0x048, .features = CCU_FEATURE_FIXED_POSTDIV, -- 2.19.1