From patchwork Fri Jan 19 00:01:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 863234 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=codeaurora.org header.i=@codeaurora.org header.b="JxWW8J20"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="F4SC3alK"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zN1Gr0p2yz9t67 for ; Fri, 19 Jan 2018 11:02:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932882AbeASACZ (ORCPT ); Thu, 18 Jan 2018 19:02:25 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:53446 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932502AbeASACY (ORCPT ); Thu, 18 Jan 2018 19:02:24 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3924C608CB; Fri, 19 Jan 2018 00:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516320143; bh=jPyv8gh5UgqYCLlpzlD/M3LKRGcBUILOX/UmDProONs=; h=From:To:Cc:Subject:Date:From; b=JxWW8J20wMR4UzRae4J2MnQUs0AZxcU76l3V6KGEM7UsyV4ylMkRups70P4iYaLVC 9YtrUtqEmOjuYv6Rjovkjhp2n/suxS0fS2wX9em2vX64mxAskuqAeLbySvmcl8ex6d I2tzHQ7lIeluspq/oDZ46qXNAWUAaFnsC6Csqudo= 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 codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 326BE6038E; Fri, 19 Jan 2018 00:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516320142; bh=jPyv8gh5UgqYCLlpzlD/M3LKRGcBUILOX/UmDProONs=; h=From:To:Cc:Subject:Date:From; b=F4SC3alK+FAOaIKMJqwKOumOR0KZKyin6Tp+qdfNze2z3Bg9XTkMBFVMmcwv6YvUJ yMu3BsIrRCIWCHmBNDpJNsCUQ4mLiByLI1PiFCeYrxfrDAn/Ym6OhDPSR60x3c0j0W TD1vuOI8/QbP2l+gDm56E08iPC88RSYIW4wSdCAU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 326BE6038E 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=ilina@codeaurora.org From: Lina Iyer To: andy.gross@linaro.org, david.brown@linaro.org Cc: sboyd@codeaurora.org, rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Lina Iyer Subject: [PATCH 0/4] drivers/qcom: add RPMH communication support Date: Thu, 18 Jan 2018 17:01:53 -0700 Message-Id: <20180119000157.7380-1-ilina@codeaurora.org> X-Mailer: git-send-email 2.15.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, This set of patches add the ability for platform drivers to make use of shared resources in newer Qualcomm SoCs like SDM845. Resources that are shared between different processors in a SoC are generally controlled by a dedicated remote processor. The remote processor (Resource Power Manager or RPM in previous QCOM SoCs) receives requests for resource state from other processors using the shared resource, aggregates the request and applies the result on the shared resource. SDM845 advances this concept and uses h/w (hardened I/P) blocks for aggregating requests and applying the result on the resource. The resources could be clocks, regulators or bandwidth requests for buses. This new architecture is called RPM-hardened or RPMH in short. Since this communication mechanism is completely hardware driven without a processor intervention on the remote end, existing mechanisms like RPM-SMD are no longer useful. Also, there is no serialization of data or is data is written to a shared memory in this new format. The data used is different, unsigned 32 bits are used for representing an address, data and header. Each resource's property is a unique u32 address and have pre-defined set of property specific valid values. A request that comprises of is sent by writing to a set of registers from Linux and transmitted to the remote slave through an internal bus. The remote end aggregates this request along with requests from other processors for the and applies the result. The hardware block that houses this functionality is called Resource State Coordinator or RSC. Inside the RSC are set of slots for sending RPMH requests called Trigger Commands Sets (TCS). The set of patches are for writing the requests into these TCSes and sending them to hardened IP blocks. The driver design is split into two components. The RSC driver housed in rpmh-rsc.c and the set of library functions in rpmh.c that frame the request and transmit it using the controller. This first set of patches allow a simple synchronous request to be made by the platform drivers. Future patches will add more functionality that cater to complex drivers and use cases. Thanks, Lina Lina Iyer (4): drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs dt-bindings: introduce RPMH RSC bindings for Qualcomm SoCs drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE drivers: qcom: rpmh: add RPMH helper functions .../devicetree/bindings/arm/msm/rpmh-rsc.txt | 134 ++++ drivers/soc/qcom/Kconfig | 7 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/rpmh-internal.h | 26 + drivers/soc/qcom/rpmh-rsc.c | 686 +++++++++++++++++++++ drivers/soc/qcom/rpmh.c | 264 ++++++++ include/dt-bindings/soc/qcom,rpmh-rsc.h | 16 + include/soc/qcom/rpmh.h | 41 ++ include/soc/qcom/tcs.h | 38 ++ include/trace/events/rpmh.h | 89 +++ 10 files changed, 1302 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/msm/rpmh-rsc.txt create mode 100644 drivers/soc/qcom/rpmh-internal.h create mode 100644 drivers/soc/qcom/rpmh-rsc.c create mode 100644 drivers/soc/qcom/rpmh.c create mode 100644 include/dt-bindings/soc/qcom,rpmh-rsc.h create mode 100644 include/soc/qcom/rpmh.h create mode 100644 include/soc/qcom/tcs.h create mode 100644 include/trace/events/rpmh.h --- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- 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