From patchwork Fri Sep 28 22:17:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jolly Shah X-Patchwork-Id: 10620379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B47C8112B for ; Fri, 28 Sep 2018 22:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A32DD2B439 for ; Fri, 28 Sep 2018 22:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95F2E2B614; Fri, 28 Sep 2018 22:18:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEE532B439 for ; Fri, 28 Sep 2018 22:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727361AbeI2EoY (ORCPT ); Sat, 29 Sep 2018 00:44:24 -0400 Received: from mail-sn1nam01on0088.outbound.protection.outlook.com ([104.47.32.88]:61216 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726909AbeI2EoW (ORCPT ); Sat, 29 Sep 2018 00:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KIRqxjIqSZw8fklunWqz4Itoz5gMdqn0SGQ/qU+mi0c=; b=LhmtVMKvGa9kzg+IemD7y5qAdDosjHCCzCkcjZ2dte9HsRWQfLubOlZ5smY4SY6lJXF/vF8VRvMdihgRBIcJO9IowTeliVGzNZI/14LpkGcESyi2lFlXl4QGTXp2t90Wl62DaOefaQigjr/CAKw6x44edGkOpz4uSZnxFgDMC28= Received: from DM6PR02CA0036.namprd02.prod.outlook.com (2603:10b6:5:1c::49) by BL0PR02MB4755.namprd02.prod.outlook.com (2603:10b6:208:5d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Fri, 28 Sep 2018 22:18:26 +0000 Received: from BL2NAM02FT045.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::208) by DM6PR02CA0036.outlook.office365.com (2603:10b6:5:1c::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1185.23 via Frontend Transport; Fri, 28 Sep 2018 22:18:26 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT045.mail.protection.outlook.com (10.152.77.16) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1185.13 via Frontend Transport; Fri, 28 Sep 2018 22:18:26 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1g615d-0008Lg-MD; Fri, 28 Sep 2018 15:18:25 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g615Y-0005vP-Hm; Fri, 28 Sep 2018 15:18:20 -0700 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w8SMIGXi021007; Fri, 28 Sep 2018 15:18:16 -0700 Received: from [172.19.2.91] (helo=xsjjollys50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g615U-0005ux-Ap; Fri, 28 Sep 2018 15:18:16 -0700 From: Jolly Shah To: , , , , , CC: , , , Rajan Vaja , Jolly Shah Subject: [PATCH v5 1/4] Documentation: xilinx: Add documentation for eemi APIs Date: Fri, 28 Sep 2018 15:17:57 -0700 Message-ID: <1538173080-7597-2-git-send-email-jollys@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538173080-7597-1-git-send-email-jollys@xilinx.com> References: <1538173080-7597-1-git-send-email-jollys@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(396003)(136003)(2980300002)(438002)(189003)(199004)(47776003)(5660300001)(34290500001)(305945005)(356003)(106466001)(6666003)(6306002)(36386004)(2906002)(63266004)(2201001)(77096007)(7696005)(478600001)(81156014)(72206003)(9786002)(48376002)(966005)(8676002)(2616005)(476003)(186003)(11346002)(76176011)(336012)(426003)(51416003)(81166006)(126002)(316002)(16586007)(36756003)(26005)(54906003)(110136005)(44832011)(50466002)(8936002)(4326008)(50226002)(486006)(107886003)(446003)(106002)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BL0PR02MB4755;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT045;1:L2Pb+m/aBZU4CMgD23cucdnImQAhzoUf7ZfdPocQ93kQziSHC+cGRM/6X08HuEZQh7YwgP7VQnL0nWp3JXtNjOGTs5UpfWUNW1ielqHkTt32pDWf3DHP+GOO4GTT1Vbf MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67177ff9-5774-4db7-1e51-08d625904fe4 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BL0PR02MB4755; X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4755;3:A1h1GOd5IyNdFMwbZvCHBf0sscnxr3MuySYmrVUihASU7HtHGe7BWhQ2W0a6k/M49ZIKX0b7U3F7Et+04nN/34Sdwy6YjlwtGYM+mbYLDLMvJsLlKxyr1VBnpeuowB00jYKixqNK/MbU0sU+roabmXERcMEFuPiKQhtyttaAhdMV9SSZp4JWVcd5ggybSiLRwIk9QL/qUeLP5GIyioG/1+rJQbExNo/Fuky89KqHS1jtKcU8GBc9LrNk29F9dgASvJJkirRJW179/7eu4X3k2hgSbOXI2nBr87FnA59W7BTNfe/hhEP/PbBqiSqyIDhYh3kV+VronR9k9UjtL5k8UFOwRK26CIZBoq3LfbVBz5s=;25:htYqmDcaCm2pX0YHG4zl2yQEO6xxxact1oKEHTIe9H7hxJnjBrWzOfhh5gUC0MAcUS0J6pGVypzzEyO2LdwdWssTMoZ3Os93f9oF+gly3ftfQ3cOVNKLbUt48GBYXUbLUZ+4nV+m+4g0I90aFzBrwyGRRR9HN7iBySgufjTtzNQe1X3T2+OlEOSV/hu4sLc47XMenvVZ0yv8vLyifzxBiyoTF/jLbV0Tg+ttpGuS87MKRZDW0kvVehZcZ6EGEXwDz0/pfto4XBBz9FfM+gsZC9oVGUV8iJ+TOPToG54LdumbeNuIHLZM0NxXFm4/hvOoTfHeNOkDO7TUQel6nNkkTw== X-MS-TrafficTypeDiagnostic: BL0PR02MB4755: X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4755;31:GDq/cjXhmR5ZhuY1tgJOrfTjwN14OFJhi9JMd2hhRG6RVcDgkk8sYXSnQPF7agIvTsBACAZvm9MBO5x5woqp811s2pV8Gtbckxfk2TPMy4HoW4XNl3PjDJGQhORiUx75f3i7qdAy8DYeNg5nLmslt+uK7yuupKCMBRH/9b2WYkX5mCTXNepemptpVLBuSiVU/bi/F5F/RFjDUP3MFdMcAyUlaJ/rY9dymbe5ezZNsbM=;20:3q0AivxPbtVB+o7MTSxGLgpgqlFGrRXz7m6BD/ANU0G/5tSr57C7h7mUZIxaxNXWYWO6g32iNyJQ8nL8LRmH9AZ+qtIJzvDqpVwhD6t2ZvXReAZUCTCPzIGl8X8TRUJtycZ19VXs1EKF1VUjPhQFB4SyC2KeSoqRIS/G76FHrpRwfa/446M0vkmi6tahDA4g+8Kijyj6CfsmMfz3NpPNVfqaZ1GPNrBxsWKuhyRV2eYev752ROMICtC8nDkTG2fQaqpJBOo9NNl9XLEHX3XTbCqtPqsvVKC/XCZDEh3xVwyG4Lzx2mxLpVoNhQKvZbY0gc5HAk0LJ2SnEFmf9Gfbw6mqp/qHWM5S/VBvoEBMGg5ENXssrOF8pgfjTLim3CWVa50OpIqbIsy4AqnsnuB1GY7t3YNKs8f1LbqZliRpGuKlXeIqJzsFUkQ/DBq+FYYGGaz2WMy2kMpVNjoPOC/mm9MAo/Cvy6DcTaGqN5wRZ6+lga+15AYxzcNEHSjZ4nx1 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(189271028609987); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051);SRVR:BL0PR02MB4755;BCL:0;PCL:0;RULEID:;SRVR:BL0PR02MB4755; X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4755;4:6s+FS59XYY2jM3BtIH2iF5HatRyKu29uppy/R5+gXxKCDdIa3khkA5Sj0r47bZHiPNPTgoincul6ao4fXGhzz/oHbRFEaLOUrr6y0Ru2zVIT/wzQPQdGq8aRqIyE8lZDRJlXmkWQccD8Bpng+/23NqkCWx+wjqT1EDmUz6TIAt6ZtjhnbDn25WkbAIPPdMfGQar7BaQjpClELloMjX002jbem2liw5F/GJJIsDaYOOLDSMmHViCLTMei/6TQ+pJxHWrFMvaaTevuugtyMmEbBWNxJkTfM5iVuBsTkmXjHps0GMIDBfBAjbrXT/Bslt1fWwK3LTd6iF0uARqYW8c/ykxubasYos+BOnSxgrmJ47U= X-Forefront-PRVS: 0809C12563 X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4755;23:15rax+0rfB+UcqLAaXerdgwZe27YnzNkQ6CICu1px26se18tNi9nZ6fLDVjs8Uee6RZ4iA988NtkAYl6IGSdEj8YqvUgktezh3GjGaXUu9ldS8cJ0uhcZpr8qIHQXV7i7V/hL1sWe+8J7Utvm59pmlX/Wmtv7oOpxDuRdMMjxjYhDh6gfEgHzf3EE8MOGXPM3d63K838NK1J2Mj8kx/O4Xmp5E3BOyxIVS/KlKzejLsG06mqfW4fXkOFP0twl4uftW6Ue14PUdbdsvyQfy8uXfCWAo7k8SgU8LgXjHfW0/lpxstmGQwUzIG6fsZNRqUc//O7sRzTvnrZ2L3uzbbV2gtFiQA6l6R3JfyHyoUbmF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n0N7W40E78L62rm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2018 22:18:26.2872 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67177ff9-5774-4db7-1e51-08d625904fe4 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB4755 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rajan Vaja Add documentation for embedded energy management interface (EEMI) APIs. It includes information about eemi ops and how to use them. It also includes API information and supported IOCTL IDs which can be used for device and control configuration. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah Acked-by: Olof Johansson --- Documentation/xilinx/eemi.txt | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/xilinx/eemi.txt diff --git a/Documentation/xilinx/eemi.txt b/Documentation/xilinx/eemi.txt new file mode 100644 index 0000000..0ab686c --- /dev/null +++ b/Documentation/xilinx/eemi.txt @@ -0,0 +1,67 @@ +--------------------------------------------------------------------- +Xilinx Zynq MPSoC EEMI Documentation +--------------------------------------------------------------------- + +Xilinx Zynq MPSoC Firmware Interface +------------------------------------- +The zynqmp-firmware node describes the interface to platform firmware. +ZynqMP has an interface to communicate with secure firmware. Firmware +driver provides an interface to firmware APIs. Interface APIs can be +used by any driver to communicate with PMC(Platform Management Controller). + +Embedded Energy Management Interface (EEMI) +---------------------------------------------- +The embedded energy management interface is used to allow software +components running across different processing clusters on a chip or +device to communicate with a power management controller (PMC) on a +device to issue or respond to power management requests. + +EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC. +The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops +structure. Any driver who want to communicate with PMC using EEMI APIs +can call zynqmp_pm_get_eemi_ops(). + +Example of EEMI ops: + + /* zynqmp-firmware driver maintain all EEMI APIs */ + struct zynqmp_eemi_ops { + int (*get_api_version)(u32 *version); + int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out); + }; + + static const struct zynqmp_eemi_ops eemi_ops = { + .get_api_version = zynqmp_pm_get_api_version, + .query_data = zynqmp_pm_query_data, + }; + +Example of EEMI ops usage: + + static const struct zynqmp_eemi_ops *eemi_ops; + u32 ret_payload[PAYLOAD_ARG_CNT]; + int ret; + + eemi_ops = zynqmp_pm_get_eemi_ops(); + if (!eemi_ops) + return -ENXIO; + + ret = eemi_ops->query_data(qdata, ret_payload); + +IOCTL +------ +IOCTL API is for device control and configuration. It is not a system +IOCTL but it is an EEMI API. This API can be used by master to control +any device specific configuration. IOCTL definitions can be platform +specific. This API also manage shared device configuration. + +The following IOCTL IDs are valid for device control: +- IOCTL_SET_PLL_FRAC_MODE 8 +- IOCTL_GET_PLL_FRAC_MODE 9 +- IOCTL_SET_PLL_FRAC_DATA 10 +- IOCTL_GET_PLL_FRAC_DATA 11 + +Refer EEMI API guide [0] for IOCTL specific parameters and other EEMI APIs. + +References +---------- +[0] Embedded Energy Management Interface (EEMI) API guide: + https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf