From patchwork Wed Jul 21 22:53:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 483349 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp6624590jao; Wed, 21 Jul 2021 15:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpjixFercC5AYG7xeaX2VbU+5qpcVskQDk0uAaFUigemS1Vbr8cBk0DwyRHYXSTkcFNdJY X-Received: by 2002:a05:6602:1808:: with SMTP id t8mr28829323ioh.165.1626908118511; Wed, 21 Jul 2021 15:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626908118; cv=none; d=google.com; s=arc-20160816; b=l7/+g7uryWc/f19Eruveq3k6rMRvZqiL3gcpr/93oWYhC0LfCZS1e8GCGexf+O9OOd ee4+naYFlGxY3OCDW4nXeelheeVoKeC7gJQIYxMOkxm+TQs2ChIQjduDb5t2SpqAC/Vl 1XCHWurVTucRZvdp6PWrPFNQc04reP5dCF3ELyVStkaEsEEwxdVBENeWazKXNRxpMQY7 UZ67AqmplP6Osz+kCXBwypnCLfkTY7spMSg0gEIxnLnuIwsBntcrPRCt2di+gA8kQDnk UgTvqN5DOuYupl7KFFW1SUoHiTgydXfHSM/UHfwC5AQpTprb4PBIb3VI/lrydas0YcXd kScQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OIA/EHvm8TMC4nrq8jGhCGqjd/LXVCmlR0jUUrUwOI4=; b=UuUbthjKo/jxdqOZASxV5xnEf3RUToXGYbuwogLgNuMB5KHOzI55sAwt+WjiD70cEY d/Etc83YNersw8k/S7b2VfRLpAJwT/SkmMr+2fZ6WIknw9Zbr3tT/befVo4isBvYHwiz ASBZ9q4f4X/aeX+JG1TYW1XToBNzHGl2rWJWrx5RrBbncqTObYBkhtZ4GqdP0kbpxbDp +D+uqoQ+hxKxaxDuMs5VDO2IBepPeTkh26dbQUHZSWLYfPtISSnqWkQAMjtDVWt+VFzK By7RQPS3xyajoCD+C+fCHAA5P2DY/rlioCAawb4Z2u1LulR3bYlyOnaQxwgHbYuVJHkk qY8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gTOs/tdn"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 m4si28993908ioy.95.2021.07.21.15.55.18; Wed, 21 Jul 2021 15:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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="gTOs/tdn"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S230316AbhGUWOi (ORCPT + 7 others); Wed, 21 Jul 2021 18:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbhGUWOh (ORCPT ); Wed, 21 Jul 2021 18:14:37 -0400 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD233C0613C1 for ; Wed, 21 Jul 2021 15:55:12 -0700 (PDT) Received: by mail-ot1-x335.google.com with SMTP id b18-20020a0568303112b02904cf73f54f4bso613253ots.2 for ; Wed, 21 Jul 2021 15:55:12 -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:mime-version :content-transfer-encoding; bh=OIA/EHvm8TMC4nrq8jGhCGqjd/LXVCmlR0jUUrUwOI4=; b=gTOs/tdnGF3XjKpo9idP+49jKV0q8Jr5s7xrA3gYJC+uXy7B829NWRtUcB4SjYhK7s UmSVIQgvRP1DB49wIBXIFd7CaqkKBH07bZdVH1ViIGaaUcvxjsScTLeX2hFaRvXOfX2v EB9JQp73aOgo7KTcaffcJMZy/1T6RVhA3KhSATxMgXgndOp0xHgaJhgy9UhmqNVTknja 5NYcNf2fvfk+/ZrdIYQcpox/PrQmG7oVF4ywnSMmnzLYsVM+P0A82/YIJP8SnxGc/CG8 znReYiaisIMs4W84ky7dnwH0w7tthS5vPB1RkZQF9asApBZrvmlkp7ggyixc4T9jTHQR kT7A== 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:mime-version :content-transfer-encoding; bh=OIA/EHvm8TMC4nrq8jGhCGqjd/LXVCmlR0jUUrUwOI4=; b=mauen37w33atyZOEvtCPj2AmWyLVVTLBQmsAy3w/zK1p3weFqcl2iTAi9i1bDm5Lng 6CWGLux2kJfF4MdzMcDyKjkcydl+xEVzWdVTOB/usQLl89MCFwT3TgU8aD6x6ZYmfcgQ w/8xDDvkDpvNFCHKTaSuP+ZiRJGfct9PPnx4Hl+RR0Gjx5YkxUCZUxHwXZj1IREexjpS gaR3vSU3UzJIXllT6rFNQkPX2ce+p3efow+E+8jqLtY4KS9EFml2oMOx3ZRrleWzw5LF PL8DNK2UC7HhoJ9h8nZXxu7K8ihWrKvWLDi+vT1LT7rA6a3noytOrHU+wf7liYxGcDzY UWxQ== X-Gm-Message-State: AOAM530W8U2lead0BEVfRzICVdk5vNh9rCEt8c4bfgw5/Y23OXsL88O3 6H/2zxLLRfn1+jknIInUyf4WZw== X-Received: by 2002:a05:6830:161a:: with SMTP id g26mr15351559otr.186.1626908112143; Wed, 21 Jul 2021 15:55:12 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id w24sm4960010otp.28.2021.07.21.15.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 15:55:11 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Taniya Das Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: qcom: gpucc-sm8150: Add SC8180x support Date: Wed, 21 Jul 2021 15:53:29 -0700 Message-Id: <20210721225329.3035779-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The GPU clock controller found in SC8180x is a variant of the same block found in SM8150, but with one additional clock frequency for the gmu_clk_src clock. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/clock/qcom,gpucc.yaml | 1 + drivers/clk/qcom/gpucc-sm8150.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) -- 2.29.2 diff --git a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml index ecfe21284073..46dff46d5760 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,gpucc.yaml @@ -26,6 +26,7 @@ properties: - qcom,sdm845-gpucc - qcom,sc7180-gpucc - qcom,sc7280-gpucc + - qcom,sc8180x-gpucc - qcom,sm8150-gpucc - qcom,sm8250-gpucc diff --git a/drivers/clk/qcom/gpucc-sm8150.c b/drivers/clk/qcom/gpucc-sm8150.c index 80fb6f73601d..8422fd047493 100644 --- a/drivers/clk/qcom/gpucc-sm8150.c +++ b/drivers/clk/qcom/gpucc-sm8150.c @@ -82,6 +82,14 @@ static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = { { } }; +static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src_sc8180x[] = { + F(19200000, P_BI_TCXO, 1, 0, 0), + F(200000000, P_GPLL0_OUT_MAIN_DIV, 1.5, 0, 0), + F(400000000, P_GPLL0_OUT_MAIN, 1.5, 0, 0), + F(500000000, P_GPU_CC_PLL1_OUT_MAIN, 1, 0, 0), + { } +}; + static struct clk_rcg2 gpu_cc_gmu_clk_src = { .cmd_rcgr = 0x1120, .mnd_width = 0, @@ -277,6 +285,7 @@ static const struct qcom_cc_desc gpu_cc_sm8150_desc = { }; static const struct of_device_id gpu_cc_sm8150_match_table[] = { + { .compatible = "qcom,sc8180x-gpucc" }, { .compatible = "qcom,sm8150-gpucc" }, { } }; @@ -290,6 +299,9 @@ static int gpu_cc_sm8150_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); + if (of_device_is_compatible(pdev->dev.of_node, "qcom,sc8180x-gpucc")) + gpu_cc_gmu_clk_src.freq_tbl = ftbl_gpu_cc_gmu_clk_src_sc8180x; + clk_trion_pll_configure(&gpu_cc_pll1, regmap, &gpu_cc_pll1_config); return qcom_cc_really_probe(pdev, &gpu_cc_sm8150_desc, regmap);