From patchwork Mon Jan 28 18:32:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 156860 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3748381jaa; Mon, 28 Jan 2019 10:33:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN693qwnsemWHvg+utNH8mrwSHCT5bicrka4FG3lRkGWKAstLBjzxUIM3VcvBJvm2Mk5ya/X X-Received: by 2002:aa7:81d0:: with SMTP id c16mr22774992pfn.153.1548700399035; Mon, 28 Jan 2019 10:33:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548700399; cv=none; d=google.com; s=arc-20160816; b=sO2VA2Cugk824GrkUxDb0PsoTmfuCS0OJ3lYTBhmUnFg4ssLimm/u58OLTC1V9xo/a OaAOm/TOOyX9wY/OLiQKXzFPR+vIJQ6NiZlWajuGiKT/sOEMo6sSJGqkBFUg5pX9kije QETvPF7SO3zj4FoDSIlzhoJmTMyhNfqqq3iZrhF/80emfz3IAItaWmMZQ6yyS7mh3f28 goVn/iQJcRZfnRZoEi7L+UDlv/xPe8t1FRItdmMwAkWSvBPVE4ycEG+0jbhLbn7/AAkk Ms4U5OnkO7NS1S5TnYA4AJ4VDPYfJPTm3UYnDri/ATw2tcZaoCTr9JQ5m86xNh6LAX+l NOEQ== 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 :dkim-signature; bh=ePCCBTV1D/rgy7QpQRMhWU66DEdJXmEhHQjyHV5CCKE=; b=x8ix+2AtayhpAOqbp3MwFc3AqfQpr/+A69mXdcH32zl134gRGnb89detJ4GOvm+PR3 5MpRiqYwZnsRs8AJdQP/gLAaXxMaA+is04OjgTYT3jPjOJris6EB+9b+30td63Y4NdLR RmhukGEHzQaAKMD7qD7l7X4RPsjnpyMpFEth6kLPEl1QfCr6jUQOHw3e+XWbtVEkcL80 cxEpDknGaq9FE44KFVOMio5HQtVFB/yuywEvv1x4Uln3+mzt6pYcbnjKKbuLMS1M0f4t 7t1FrJdqSX5q4AyW5psVobEtui2jPDGJAD6ySaBa25h7RP37CsvPtaYKT06f8Zpu6VEo ndmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZkkgjNoF; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id y7si11516726pgq.545.2019.01.28.10.33.18; Mon, 28 Jan 2019 10:33:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=@linaro.org header.s=google header.b=ZkkgjNoF; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 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 S1727257AbfA1SdS (ORCPT + 7 others); Mon, 28 Jan 2019 13:33:18 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44876 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727750AbfA1SdS (ORCPT ); Mon, 28 Jan 2019 13:33:18 -0500 Received: by mail-wr1-f67.google.com with SMTP id z5so19195241wrt.11 for ; Mon, 28 Jan 2019 10:33:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ePCCBTV1D/rgy7QpQRMhWU66DEdJXmEhHQjyHV5CCKE=; b=ZkkgjNoFWO4eaFliYBVr2XLSoTnkWguoBC13eb+U+cHvWebKhZdtAokMzI4eQEsEyq jau2pa2nXCsKPsrjFRFPAHvZMc4IqVY98wAAqy9blZc4nOayUFgq6Nb51l/R0+Cb6Ve1 kCH9gNAxfyuYiX5p5WNW6lSjmAVQTHCZken4U= 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; bh=ePCCBTV1D/rgy7QpQRMhWU66DEdJXmEhHQjyHV5CCKE=; b=RTWQ9tbmeyGVuN0+/FTy+rvrC8hjOZQI1KVB4qXf48avRQ8nKbeZ2J4MlpVq20UYfN B/NjX0qbfye8AEZI+Il36PsKgpPMf1LV3wr0D0Ro2hqneYI+ddmL0ysA4RQQZJ++F9NF Lg6RMgND7hdy3xNqfXN11wEi5RmxtSUGKx5waXFaGGciEusg5m6qT3tOQ8FtNAdrPY7a 8bUMf4z+oakR8eBnxA+lN786GAPZZNLGHxBKZGdDjr67JS4ZMGy74+4T0tRtnz2fPeer 3OL+eQfhizeD2NaBxefOnHQC9cHmpT7Xcis5BkeJ3Icf46UusiEBaLdz0wxjojsiSSPi //8g== X-Gm-Message-State: AHQUAuYZ8adNDKqHtcXnfzyTJhdFJcQ60DV8fxGZdBDt8xPg3Zjem0wr iElhsJ0q5JZAI4QXCdSw2kN61Q== X-Received: by 2002:adf:be0f:: with SMTP id n15mr9993608wrh.267.1548700395986; Mon, 28 Jan 2019 10:33:15 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:15 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 00/14] Support CPU frequency scaling on QCS404 Date: Mon, 28 Jan 2019 19:32:47 +0100 Message-Id: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The following patchset enables CPU frequency scaling support on the QCS404. Patch 8 "clk: qcom: hfpll: CLK_IGNORE_UNUSED" is a bit controversial; in this platform, this PLL provides the clock signal to a CPU core. But in others it might not. I opted for the minimal ammount of changes without affecting the default functionality: simply bypassing the COMMON_CLK_DISABLE_UNUSED framework and letting the firwmare chose whether to enable or disable the clock at boot. However maybe a DT property and marking the clock as critical would be more appropriate for this PLL. I'd appreciate the maintainer's input on this topic. v2: - dts: ms8916: apcs mux/divider: new bindings (the driver can still support the old bindings) - qcs404.dtsi fix apcs-hfpll definition fix cpu_opp_table definition - GPLL0_AO_OUT operating frequency define new alpha_pll_fixed_ops to limit the operating frequency Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Jorge Ramirez-Ortiz (14): clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency mbox: qcom: add APCS child device for QCS404 mbox: qcom: replace integer with valid macro dt-bindings: mailbox: qcom: Add clock-name optional property clk: qcom: apcs-msm8916: get parent clock names from DT clk: qcom: hfpll: get parent clock names from DT clk: qcom: hfpll: register as clock provider clk: qcom: hfpll: CLK_IGNORE_UNUSED arm64: dts: qcom: msm8916: Add the clocks for the APCS mux/divider arm64: dts: qcom: qcs404: Add OPP table arm64: dts: qcom: qcs404: Add HFPLL node arm64: dts: qcom: qcs404: Add the clocks for APCS mux/divider arm64: dts: qcom: qcs404: Add cpufreq support arm64: defconfig: Enable HFPLL .../bindings/mailbox/qcom,apcs-kpss-global.txt | 24 +++++++++++++-- arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 +- arch/arm64/boot/dts/qcom/qcs404.dtsi | 35 ++++++++++++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/clk/qcom/apcs-msm8916.c | 32 +++++++++++++++----- drivers/clk/qcom/clk-alpha-pll.c | 8 +++++ drivers/clk/qcom/clk-alpha-pll.h | 1 + drivers/clk/qcom/gcc-qcs404.c | 3 +- drivers/clk/qcom/hfpll.c | 19 +++++++++++- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 21 ++++++++----- 10 files changed, 125 insertions(+), 22 deletions(-) -- 2.7.4 Acked-by: Stephen Boyd Acked-by: Stephen Boyd