Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp182987imm; Mon, 21 May 2018 04:27:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpJkLFHpzqdIlKMsKszfNwaB9awaW7dyxgw/AaDf0zuQT6+dbLaD1sv6A2VW+xzztP4g0SM X-Received: by 2002:a65:48c9:: with SMTP id o9-v6mr15758308pgs.106.1526902039568; Mon, 21 May 2018 04:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526902039; cv=none; d=google.com; s=arc-20160816; b=01Jj88cioO6K2Dx8tcesdVsSASUr8HkSOH9diclZdpJJHEqXb+bBmS4U2CUch7xgD8 YuGQceX7PwTutsyZ7b0JmM3/Aw2JQy5xom+/peYPkTFGOEqOqRxFnX7iJtWxIY1GfKVi aVb5GgASgUYzuroW0PY8YmpqdoeSeJDjIajAh9USMSCQAyxWkXJzEpxQlnQBRd5pFvSV OBrn6gHlohoY2PLtbsBxwvV4Y0Y/6BxzJd7RXd5JrSl2K07tlqQahVuGtP+Wb3fGXtcV fSehJQx2EE+13BcQWYVtWSTktpvLlvdg3WuLYWnB4jCaRv/XPiTN6v0KpvjN6d/vpXrt eVhA== 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 :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=qHY6UgIM/2yfaqzm4SBFJE7lWGGvm+L1lBiUE0jkBfA=; b=V+na5YYNeJDWCpkV9FtA+/QMbDjDCPUbLSuFsfk5AJHvLt8FqdJVYrJN2eTbd2y1jm KLqRkMeVKh54f3lEsp+t0I0LvyrDF3HAigQUDmpAFOkYCJiawGHL/3Yydlo0XW1RdsUI GjxzLe3WALSRtSbLaLiaD/r9Nh0SuxEK04MfwUyoeUwzeF1NKuD37HT+vAelOAzztjW6 ArqDSCFxOqn6d2aXtl0jRakkXDYImBuIC9qWoOXcfHsJXH2KlN867h5FwtIwxE8ViH53 h/g0bw6t/x+en2S+7PhPSCFVA9aEwQ9sz/QHuG2hS4KJt57YMbgPAgAGPiGFkjU6XKjm UZww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=WQ7uc+wG; dkim=pass header.i=@codeaurora.org header.s=default header.b=O/Xtwmbu; 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 f127-v6si8317482pgc.503.2018.05.21.04.27.05; Mon, 21 May 2018 04:27:19 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=WQ7uc+wG; dkim=pass header.i=@codeaurora.org header.s=default header.b=O/Xtwmbu; 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 S1752755AbeEULZp (ORCPT + 99 others); Mon, 21 May 2018 07:25:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35886 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbeEULZm (ORCPT ); Mon, 21 May 2018 07:25:42 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A8C6A60314; Mon, 21 May 2018 11:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526901941; bh=GngyKO6dSyoZJS3dfLiUgMlyuKI7g3YOeSr/rZ80nFo=; h=From:To:Cc:Subject:Date:From; b=WQ7uc+wGfjOsjaSkA00zuceM/IUs/pwAibKNeS9bvHcHOB6zzPr4XZIwpyueQln1W xs4IQNw3KLmzjdrr+vN5xhjM6Tv2ZTYAG+awxaa/ZmrpU9pVFrT35DHS+j/GuwbpWQ v+odl2alpDVvrR01dQYcA1rBAz3AZ4ocxTU4x0EQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lx-ilial.mea.qualcomm.com (unknown [185.23.60.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilialin@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8359E60314; Mon, 21 May 2018 11:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526901940; bh=GngyKO6dSyoZJS3dfLiUgMlyuKI7g3YOeSr/rZ80nFo=; h=From:To:Cc:Subject:Date:From; b=O/XtwmbufGLivgucddcjCR0O7opc40J5AarVqlWioei9/KgURuFBL6HmFS0BpCo3o Z4Vz8l02mFrT1QreU95B3xR2fRC5YDTpvM2DyZGgXvp5VM0fD00qmVXNPjynwUi6J8 KyVxWdhYLdvFFe7/EoAmXbZe1UH2EzX4hn2tjIv4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8359E60314 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilialin@codeaurora.org From: Ilia Lin To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, viresh.kumar@linaro.org, nm@ti.com, lgirdwood@gmail.com, broonie@kernel.org, andy.gross@linaro.org, david.brown@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rnayak@codeaurora.org, ilialin@codeaurora.org, amit.kucheria@linaro.org, nicolas.dechesne@linaro.org, celster@codeaurora.org, tfinkel@codeaurora.org Subject: [PATCH v9 00/15] CPU scaling support for msm8996 Date: Mon, 21 May 2018 14:25:17 +0300 Message-Id: <1526901932-9514-1-git-send-email-ilialin@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [v9] * Addressed comments from Viresh and Russel about the error handling [v8] * Reordered the patch series into 4 groups * Addressed comments from Amit about the comments and commit messages * Addressed comments from Amit and Viresh about the resourses deallocation [v7] * Addressed comments from Viresh about resourses deallocation and DT compatible [v6] * Addressed comments from Viresh about: ** Comments style ** Kconfig bool instead of tristate ** DT and documentation style ** Resourses deallocation on an error ** Typos [v5] * Rebased * Addressed comments from Bjorn about SPDX style, functions and parameters naming * Addressed comments from Viresh DT properties and style, comments style, resourses deallocation, documentation placement * Addressed comments from Sricharan about unnessesary include * Addressed comments from Nicolas * Addressed comments from Rob about the commit messages and acks * Addressed comments from Mark [v4] * Adressed all comments from Stephen * Added CPU regulator support * Added qcom-cpufreq-kryo driver [v3] * Rebased on top of the latest PLL driver changes * Addressed comment from Rob Herring for bindings [v2] * Addressed comments from Rob Herring for bindings * Addressed comments from Mark Rutland for memory barrier * Addressed comments from Julien Thierry for clock reenabling condition * Tuned the HW configuration for clock frequencies below 600MHz The series contains 4 groups of patches, which can be merged in the chain order, while each group depends on all the previous groups. (However, Only SOC, or SOC and Clocks, or SOC and Clocks and Cpufreq will work) SOC (1/15): Extracts the kryo l2 accessors driver from the QCOM PMU driver Clocks (2/15-9/15): This series adds support for the CPU clocks on msm8996 devices. The driver uses the existing PLL drivers and is required to control the CPU frequency scaling on the MSM8996. Cpufreq (10/15-12/15): The qcom-cpufreq-kryo driver is aimed to support different SOC versions. The driver reads eFuse information and chooses the required OPP subset by passing the OPP supported-hw parameter. Regulators (13/15-15/15): Added SAW regulator support to the SPMI regulator driver. The SAW regulators will be controlled through special CPU registers instead of direct SPMI accesses. Ilia Lin (13): soc: qcom: Separate kryo l2 accessors from PMU driver clk: Use devm_ in the register fixed factor clock clk: qcom: Add CPU clock driver for msm8996 dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 clk: qcom: cpu-8996: Add support to switch below 600Mhz clk: qcom: Add ACD path to CPU clock driver for msm8996 dt: qcom: Add opp and thermal to the msm8996 cpufreq: Add Kryo CPU scaling driver dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu dt: qcom: Add qcom-cpufreq-kryo driver configuration regulator: qcom_spmi: Add support for SAW dt-bindings: qcom_spmi: Document SAW support dt: qcom: Add SAW regulator for 8x96 CPUs Rajendra Nayak (2): clk: qcom: Make clk_alpha_pll_configure available to modules clk: qcom: cpu-8996: Add support to switch to alternate PLL .../devicetree/bindings/clock/qcom,kryocc.txt | 17 + .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 +++++++++++++++++++++ .../bindings/regulator/qcom,spmi-regulator.txt | 45 ++ arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 665 +++++++++++++++++++- drivers/clk/clk-fixed-factor.c | 2 +- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clk-alpha-pll.c | 1 + drivers/clk/qcom/clk-alpha-pll.h | 6 + drivers/clk/qcom/clk-cpu-8996.c | 510 ++++++++++++++++ drivers/cpufreq/Kconfig.arm | 10 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 164 +++++ drivers/perf/Kconfig | 1 + drivers/perf/qcom_l2_pmu.c | 90 +-- drivers/regulator/qcom_spmi-regulator.c | 133 +++- drivers/soc/qcom/Kconfig | 3 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/kryo-l2-accessors.c | 56 ++ include/soc/qcom/kryo-l2-accessors.h | 12 + 22 files changed, 2322 insertions(+), 90 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/qcom,kryocc.txt create mode 100644 Documentation/devicetree/bindings/opp/kryo-cpufreq.txt create mode 100644 drivers/clk/qcom/clk-cpu-8996.c create mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c create mode 100644 drivers/soc/qcom/kryo-l2-accessors.c create mode 100644 include/soc/qcom/kryo-l2-accessors.h -- 1.9.1