From patchwork Fri Jul 3 08:49:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 227107 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2188986ilg; Fri, 3 Jul 2020 01:44:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuXXzKkQ89NxreYau0Mvg5TsqRgttIUrDv0pR/sh64LUoanHhJt5MbqG4peIlU4rcwtUmk X-Received: by 2002:aa7:d848:: with SMTP id f8mr30496778eds.329.1593765877382; Fri, 03 Jul 2020 01:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593765877; cv=none; d=google.com; s=arc-20160816; b=uo/Ns75iVXYJicSmC+BVCtm/NDbxm20nw1Bfbnd9sTkMlfi4aTMum2qpVLP08NekNm BNGfObwgm3kUQzMeU3p0XQfPvnV9Ib5ZRp9DycNrT4EnqU24Ku9bpIRmFvmQR7k9J9Xv YeQCGS+2GtD091Jt9R229/f0SftibY7/i5/nxfq/55tIpnQE32X5/Sjd5fT1+9VnebB3 w28VbuVlxE063LnpKF5RyyMlWA6h/qyuOGGAY1xjU1QUF7j6GJvj+MV/xbo31PfACA2Q gwhzCgPD5EC+p/1Rw8IGqk9/vK5PxnA4iJbPpm6gwIvagD3Yu8pT0iAuKdiqt8tREEVG jCiQ== 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:dkim-signature; bh=EnE6Ie1AshEC9kkSkD1phqKDaIW4ZsPLXsjnuMEgDU4=; b=07wz0vGGF1CWq3hkBJFOMPQpuC9g8oCQQ1IX+1xyYh+WyvxNvfeQgRbWlKQUwjk6+s FffRN1UMPmtYWDCR7iAJe5xiUgM/lrKY4oIZ6DmHtusvgD8Wp0ZASR2+5CInebXIjAul KyJ+qTkE2dWfgBM69DwZHKuNrrPIifVzw7u6868g+t6vkq4gLuNVa95lZ+jExUo9mUeA XsTl/iP9Ywi3YT4+43h0Qi+wLkg5pdgoQrmTOfb60ldhEccugs3e2cQ85sQmZ9cLQ7ZS c+6Y0pX7DQQF2oLmg+M6C09EyYRZBtv1gOWOdv/dUENB78D9Kia4Kihv6z0HPIGJVSJ2 fYvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aw1ohUsB; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m25si3926894edr.11.2020.07.03.01.44.37; Fri, 03 Jul 2020 01:44:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aw1ohUsB; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726039AbgGCIog (ORCPT + 16 others); Fri, 3 Jul 2020 04:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbgGCIog (ORCPT ); Fri, 3 Jul 2020 04:44:36 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 029DDC08C5C1 for ; Fri, 3 Jul 2020 01:44:36 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id g75so31250154wme.5 for ; Fri, 03 Jul 2020 01:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EnE6Ie1AshEC9kkSkD1phqKDaIW4ZsPLXsjnuMEgDU4=; b=aw1ohUsBoxDniIyHNA7v9rnOKSNC66sjlVpOBM5APjRG6gPP9i9mIa341pwrvaLg4c j0R6Tn7xEcRao5qhNSmg6FSwQQrxxEdzl5dbI0lXVMLmFRklohnafoWqhI/tFYAJYvRO ExBwhDJMvblHQDUUqgVG1xN2i4T0iiLGXJdWd3k+9CIMMLUclDFwJYhEK/KrRr402XN3 rE+LaYWyl+Ho3w2nVfZTLc0Gj54XoSR6rE5N67g3VIkZMJ4pdG4/XRUIwzID7U/0tnqv L9WV+RFdSoUKXLYobGtfzYb+xjwm9ROcv/44pZHSuQGcFlRD35YCasG2NvRzLHjKg6bO AlvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EnE6Ie1AshEC9kkSkD1phqKDaIW4ZsPLXsjnuMEgDU4=; b=M9TUUetKXSUJQIvYj0kGu/goIj+m9RhL5ZSO4f5QJ2A32zrIzty4eEMfc2oduKRlrQ gvoOArCSMELOq3l4fC45kf4R9Tj6XVOKZ/qcR/5P6I4bdTfuh1TKlPgkVfIvK9x0f2+O Qw9iS+wOOQpEaHRtfqfuC/aUpGQsNXWmTwVGkuutJtTvxKGmBhLFEIS/O/95W0gP8j57 vJmuoXxEbxp5FS3fKglEDxnKAmDoZkfW1I82xpMhX7mEqEn6JR/Dz/FCyhldlEGwVtag mPVVSU4IR45ERhICRgwI5RHHsEPQRvSeHyuLT5xAa+Tclp0Aujom4qrB7SO5+4hSFy5x w7sA== X-Gm-Message-State: AOAM5339CAskd1AWWGf9CuBmOdGdU+XG1Q74QrHVd0sEQsXrNKDDyWpa X+1Cdjf91B6FmcbfTFXdg5ffmQ== X-Received: by 2002:a1c:e209:: with SMTP id z9mr36019759wmg.153.1593765874676; Fri, 03 Jul 2020 01:44:34 -0700 (PDT) Received: from localhost.localdomain ([88.122.66.28]) by smtp.gmail.com with ESMTPSA id b18sm4213116wrs.46.2020.07.03.01.44.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jul 2020 01:44:34 -0700 (PDT) From: Loic Poulain To: sboyd@kernel.org, bjorn.andersson@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, amit.kucheria@linaro.org, Ilia Lin Subject: [PATCH v5 3/5] dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 Date: Fri, 3 Jul 2020 10:49:43 +0200 Message-Id: <1593766185-16346-4-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593766185-16346-1-git-send-email-loic.poulain@linaro.org> References: <1593766185-16346-1-git-send-email-loic.poulain@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Ilia Lin Each of the CPU clusters (Power and Perf) on msm8996 are clocked via 2 PLLs, a primary and alternate. There are also 2 Mux'es, a primary and secondary all connected together as shown below +-------+ XO | | +------------------>0 | | | PLL/2 | SMUX +----+ +------->1 | | | | | | | +-------+ | +-------+ | +---->0 | | | | +---------------+ | +----------->1 | CPU clk |Primary PLL +----+ PLL_EARLY | | +------> | +------+-----------+ +------>2 PMUX | +---------------+ | | | | | +------+ | +-->3 | +--^+ ACD +-----+ | +-------+ +---------------+ +------+ | |Alt PLL | | | +---------------------------+ +---------------+ PLL_EARLY The primary PLL is what drives the CPU clk, except for times when we are reprogramming the PLL itself (for rate changes) when we temporarily switch to an alternate PLL. A subsequent patch adds support to switch between primary and alternate PLL during rate changes. The primary PLL operates on a single VCO range, between 600MHz and 3GHz. However the CPUs do support OPPs with frequencies between 300MHz and 600MHz. In order to support running the CPUs at those frequencies we end up having to lock the PLL at twice the rate and drive the CPU clk via the PLL/2 output and SMUX. Signed-off-by: Ilia Lin Reviewed-by: Rob Herring --- .../bindings/clock/qcom,msm8996-apcc.yaml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,msm8996-apcc.yaml -- 2.7.4 diff --git a/Documentation/devicetree/bindings/clock/qcom,msm8996-apcc.yaml b/Documentation/devicetree/bindings/clock/qcom,msm8996-apcc.yaml new file mode 100644 index 0000000..d673ede --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,msm8996-apcc.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,kryocc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm clock controller for MSM8996 CPUs + +maintainers: + - Loic Poulain + +description: | + Qualcomm CPU clock controller for MSM8996 CPUs, clock 0 is for Power cluster + and clock 1 is for Perf cluster. + +properties: + compatible: + enum: + - qcom,msm8996-apcc + + reg: + maxItems: 1 + + '#clock-cells': + const: 1 + + clocks: + items: + - description: Primary PLL clock for power cluster (little) + - description: Primary PLL clock for perf cluster (big) + - description: Alternate PLL clock for power cluster (little) + - description: Alternate PLL clock for perf cluster (big) + + clock-names: + items: + - const: pwrcl_pll + - const: perfcl_pll + - const: pwrcl_alt_pll + - const: perfcl_alt_pll + +required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false + +examples: + # Example for msm8996 + - | + kryocc: clock-controller@6400000 { + compatible = "qcom,msm8996-apcc"; + reg = <0x6400000 0x90000>; + #clock-cells = <1>; + }; +...