Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5985078ybc; Wed, 27 Nov 2019 12:55:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzhF7lQPXCHmMQvhyl3nFWjrvCf0dOQcEi19gxWesZyBHKR6GWWIi4TDHzcWgX/C/IhbOyp X-Received: by 2002:aa7:d3da:: with SMTP id o26mr35161179edr.302.1574888133049; Wed, 27 Nov 2019 12:55:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888133; cv=none; d=google.com; s=arc-20160816; b=Q+6Ex7/m8/hbmbByZlAB+H06/QA7+2AHeYvkVH+jq+onXWpp+B1BZNmg28Tf/MxMVw 8zNdOiNlLFx8Q3sO0pR32QlnyAoPhXMUoaFxg54TfcR9Je1+3XG2REvuojRFU2P7bCFx 9vmwcMwpFE1zk36Eg5L0GGCZYCv02AQrLXLE5APbgIhS0sxA9rCpbI8tJrNXkZxvoE0R segIlt8Ufz3AW7Pokj3oRXUA7VRwj1JsV/1nG4DlQsmnRaODzYvgpIHg/rkEoPRillVy jw9NClNbwMfNutuVZGyIUVWjZxMfGRmkj9hXH89UNCMe2wnQAxnaIzo/j8AqdzrhWtM0 RCYg== 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=8K0a6wFy3cEJVsGgLAcEKv7KuzmZ/3CQ8b/Or+rtCKs=; b=phW2XGzFMZbgvSTdrENLdBAy56uAXx3vBjy1q28sY9Czci124hlfrHHNfqsYa8NBgi ngPIpXdVQIGhNmGOsTtTK55A0ifu4QeNMGSNNnHiEoUKx1q9EX902o06ilKprCPd/v0/ uns5JNEchJdcyYYvaxeIzCsUM5I32uBQW//0XA2EPxv6XvCbg8LxRS7A/tbe7cI+MqzX wP3jlQDsJMKWRnMCQ/0ZEr56k5tmnj0ZP6PP5hw47XjRS3sxwCnz0oKmscMjshMWgcqC uZNaXOb8LTewYseGctiVPsZpWrRA+aX59Y/HjTxu3f+NOLsS8POA5ix6RLqWfYGZYW9r c1gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D61Uf3pN; 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 q23si10592867ejn.236.2019.11.27.12.55.08; Wed, 27 Nov 2019 12:55:33 -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=D61Uf3pN; 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 S1730472AbfK0Uv0 (ORCPT + 99 others); Wed, 27 Nov 2019 15:51:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:38066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730461AbfK0UvW (ORCPT ); Wed, 27 Nov 2019 15:51:22 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 E841A219F6; Wed, 27 Nov 2019 20:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887882; bh=L9YHeN7DCGEZ+iGnvQLvZwPgOC6kkntnCWZ1Zw5ZInw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D61Uf3pNkp+THjvL8DF/fjlJl6eLp+gzPKm4bSylLMaBO16D2DrDXeu1KE8uU2o9+ v7DchFAsdz2UCTZfD9csDiRX2HC12byDYm95QrgZX2fEBvSJLJQsICMii6BJJyb4dj vH3OS2QCxlmrC9XQ644TH1EVAL49wmLZWEDDCkik= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Icenowy Zheng , Maxime Ripard , Sasha Levin Subject: [PATCH 4.14 130/211] clk: sunxi-ng: enable so-said LDOs for A64 SoCs pll-mipi clock Date: Wed, 27 Nov 2019 21:31:03 +0100 Message-Id: <20191127203106.362299381@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Icenowy Zheng [ Upstream commit 859783d1390035e29ba850963bded2b4ffdf43b5 ] In the user manual of A64 SoC, the bit 22 and 23 of pll-mipi control register is called "LDO{1,2}_EN", and according to the BSP source code from Allwinner , the LDOs are enabled during the clock's enabling process. The clock failed to generate output if the two LDOs are not enabled. Add the two bits to the clock's gate bits, so that the LDOs are enabled when the PLL is enabled. Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c index 2bb4cabf802f0..36a30a3cfad71 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -158,7 +158,12 @@ static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_gpu_clk, "pll-gpu", #define SUN50I_A64_PLL_MIPI_REG 0x040 static struct ccu_nkm pll_mipi_clk = { - .enable = BIT(31), + /* + * The bit 23 and 22 are called "LDO{1,2}_EN" on the SoC's + * user manual, and by experiments the PLL doesn't work without + * these bits toggled. + */ + .enable = BIT(31) | BIT(23) | BIT(22), .lock = BIT(28), .n = _SUNXI_CCU_MULT(8, 4), .k = _SUNXI_CCU_MULT_MIN(4, 2, 2), -- 2.20.1