Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp770936ybc; Sat, 16 Nov 2019 08:23:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxj9z7eawBoPaPV6fjF96W6DFky0YJr65THt6YBUTplEIghqL0mz6h7BnoT6MjSi8dJS8YX X-Received: by 2002:adf:9381:: with SMTP id 1mr7890342wrp.10.1573921431479; Sat, 16 Nov 2019 08:23:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921431; cv=none; d=google.com; s=arc-20160816; b=yzEwWmSwxQLar3C4OKC1pIlOJIHgOZPumY0bNjDpiy9SgfJsPb1ooSkY74dEIM2nQr Ej3zVWw9C2kTq2X4K8c5byNRs22Vwa4OgI1giNkniSOG1+GG/DAKSZp4bjWuCbirGGry +59ys4vK+f+knT75CIyrPioR2ilBSGLBgWoo6JcY6ClS+2rI8Gc3LjjYCN/MiZpbGl/f l1o7jMmmX5FeS05pZ1AXmFATxB+DDx2VGnjzJZcgjT/Bu/KgwqnqwyTOvAHTuGsFT1// r7WOpCrL5MbGPBKpbgau2artVrP9OmCnH4En9LB0FTcl6S7HRU24NtbfWUtL3JLBbcw9 nbYA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gyT968YpeEuNILFAO865UrHHvm+NOtXc4nwQcv2JRwI=; b=hcTiGnKLOub8tz9b5CfZdmrW1qyko6y/TsvbJo0CDI7TtOMPhvYNa0YzlBvsTyaN4U mnPxvVw5flIY9kfrefDfHyftgMzFEp9obtibjuTtD1z90LAbXIabJgTrrdwtscA+PqY9 n9Hw0fyJ+AYHBaYUlWuKXTrK8T/kTaHY/foEjZXZXKYy9k9Evqgp5eS9KhZ63o1wwlMj kVgNZ1GjVzFFKG6ob19mVNZPWuM+iIRnOl7fidk6SZ2DDIASl83PHgWNRAG83BFmhBda U8WAo6Pje3Xl/wOjgExmdN4dOwA6DXtQ1FmVJFFJmE9Hhoo4BigqRYpYVApWblyhF+r3 s6SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m1DkgWnI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c29si9020156ede.50.2019.11.16.08.23.26; Sat, 16 Nov 2019 08:23:51 -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=m1DkgWnI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731730AbfKPQTJ (ORCPT + 99 others); Sat, 16 Nov 2019 11:19:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:52656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729345AbfKPPqT (ORCPT ); Sat, 16 Nov 2019 10:46:19 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 95C222084D; Sat, 16 Nov 2019 15:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919178; bh=MAt0eWtiPJD9sNaSAtGSvl94lDluSFw3dMc0uqRUmEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m1DkgWnIa7qXfUwItLd7VvFD7xTb9yNDxMYr6JsmrDQIshX+pVSoKFIZ8s0oAuC5C D1MXgljrdLWpakZhz1BwxpOuHsEIdYvRLKGMjYGxcjg0QMqumvrwiviHY41L11KQ16 zDp7p2FIn5L7D/wlV8dNcjvApuH0uCiEwZwR5iYc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Icenowy Zheng , Maxime Ripard , Sasha Levin , linux-clk@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 188/237] clk: sunxi-ng: enable so-said LDOs for A64 SoC's pll-mipi clock Date: Sat, 16 Nov 2019 10:40:23 -0500 Message-Id: <20191116154113.7417-188-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 ee9c12cf3f08c..2a60981799216 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