From patchwork Fri Aug 4 14:31:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 109402 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp2234052qge; Fri, 4 Aug 2017 07:32:06 -0700 (PDT) X-Received: by 10.99.3.197 with SMTP id 188mr2653365pgd.288.1501857126501; Fri, 04 Aug 2017 07:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501857126; cv=none; d=google.com; s=arc-20160816; b=GS/h/p7SH3if7O+RoZLlX+08YNLUtdXv3mUSj41f9R+koSlWb6m/E0Sy/lBUUeFxUz ZdiX3RR+THvCMbrdNafYBr5L6MdW6k2gaSOTcjeEof/VX81hN/ZrJ2DtlMgFft+TUX2y TEl+e+Bzx2APifRKK2k+ocVot8TrpjfSHWyVzLQbB9kUfXgSXJq1Co3pkb0ZB2qGQAtg 7/pCOXQgLU55Dw3tlNXBLeVwUFpjOESADO/u+mrJ5loR/RDI7I6EW6GyiA1YxeGgav9X sXIbLYR35VRh9Vz++6rvugwbLuxh/nzhDM0wbdseGjclHCBo8DScqct9+L3D1alU+vb+ 0vJA== 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 :arc-authentication-results; bh=JOPWrjDu7u9//3Xpurvq76xvqLAZk95vtX5DzDzWTtM=; b=DzcLaKaAdvhj6U0wQpPxOYAI0z98wNrubzDYnlKF89GNgNouBzkFQdnj7qcnkPuVd6 PWJwcKq0bp3TGUrzFm8S4RgFMpgwChQjLzH0JPy1NnLngTsVeq6qeb5/iP7stMa/GJ/n mxedansWSSDRwBiszofeexTegjujUJNcAgPgtDVpGyVXmkWTQIMZw9mPHmb1z+Rjg8GO NufFIrUvgssVsGVlju1leLpk6evs70YF1inKAAi0zX5qDnJr/tN404CYqOnQ9RkKmw3D w5dasWk7buOx30J0X1z9vY2ZCkJp7vNU51ckVf5XBkTOhJ0DWILP0sPubJ8GPpFewMOL nbfg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 138si1050969pgh.729.2017.08.04.07.32.06; Fri, 04 Aug 2017 07:32:06 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbdHDOcF (ORCPT + 6 others); Fri, 4 Aug 2017 10:32:05 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54152 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304AbdHDOcE (ORCPT ); Fri, 4 Aug 2017 10:32:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6A2380D; Fri, 4 Aug 2017 07:32:03 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C6D833F3E1; Fri, 4 Aug 2017 07:32:01 -0700 (PDT) From: Sudeep Holla To: ALKML , LKML , DTML Cc: Sudeep Holla , Roy Franz , Harb Abdulhamid , Nishanth Menon , Arnd Bergmann , Loc Ho , Alexey Klimov , Ryan Harkin , Jassi Brar Subject: [PATCH v2 00/18] firmware: ARM System Control and Management Interface(SCMI) support Date: Fri, 4 Aug 2017 15:31:26 +0100 Message-Id: <1501857104-11279-1-git-send-email-sudeep.holla@arm.com> 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 Hi all, Let me begin admitting that we are introducing yet another protocol to achieve same things as many existing protocols like ARM SCPI, TI SCI, QCOM RPM, Nvidia Tegra BPMP, and so on. All I can say is that this new ARM System Control and Management Interface(SCMI) is more flexible and easily extensible than any of the existing ones. Many vendors were involved in the making of this formal specification and is now officially published[1]. There is a strong trend in the industry to provide micro-controllers in systems to abstract various power, or other system management tasks. These controllers usually have similar interfaces, both in terms of the functions that are provided by them, and in terms of how requests are communicated to them. This specification is to standardise and avoid (any further) fragmentation in the design of such interface by various vendors. This patch set is intended to get feedback on the design and structure of the code. This is not complete and not fully tested due to non-availability of firmware with full feature set at this time. It currently doesn't support notification, asynchronous/delayed response, perf/power statistics region and sensor register region to name a few. I have borrowed some of the ideas of message allocation/management from TI SCI. I had previously posted RFC[2]. Changes: v1->v2: - Additional support for polling based DVFS and per protocol channels - Dependent drivers(clock, hwmon, cpufreq and power domains) - Various other review comments and issued found during testing addressed - Explicit binding for method dropped as even SMC based method are adviertised as mailbox RFC->v1: - Add generic mailbox binding for shared memory(Rob H) - Dropped compatibles per protocol(Suggested by Matt S) - Dropped lot of unnecessary pointer casting(Arnd B) - Dropped packing of structures(Arnd B) - Few other changes/additions based initial testing with firmware providing SCMI interface to OSPM -- Regards, Sudeep [1] http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/index.html [2] https://marc.info/?l=linux-kernel&m=149685193627620&w=2 [3] https://marc.info/?l=linux-arm-kernel&m=149849482623492&w=2 Sudeep Holla (18): dt-bindings: mailbox: add support for mailbox client shared memory dt-bindings: arm: add support for ARM System Control and Management Interface(SCMI) protocol firmware: arm_scmi: add basic driver infrastructure for SCMI firmware: arm_scmi: add common infrastructure and support for base protocol firmware: arm_scmi: add initial support for performance protocol firmware: arm_scmi: add initial support for clock protocol firmware: arm_scmi: add initial support for power protocol firmware: arm_scmi: add initial support for sensor protocol firmware: arm_scmi: probe and initialise all the supported protocols firmware: arm_scmi: add support for polling based SCMI transfers firmware: arm_scmi: add option for polling based performance domain operations firmware: arm_scmi: refactor in preparation to support per-protocol channels firmware: arm_scmi: add per-protocol channels support using idr objects firmware: arm_scmi: add device power domain support using genpd clk: add support for clocks provided by SCMI hwmon: add support for sensors exported via ARM SCMI cpufreq: add support for CPU DVFS based on SCMI message protocol cpufreq: scmi: add support for fast frequency switching Documentation/devicetree/bindings/arm/arm,scmi.txt | 174 ++++ .../devicetree/bindings/mailbox/mailbox.txt | 28 + drivers/clk/Kconfig | 10 + drivers/clk/Makefile | 1 + drivers/clk/clk-scmi.c | 216 +++++ drivers/cpufreq/Kconfig.arm | 11 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/scmi-cpufreq.c | 284 ++++++ drivers/firmware/Kconfig | 34 + drivers/firmware/Makefile | 1 + drivers/firmware/arm_scmi/Makefile | 3 + drivers/firmware/arm_scmi/base.c | 293 ++++++ drivers/firmware/arm_scmi/clock.c | 339 +++++++ drivers/firmware/arm_scmi/common.h | 126 +++ drivers/firmware/arm_scmi/driver.c | 992 +++++++++++++++++++++ drivers/firmware/arm_scmi/perf.c | 514 +++++++++++ drivers/firmware/arm_scmi/power.c | 242 +++++ drivers/firmware/arm_scmi/scmi_pm_domain.c | 134 +++ drivers/firmware/arm_scmi/sensors.c | 287 ++++++ drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 1 + drivers/hwmon/scmi-hwmon.c | 261 ++++++ include/linux/scmi_protocol.h | 215 +++++ 23 files changed, 4179 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/arm,scmi.txt create mode 100644 drivers/clk/clk-scmi.c create mode 100644 drivers/cpufreq/scmi-cpufreq.c create mode 100644 drivers/firmware/arm_scmi/Makefile create mode 100644 drivers/firmware/arm_scmi/base.c create mode 100644 drivers/firmware/arm_scmi/clock.c create mode 100644 drivers/firmware/arm_scmi/common.h create mode 100644 drivers/firmware/arm_scmi/driver.c create mode 100644 drivers/firmware/arm_scmi/perf.c create mode 100644 drivers/firmware/arm_scmi/power.c create mode 100644 drivers/firmware/arm_scmi/scmi_pm_domain.c create mode 100644 drivers/firmware/arm_scmi/sensors.c create mode 100644 drivers/hwmon/scmi-hwmon.c create mode 100644 include/linux/scmi_protocol.h -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html