Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5994551ybc; Wed, 27 Nov 2019 13:05:12 -0800 (PST) X-Google-Smtp-Source: APXvYqz6GbrLQP/R6/ZozZJCjm9Ml4vIJO+I6Fuhn8rRIPLbQskGbGQyDD4ntbKjmWPVANiuqrRt X-Received: by 2002:a17:906:5f81:: with SMTP id a1mr50675649eju.54.1574888712141; Wed, 27 Nov 2019 13:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888712; cv=none; d=google.com; s=arc-20160816; b=sm3HxfcJUhxU6jdhevDYHOlb9rdrfk0V+OZp6Jlb9LhVb0niKZ8v8CcI1L2Bpfju+s tntLpqIko891riNJkVntuuK3YfO4DwBCabQdTXe9xDqdXHWLiaUPqIXElwqXeZZi+4kl HlsqxqnsVVxRMcLlekXruSF/j2nNAgOzeiIFumcZnb5dk8hJ7hlIEB1tB34tci0e0AjV VwdyA9iIF7Dco3J9wcyVHT2g8MXtvRyIxJggI7VCUKikX2dOAr9wSiUuVdiC8UyZLnzM s4sbtnlKBuUzEraQDuHK4zXTXQbmhvZIkRPQ3AHvaPpeoIDVUmnHaC23RDGzXEdFiMe2 jHIQ== 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=gyT968YpeEuNILFAO865UrHHvm+NOtXc4nwQcv2JRwI=; b=piDIft5cSqMpHZS9b8/+h3UcgQWEJYtxX1sgnVC5iBnFEDxnM9AYmVH5HE7xHt89fk fspIjKDkF3jYDXAlor5ipkT3CHN0Jb5CEcvooFoMwbqhe5Gd7GR3xQJ6pVDzc8X2g5Zb ogCM9Wxdfyv9J/9zKWt9OKGwxE0JbCfDRrybgjdwl4PsMljdby/fsHmZNluEPGxrVoVr j8xV3igLQylc+fpDoK36C0SbY2G5Zse2UsUlPwLiLTON8AIBfNg6x4ThcIBWezt5qhod eDBG7Jwkzoe5BObQEPCeo6Iiza0BAHHlAXA1WR0FpFQvyCvfPgw98BViWobVtIDxneiO abDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="TsKRX/I2"; 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 i12si10476665edr.198.2019.11.27.13.04.48; Wed, 27 Nov 2019 13:05:12 -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="TsKRX/I2"; 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 S1732078AbfK0VDq (ORCPT + 99 others); Wed, 27 Nov 2019 16:03:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:56890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731599AbfK0VDj (ORCPT ); Wed, 27 Nov 2019 16:03:39 -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 1F57521771; Wed, 27 Nov 2019 21:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888618; bh=MAt0eWtiPJD9sNaSAtGSvl94lDluSFw3dMc0uqRUmEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TsKRX/I2NgVYFcXiVGmW5c3RuhBIToXU9XkpoHUI3p1ii4q0wMRSjHF2aNrvjx0Tb cOFCUirMZlYf3AN1SyuFzhMTntasqE4QWXUyMMpIiqqlQfeKYWORu0U4VqQKPYCMC1 LVQJItCddHdMLjIyZkWdjO5xG0B6qpJu5chs6cqw= 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.19 205/306] clk: sunxi-ng: enable so-said LDOs for A64 SoCs pll-mipi clock Date: Wed, 27 Nov 2019 21:30:55 +0100 Message-Id: <20191127203130.120409599@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@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 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