Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5925733imm; Tue, 26 Jun 2018 22:15:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLTl2WDD20Nd6FU4+c0atpOBip0OnvIymsO5RyqXJI2BxggSuAAL/rXL2I48V5wMEn+edyq X-Received: by 2002:a17:902:6bc7:: with SMTP id m7-v6mr4671214plt.162.1530076547187; Tue, 26 Jun 2018 22:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530076547; cv=none; d=google.com; s=arc-20160816; b=JBt6Xq+yEASlBSB18dyG3/e8uOq4D7/WoRglLWMzOlZ6WicGLayzngMH5lEfuFlcnU kkxtj0U507f63W4ZXcXysNDyWzITEU8YuFxH8/xX+PNem6ZgLhKwrwtp5Nx8H5w1uFMX Ov7Jd3Qze5sXUa/jJjawqq0LAILwgglFMWVqUYygHgG661TpQwgcAQBA4Hyouep58REn jSqJFxWlIEQzMGJir3sJMD3xXRLgiI5uw+MYmGFQU1SWhCFAtN+SwXJ3OXAq9fYkNgxB 3oOxNWGBP9FqRVz1Esi1EtKTk7eN+IeEs6OSFTlmPlMh3JehDWnhpjc1K0O+NQURIpFb dO3Q== 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=UBHIpABHszQVReTsIcOpoMNtseEUeV9pDMV8k3xtTmE=; b=MnkTENaTF+dEr6H7Uyhcey4E4RtxPIvckS1D7Xxena+tYK5ygVW+d0Wfouh1MSlH/6 hBtgRdQjCBmmwQFt6OtfuDwTdJLZ3DWJjg9yf+z2/82rk3n4gLItiyBgjzWD5li7PGj+ agPcFI21CjCuOj2k5okSbJ1f0rARvon8/DPkqLce3Ljl9FeTkv/6LSRBKy88g3cfSb1X I8AgafJxASk8Qt0/AdhG/I1O9/RsV/+lQIYMiCsUmZIh8C3gOq/gFUtLV5NasiiQCTAu K0Vc9doZbzqVnRLYNjLZdLAI+ldnCohpPetUP00FcPjsuYxy+eKGANJAl1bZ8EdF6++b wv1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=YIyNpmng; dkim=pass header.i=@codeaurora.org header.s=default header.b=om5ZZNdj; 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 a9-v6si2969001pla.377.2018.06.26.22.15.33; Tue, 26 Jun 2018 22:15:47 -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=YIyNpmng; dkim=pass header.i=@codeaurora.org header.s=default header.b=om5ZZNdj; 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 S1753045AbeF0ExF (ORCPT + 99 others); Wed, 27 Jun 2018 00:53:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57488 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbeF0ExD (ORCPT ); Wed, 27 Jun 2018 00:53:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 70946606FA; Wed, 27 Jun 2018 04:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530075182; bh=lvhplJa4cvAehezo3DI2d/XiZ0PSuQgVmNtsvAZXaOw=; h=From:To:Cc:Subject:Date:From; b=YIyNpmng3ooUvzNxBEkozqxFfUge/I32Omufekv85nH8sjHf+3EBzDYHSQ4eVMlSU C+Iub2CQIw9u+Mhp2oEWEEfzphI3kQQeU/8RwyviSeB6wM52qpv7pRWxWwpxbxFHq+ ILNMCw9cQ/nGFOFYEQjcsGpCPxTc4lY4MKJk5Fhs= 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 blr-ubuntu-173.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E174C606FA; Wed, 27 Jun 2018 04:52:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530075181; bh=lvhplJa4cvAehezo3DI2d/XiZ0PSuQgVmNtsvAZXaOw=; h=From:To:Cc:Subject:Date:From; b=om5ZZNdj4CyY9u2AURENGIqtJeqULZc2n0WYDuyDz5XaLIkgqEKTsG2eTUSbkfk+f kS+bVFvwHDl/V6xqZ+4IiRdLrW8oIB9zrSvXLtl7dIH7/jhCNVepGfwalA1bwCQaLP GZ2+TcEoI0e/PA3tOmQYcRvGEiSgirOveHd3oi/4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E174C606FA 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=rnayak@codeaurora.org From: Rajendra Nayak To: viresh.kumar@linaro.org, sboyd@kernel.org, andy.gross@linaro.org, ulf.hansson@linaro.org, collinsd@codeaurora.org, mka@chromium.org Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rajendra Nayak Subject: [PATCH v4 0/6] Add power domain driver for corners on msm8996/sdm845 Date: Wed, 27 Jun 2018 10:22:28 +0530 Message-Id: <20180627045234.27403-1-rnayak@codeaurora.org> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes in v4: * Included the patch to add qcom-opp bindings (dropped accidentally in v3) * merged the patches to add bindings for rpm and rpmh, added consumer binding example * Made the drivers built in, removed .remove * Added better description in changelog for PATCH 6/6 * Updated rpmhpd_aggregate_corner() based on Davids feedback * rpmhpd_set_performance_state() returns max corner, in cases where its called with an INT_MAX * Dropped the patch to max vote on all corners at init, the patch did not work anyway, and it shouldn't be needed now Changes in v3: * Bindings split into seperate patches * Bindings updated to remove duplicate OPP table phandles * DT headers defining macros for Power domain indexes and OPP levels * Optimisations to use rpmh_write_async() whereever applicable * Fixed up handling of ACTIVE_ONLY/WAKE_ONLY/SLEEP voting for RPMh * Fixed the vlvl to hlvl conversions in set_performance * Other minor fixes based on review of v2 * TODO: This series does not handle the case where all VDD_MX votes should be higher than VDD_CX from APPs, as pointed out by David Collins in v2. This needs support at genpd to propogate performance state up the parents, if we model these as Parent/Child to handle the interdependency. Changes in v2: * added a power domain driver for sdm845 which supports communicating to RPMh * dropped the changes to sdhc driver to move over to using OPP as there is active discussion on using OPP as the interface vs handling all of it in clock drivers * Other minor binding updates based on review of v1 With performance state support for genpd/OPP merged, this is an effort to model a power domain driver to communicate corner/level values for qualcomm platforms to RPM (Remote Power Manager) and RPMh. Rajendra Nayak (6): dt-bindings: opp: Introduce qcom-opp bindings dt-bindings: power: Add qcom rpm power domain driver bindings soc: qcom: rpmpd: Add a Power domain driver to model corners soc: qcom: rpmpd: Add support for get/set performance state arm64: dts: msm8996: Add rpmpd device node soc: qcom: rpmhpd: Add RPMh Power domain driver .../devicetree/bindings/opp/qcom-opp.txt | 25 ++ .../devicetree/bindings/power/qcom,rpmpd.txt | 146 +++++++ arch/arm64/boot/dts/qcom/msm8996.dtsi | 34 ++ drivers/soc/qcom/Kconfig | 18 + drivers/soc/qcom/Makefile | 2 + drivers/soc/qcom/rpmhpd.c | 406 ++++++++++++++++++ drivers/soc/qcom/rpmpd.c | 340 +++++++++++++++ include/dt-bindings/power/qcom-rpmpd.h | 39 ++ 8 files changed, 1010 insertions(+) create mode 100644 Documentation/devicetree/bindings/opp/qcom-opp.txt create mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.txt create mode 100644 drivers/soc/qcom/rpmhpd.c create mode 100644 drivers/soc/qcom/rpmpd.c create mode 100644 include/dt-bindings/power/qcom-rpmpd.h -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation