Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1578934imm; Thu, 18 Oct 2018 00:10:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV601HIjyo9Qmd+P6RfoE4O5cVvRcBSzK9leCfv0j99bCLCRPQdQ+J0toERxHbG4bTC3utV7/ X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr28329852plb.71.1539846612327; Thu, 18 Oct 2018 00:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539846612; cv=none; d=google.com; s=arc-20160816; b=xstkEChPt+EEY5pY3AhCGNWz45/2NRCQ1L3shXz6X4cCls2OkiemPFgv/c4nFp4ABZ BFdVE1Qvtk55e1zsq0hCVsX6tjO9C3ijUXiXE9ZXb6laTmdO7/CicSva5Ki+DHOskP01 m6kFkccOmBfnwcT7NJbKnR2hRYCgsvmk3XA8hMCmqx1hBL66EMOUX5eMgZ2LQJKt5ni6 Jd2oz31dN0omIsk1594pYLo73afvz+Zk3eQTwJLx8jK8/VCa1XG/Y9iF8xIbHHTeQfQT GIlwbuj9K0B53GJ/wPLHpEIM00xyIyXfyS4XPQmnFaNVpzJF18QyBxC+pPCSsN+t9k1w PXXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ekdYBRPZPBnNscphlvxAUrDsyMV2gqI7Lm3Gw7mnhG0=; b=s42yLrOfsSb2frag9Km6lOjd0gghf0OIVDLamhdkiaOHO0Wh5txfJ/LC3waAvyxuGr QJjiA7wa2HnKWm55+mZe5JSTBI6WJoMp6RllRAajDOttBqmBQohB86qlbcISYAB2SfMx b1sAzPfE7ewi3VDqwoqW4BbZ+KqfS74s9KOpvv2kUJvG5EL6n+hksSqP2FQQvV8z6H68 kfQq+K71GtdBNk8LVgtZRf4KisQsa55eF9EmM3MjkIbdNIEJSep+TTXKIHNjV/rYfaqH Ewhf+wr/kU+UPnYSk79s4NHsgEXCmWPjzmc4rsqvGaWzdYNSZPc7tfAlWHvCKHkCqlq5 zeNg== 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 f65-v6si20608244pff.276.2018.10.18.00.09.56; Thu, 18 Oct 2018 00:10:12 -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 S1727621AbeJRPHZ (ORCPT + 99 others); Thu, 18 Oct 2018 11:07:25 -0400 Received: from hermes.aosc.io ([199.195.250.187]:48884 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbeJRPHZ (ORCPT ); Thu, 18 Oct 2018 11:07:25 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id D63A315D251; Thu, 18 Oct 2018 07:07:46 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH v2] clk: sunxi-ng: enable so-said LDOs for A64 SoC's pll-mipi clock Date: Thu, 18 Oct 2018 15:07:29 +0800 Message-Id: <20181018070729.52943-1-icenowy@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes in v2: - Add a section of comments before the addition. 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 5f80eb018014..884d8f7863c4 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -162,7 +162,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.18.1