Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2163253imm; Mon, 3 Sep 2018 21:43:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaKxQyCIta4F3whiopMkcrIZ/S4IBlwDOT+Kto26CdQHlQI0RI1NvABH+jWYFNURTiUlgOg X-Received: by 2002:a62:6003:: with SMTP id u3-v6mr33305077pfb.114.1536036181248; Mon, 03 Sep 2018 21:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536036181; cv=none; d=google.com; s=arc-20160816; b=Fr5OUpRO19QDoZUvtLc2JQtpTZAHpQSPxhhthPxy7/5tkPbC1qlleshuhzjb20ySjn m7LYfSEeYInv+RbQ0TuaAyXYHSLGHOTPZanJNi0dcO2NR0+W7mKBXDqZm6ysOsBEO46V KjKUQ5HOkFX2oM9bc6/5gWAmaWT9oZFUCPykTV70xsezzKH3dUpBiPAsYdE56l18Iw95 bYwB8M5XdlN46X9Cj36NcyhOUQFObq8czflhEhVyC+hn7JeMw5HeWu219vCZx/spSXCH 2Tk0C/aS3BY7/qvZUZ6y3CWxoFTuajLTAWFG933Qe1dYJ+R9l61xVR2TCPaQ3emZC60b mPuw== 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=1JCTZW0j73mGzAm/YtUsYtCcu4OEj2Sp13Pe1iUVndU=; b=tQJY+Cm6ST0mBl4Yf5LxM0csrx68iOGt76utJvZEoWGflf3zvo1f+DxFaKAtWrYYR0 GHyBpA2O2Yw46lRb4Ah9ts1BVZiQVGRKGor+1cPYpV4RfH5g2kWLQg/NPhLxTO7qEdj9 oc4ssIHlLnAB9rUULMVgRyzCjuT84KMXLR0+8YTwfJ+xeYMMYQhH9+p1WvY/h9riMO0U txkX01zxrs/57A1o8jdIx+39AGmvZBICmawLpGXyPQwFCGTD3av3Z6Z6JfRrrUqhtyNf TwQOVCpUjA/9gHhn1R6Ng8IVQRR6t4qUOfq422pQMeu+d52sTsGJjNBaEy25RZA0JwDT nLqw== 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 bb7-v6si19702051plb.359.2018.09.03.21.42.46; Mon, 03 Sep 2018 21:43:01 -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 S1727195AbeIDJEs (ORCPT + 99 others); Tue, 4 Sep 2018 05:04:48 -0400 Received: from hermes.aosc.io ([199.195.250.187]:44906 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726093AbeIDJEr (ORCPT ); Tue, 4 Sep 2018 05:04:47 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 98E555A0D3; Tue, 4 Sep 2018 04:41:24 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Jagan Teki , Jernej Skrabec Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH v4 01/11] clk: sunxi-ng: a64: Add minimal rate for video PLLs Date: Tue, 4 Sep 2018 12:40:43 +0800 Message-Id: <20180904044053.15425-2-icenowy@aosc.io> In-Reply-To: <20180904044053.15425-1-icenowy@aosc.io> References: <20180904044053.15425-1-icenowy@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jagan Teki 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 Signed-off-by: Icenowy Zheng Reviewed-by: Jernej Skrabec --- Changes for v3..v4: - 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.18.0