From patchwork Fri Sep 14 19:39:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jolly Shah X-Patchwork-Id: 10601167 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 5DB0814BD for ; Fri, 14 Sep 2018 19:41:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 477F82BC6E for ; Fri, 14 Sep 2018 19:41:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4570C2BC99; Fri, 14 Sep 2018 19:41:07 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5493A2BC6E for ; Fri, 14 Sep 2018 19:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LrNWHI9cNNJ4w6edCLZfqWT7THqmfwNSSBhZgZrebB4=; b=NgURr1M5EaH3Wx tWr95HBN96b7zEl08UrS5ORxRsToTFmFzpOI7o+Sj9pZOz0oeUe1FBH23zjcbKrfB8duxPU3K4vMe qjnRKrtF9Vi2T/rGqIwvfx2samF9wcpsZzOHY54Gk9mfjRmSmF0sCesr19+J2wcJIBIslSfqis0Yk Oue9hvOFqJqLybI7ehz3tztrqYw6ygxH146lZRhm74MZEAp/XGIvRg7WLlGR26TDxSIzWZbNEKWy4 FdtWVRv7e2MlNBmhH7igbfNp1WwR8FO0P2KPe4EuqojO8e9EYtkFEjJeN520MbyLIzxI1zAjsjk5T TmvQy7PAJnY3ELQnM51A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0txX-0004kM-2B; Fri, 14 Sep 2018 19:40:55 +0000 Received: from mail-by2nam03on0069.outbound.protection.outlook.com ([104.47.42.69] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0txC-0004Av-E0 for linux-arm-kernel@lists.infradead.org; Fri, 14 Sep 2018 19:40:36 +0000 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=YegmdnTSv4ch7+Xdjr1vv941EScAafPDsrXlryMNAII=; b=f2RLSgYvIIrhEDkllnhItss9s8gpFWKAnJb9n0qblx3Bc/EoPBWg81I6b8oteEvOkUrsmlo4gPQUsz/lIJMhUWN5tfFCZpUTBxvBkW1vDaC+wiRGZ9pflI/F/EwegCpGkkR6KwJxIoy1msWurkEMAo9U4tDQ9eN71jla+Uzg1Jg= Received: from MWHPR0201CA0063.namprd02.prod.outlook.com (2603:10b6:301:73::40) by SN6PR02MB4768.namprd02.prod.outlook.com (2603:10b6:805:90::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.19; Fri, 14 Sep 2018 19:40:20 +0000 Received: from BL2NAM02FT007.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by MWHPR0201CA0063.outlook.office365.com (2603:10b6:301:73::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1143.15 via Frontend Transport; Fri, 14 Sep 2018 19:40:20 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT007.mail.protection.outlook.com (10.152.77.46) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1143.14 via Frontend Transport; Fri, 14 Sep 2018 19:40:19 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:46553 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1g0twx-0001YF-06; Fri, 14 Sep 2018 12:40:19 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g0twr-0006TC-Se; Fri, 14 Sep 2018 12:40:13 -0700 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w8EJe4kY022782; Fri, 14 Sep 2018 12:40:04 -0700 Received: from [172.19.2.91] (helo=xsjjollys50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g0twg-0006EA-57; Fri, 14 Sep 2018 12:40:02 -0700 From: Jolly Shah To: , , , , , , , , , Subject: [PATCH v4 1/3] dt-bindings: soc: Add ZynqMP PM bindings Date: Fri, 14 Sep 2018 12:39:48 -0700 Message-ID: <1536953990-12755-2-git-send-email-jollys@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536953990-12755-1-git-send-email-jollys@xilinx.com> References: <1536953990-12755-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.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(396003)(136003)(39860400002)(346002)(2980300002)(438002)(199004)(189003)(51416003)(336012)(7696005)(76176011)(77096007)(6666003)(5660300001)(106002)(106466001)(8676002)(26005)(50466002)(48376002)(305945005)(186003)(63266004)(54906003)(110136005)(126002)(7416002)(16586007)(47776003)(2201001)(44832011)(316002)(81156014)(81166006)(50226002)(36756003)(9786002)(478600001)(8936002)(36386004)(72206003)(446003)(11346002)(2906002)(4326008)(2616005)(426003)(356003)(107886003)(39060400002)(486006)(476003)(14444005)(107986001)(921003)(83996005)(1121003)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB4768; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT007; 1:t1sn995Ev+BW/aNJXEUzefn647e/rJF+JGgygDBD3ZaW9bQN/WbdS23oG1bcDOCIZk3PUVnH+wei1XKX5MyBhaV9ZpxrQD/rUyltwLmtc66VTyneMpttSCyhkxaIxpbh MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 92e8773b-7730-4f16-69fe-08d61a79e793 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:SN6PR02MB4768; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4768; 3:DtoTMQnuwtFw9MIV6GHHnUt772l6wLfSnY0jpDb0/XVEqfo17ZhofBxn/OL8YAXRB1JyNt24gP0B1PAs0Fae1ir5qFFPUTNJJMpyj5lnfWR/7AQbJFM1RhdQxMSiGuGZm/KNzcbQOmO/HB3vDDlYHvn8b7sAsrSoWRMWxEb4SbIskXlDvgxT322ZS+FYBC6s3wfUXGb4Vvp4csyevdHBgZkPlzKOmR6R21XlG0zT07/XpRor7NoQxdr1V01Qoha0vVI2JAqTLJNrtAIWqXFIWKFUCuV/U2a44IJVKF8B04L1QcUHSn7eezQ6UiZ8AOfRpePCiAnYGWASS/05bJSx8FYmKgU5h/urSNSjhrRjXDM=; 25:if6KXeOwDCePZBCEfi8pNyToLod/dvt72CVFqAaAVAyGdwbOete2FIENSDFC3C66ogsCkkeskwBdyRA8YUh0c7NLP+bCMFlCCVX8DgucMFNA5ARqY+CgzG0rcX2uIw8vnSRf4zZMU4Kh/eosuP8K2ej0CF9jTZrnt/deu3bSm9gBEkxgZMHyCnS0BMNjtiAMw+esikPLDkJKEEpHZK/LIeUBlt87+zD8esO9DP+RwQD6bOCIiK4wpyizCKbL1PzfkfR8sYSJytvD3JpPF+oJ3C9Y2+19q7a5/Fj07qE79u4KJuSugPkKjRb+0ONK3XnY9Gh4h2hdAJQWbjt9wzq7Mw== X-MS-TrafficTypeDiagnostic: SN6PR02MB4768: X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4768; 31:LwFfiMipeTahpV23Yi4iYJ6Iyu+8DoCg7wou63yAoMFfj9oH1tAUSLHkce22RIZ3NQvwWbWVMbotkIH+96GQMH+Pcsfqh3yq74cVs9wZcY+mQMLURw2MIzjmjoYQuc5DBNN8YeA0Y8woJ1izYwkjTFjLgBEEvEX0rfxcFlF94pH2fqFAQJw+lo2YUIPqkzH3kXxm7u3r39RZqNG5RhoUU1s2tca4QtIyPzKis/ANgFQ=; 20:2I5EZla9LhfwdQdz9fYHR0Mss/UP5hrK8qEMNIEkAu7FSCZEgFZFqJ6N6icKLg7kjBAQv2001vQ0fJVp5/h/9vCgLe2XMl/z16Wc+U1k4SacfgWcHpgq6Td87sx5y3AR8f8nng4Yd+Blx/e38GkXotVf7jozpUzD0sXGvWJaZaofoRP+4vxzKoc0IglvXD9oJll6D6lxcYSTfN3CefqX00wqpIow2oHiUZYxNzL+0OW6cy3MuGi+THJ8RhKN5FOtQv+U52oYBpXL6ripk7HjcVFaPvgyTvhdqwTiwUjZVb5XuDWuXTc7Oop9fh+yqryu1dC9Vq4WgZuxDYbCTThD9UkFOpLGaRhdEursE600s47MnJw1/8P2BV77XYcygYBRVqEC11PWojWRKtBvAB+RXGVqlBSxXFSjjNxopxDEIuwiwMBDaSZCYBu40eIH/gPGqBtRHpZGPd5JwxZI+TE7592Jqajt9obNpx5r+FQil7XtA4sFk8tawvOzbf4IsujK X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93004095)(3231311)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699050); SRVR:SN6PR02MB4768; BCL:0; PCL:0; RULEID:; SRVR:SN6PR02MB4768; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4768; 4:eYfDrxXpMFjyyV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/v3+LQYHeL4rKB9Bnt8NyXq0BNgjf3EGf1yf1EOIzkbHljq6/3VVJa9JTZO9vr0HQKvcovEP1CpwED9qXuQlTK+OlyzQNvZYYjfJrhoUlCZ1M5/9FbqxZMqfZ8a975Ilqtkp38rRiMXzSarVhz1GSykl6eyF6CbwOhWiBAv2foli7W+0iTpizFTwC16KW/kEY5ZOOe0W9Dd3htC9R6mvo8Mv7ZNLIx9EcUzVsqDRSWUwWpZO8IRLtKni7R9hb/JG/CdQrV4qbF9ZzosGPNW4OIOFeT2FD7anBIktx/oSm4/cTt6lCFOULdXItbeduyebqvpV1BBme6O4dg/1FXpCHnUE9mcHAHc5NguscqQt824MXwR+2ZoNYVTPQ/zTiZCnB0MALThNXYLvhAQtJlKduORvxhbomvj751XUaB6ZuOBslh8yawmbBtzoLGEd2Q==; 5:by0z5cDtx+y8mYy5qIcNUEgzKjfqt2d+qVz77CFc2lvEPwfRk6FReWDsX4Zp8MB/2/PTNEnKKxy8jXbi11AsxUJlhIgHecQAePnPVPFKDygzdsMBdS47qFyv/73vneGiKzp151vsYJOCodAH9f83E5LC+ynbO5SjqeONWjsE6RI=; 7:DAeyXMHlpgWrGESqaDNOHUxnaJXorRtfqDQu7l+1pT/h3mUhFu0xlo1sVB2HJ1HN7j429HVc+4uKKnyOilYIyjvd9D0jwRluenxcjL1Nr7fP91G+6WdAhahHrVXq7mcKLEUOVWQ6bU6uKIrdlW35YYI0/zGw7S4lBss7YOGGd4gD0A5BbPaV31ukhn2V4UfOBLdJQQhZYLAkE42U2nVFcZ3AtZ3t1yOSkI+b+0xb/uLB5nOmhqHM3DWoHmJHEWvV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 19:40:19.6347 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92e8773b-7730-4f16-69fe-08d61a79e793 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.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4768 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180914_124034_527576_0FA2F494 X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rajan Vaja , linux-kernel@vger.kernel.org, Jolly Shah , rajanv@xilinx.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rajan Vaja Add documentation to describe Xilinx ZynqMP power management bindings. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah --- .../bindings/power/reset/xlnx,zynqmp-power.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt diff --git a/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt b/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt new file mode 100644 index 0000000..925d17d --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/xlnx,zynqmp-power.txt @@ -0,0 +1,22 @@ +-------------------------------------------------------------------- +Device Tree Bindings for the Xilinx Zynq MPSoC Power Management +-------------------------------------------------------------------- +The zynqmp-power node describes the power management configurations. +It will control remote suspend/shutdown interfaces. + +Required properties: + - compatible: Must contain: "xlnx,zynqmp-power" + - interrupts: Interrupt specifier + +------- +Example +------- + +firmware { + zynqmp_firmware: zynqmp-firmware { + zynqmp_power: zynqmp-power { + compatible = "xlnx,zynqmp-power"; + interrupts = <0 35 4>; + }; + }; +}; From patchwork Fri Sep 14 19:39:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jolly Shah X-Patchwork-Id: 10601173 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 95A0D14BD for ; Fri, 14 Sep 2018 19:43:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E6182B742 for ; Fri, 14 Sep 2018 19:43:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C88D2B75B; Fri, 14 Sep 2018 19:43:27 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3B002BCFD for ; Fri, 14 Sep 2018 19:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2VY/N04Fw6qxfKdtyqEkOrwxxL8z49P9DGs1ww+FMb0=; b=u1oDZWXIvGUfYC sS5MFVtkQjrjH/vP5SmN2pecqvjAiOngHMK44sIlPD9iKKZ5Bj5v5fMVpn0SqM+VKqW4/l70cY1Bi 3UKVkBtduXqsMfwJr7GIRH1qdUeIzqAroC1IzbxouBVHyEiM6sbkOFjwYLGBlSu39K+7G72ELqkDq 6UmAel8gXB7xM5f+nQmD+jW1RtpPRddQMUMLeM+5rLlRxFvJWMqf3vWvYKnix3aMzR2fqTNXQE+Wi cQ1ZUOt3H42o9ChlNClgKyiAyCiUBuWBaigFM43Mnwb4NUcVCD+FA1ycWUxYojMnRF9cWuJ7xdKPL wGj2Kaw3xq3Vr0BB+S4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0tzm-0006Ku-OL; Fri, 14 Sep 2018 19:43:14 +0000 Received: from mail-eopbgr680082.outbound.protection.outlook.com ([40.107.68.82] helo=NAM04-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0txG-0004Ab-G1 for linux-arm-kernel@lists.infradead.org; Fri, 14 Sep 2018 19:40:40 +0000 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=JrJg8WuU4Q5FHv+Mu37FlEw6dlRWX2QSWzPFzlLmDbs=; b=IoaWJQEkMzrz5/E3p6u0ViHBbOg8vnPLfwKI9Yz0aMEhLlS2D2BGthY9tWJUrNefE2qKK7AN2Uov7ZAFyp4w6bffqtP84TzGrAQSqPqIgy6DAExmRR99ekzS1h43eTKz7Muymw+z42Bfqp6sWYpqxA/iA9h9q7wUL/l4KsNUR0g= Received: from SN4PR0201CA0047.namprd02.prod.outlook.com (2603:10b6:803:2e::33) by DM6PR02MB5113.namprd02.prod.outlook.com (2603:10b6:5:51::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.15; Fri, 14 Sep 2018 19:40:19 +0000 Received: from SN1NAM02FT053.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::206) by SN4PR0201CA0047.outlook.office365.com (2603:10b6:803:2e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1143.15 via Frontend Transport; Fri, 14 Sep 2018 19:40:19 +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 SN1NAM02FT053.mail.protection.outlook.com (10.152.72.102) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1143.14 via Frontend Transport; Fri, 14 Sep 2018 19:40:19 +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 1g0tww-0005SG-OB; Fri, 14 Sep 2018 12:40:18 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g0twr-0006TC-KJ; Fri, 14 Sep 2018 12:40:13 -0700 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w8EJe20u012223; Fri, 14 Sep 2018 12:40:03 -0700 Received: from [172.19.2.91] (helo=xsjjollys50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g0twg-0006EA-6D; Fri, 14 Sep 2018 12:40:02 -0700 From: Jolly Shah To: , , , , , , , , , Subject: [PATCH v4 2/3] firmware: xilinx: Implement ZynqMP power management APIs Date: Fri, 14 Sep 2018 12:39:49 -0700 Message-ID: <1536953990-12755-3-git-send-email-jollys@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536953990-12755-1-git-send-email-jollys@xilinx.com> References: <1536953990-12755-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)(376002)(39860400002)(396003)(136003)(2980300002)(438002)(199004)(189003)(126002)(14444005)(51416003)(305945005)(7696005)(356003)(8676002)(26005)(7416002)(76176011)(476003)(2616005)(2201001)(11346002)(47776003)(426003)(16586007)(446003)(336012)(63266004)(478600001)(186003)(44832011)(486006)(72206003)(106002)(77096007)(36756003)(110136005)(50226002)(6666003)(2906002)(36386004)(107886003)(316002)(5660300001)(54906003)(50466002)(4326008)(9786002)(81166006)(106466001)(81156014)(48376002)(8936002)(39060400002)(107986001)(921003)(83996005)(1121003)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB5113; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT053; 1:Ypsf+rMkjPXw8h5t5pHzfSnQ7i4KVhrotMuhT56LKXpFfhcMKgFleQLd3IyfBWSYXM22TPCluEo636LNdKpmOut759ZWO9VEVPkOdwiiuL/ZWFQyXdBIJX6H8gedpCtt MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ca4619e-26a0-4206-21fd-08d61a79e780 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:DM6PR02MB5113; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5113; 3:vS4ATr6OuK0wIoyctOl8DKefn6soynT539qoDoOmJ0/TYNl4SqKgLm8nGrvebRE0wICTpyxxnp9RD9v2w6E65ip+Jr/271A8Aze674eRjQ4IfKdtuchhjT0VNucxczaZrHcNRVQm5FF+mbHZmFVajGDuV0WHiWfaFjb0Psb20ZszKckBq5+0Z0LWJAj9KkKT+aw5RZh5FmrqbKOJRbTMXVsj3oGLt1VDse9/ta/FmENi3yqQlMfFN+oqu37MXsc/qENrAfk6fiiqAQRjB2cwO6ouLQqgp/F/073Qcw2LClL5NunlI8kiEWQv/ILbkSRw3s1Ls5l/mnd0NsVO6fWihn31VF6sqorADiCTQ8Iu6GQ=; 25:tPcvG1n3SzZQfsFjPzdwamQh6gv7XMM4giE5zJdCu8A/5fsiKcY1DTNYoThRlq0rRTQ2oU8SOxk6RoqPtqD88dlGSHwUS0YUq6ol6dJHFazlktBXV4SJLmEU/RBoslMtojjOZMbZ2hb0v5R8NAmXrIdTMTw22SawxmX8aZrxF1wZC6OafT+x/aOPwQwUqsIDjfprkCNyHM/363VVPysv5G20yZrinsXCFwi/tLrWT/UUxPK2fd6FHU31ReIdt+W82zxj+4nE4kxFLpcmF0Cx2B0WLvGsHtggdyIFOvRcY3H3BFW9kNFrE8gXusQf+aG7eISdWWBdNX6/E1enmif+GQ== X-MS-TrafficTypeDiagnostic: DM6PR02MB5113: X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5113; 31:loPVp4HnYcuP69hLBruAEx2cZPbCtQZDS0x3h79ZLltL+vEWp5nxLIROhM/V5FEF0rBv64d3GVSZBU8Hw+RLdbHi1JeQSlwghH97wfmqVxaaMOVAo5TPv2r1oT6mvtWXbTfKToapw3rVfa+iEiyyL16xh5jWR7nHhub5y5BItGt9uklcn33zUvVoifr808nZEfLKLUb/T2GSEYountNBzyiB1yiHTEFfibP6gXkr3yI=; 20:JY3Shqs0uP6RDHIX4GZmYK+JCbDjbvAnQHqsHjhJ+E7cecYSfLqFdG7llq+pI8ByzoHbHo/k0cqbBPrk79QhB+ha1S7qJYaSpvLKkeR2O7XDNCMR/9KYK2SQyIrGJbLT8z0RjKIJrqUoh9YhTgBpegMbqvY0KwqfKsJhb0g+EmQmoAEBclomyqxRreR8iwFenJkd2NjOyel1fKfi5EpA1WfAqUvHVT2vg/FJ1e+sxLcRMbi06HjY4McbQZZ/pGByOUAgvT2sXEnW35FB8rOXbaHNfyPoKqcy+Sawnj9agoLyDIJotySJ8KhP720I+7YBZF2P5Fwo0xLpy/oSmhCQ/SAIKmL1OgYMQ0wRAbnysk/4BVOFroIWdnIM8q525NtWSvINjWKkhfXGXJcifEX1NTP035qT5Yujp091SlgUhvYt2AiskdKaTUjMv4O8wj34CTZihPTx4aY8ZYRvp/XhNbYg7ZaSfb1T2mFQP5VWx9IfqMR4WNFanvu3O4lCv53h X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93004095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050); SRVR:DM6PR02MB5113; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB5113; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5113; 4:Ai6ub3xbekXxRRIvZ9YvAv9g2liE6e+HERj7RVnD2Q9kwEro1ft1Ga54/TfgsDOlQfN1Ej79tXwf2DA7+p9KQ4PZR8m2UB+TSnIhfBIkyvZYPoFsZw7DMpwtx8h0UiRYZgEArYVtO9JJC/hEdtvVMHdSjduGqme1RwvilHSx7+v4CM9T7xMX6huTcv+jVLteiZeEZ2wqkm6XUWpXkUwrwr3+wqswFmhlWTN3B1XYOjjmQ5F98re4NWQujauyt/T/ROkPI25l7yZxgzC5ZrXp8z55iTm34MnJ26MpPmddo35+NoN5XC2wsXaW5fsa/Kxq X-Forefront-PRVS: 07954CC105 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR02MB5113; 23:2zx1ER7y115h/0eG06jPMBDJ0v3tGrM78ZLnfxpct?= TE7t1noPnkasrG7cDgH6LaAwStNLVBrWw74dcB5U4PgM0PCYaSwm38bcypWFNgKRsS7rmcCP8fRkhQVFrS+3B1YiGmle1vof0nFg2ouWBawUIqXSsduoilYIquhbyts1RW5B1afxRn1cNoxqqpjTfUthYIb6j8zdj9BvBPuQN1dpix4+DKW3QVr1Mod+C3Khch1sfTkaeEPYeS7DtXAgKXwE/B2ItR6VDGNq/+DgI1NcmJaRMH8djHJO5xuszlQMU9z9v2u+ylkbzbmTeslHek0y0H6Q09gj0hWsQCb+vCM+h1PGxLcg3TLEaIxZgaAMCoN5M6g8qCIM9FMpkgP5HDwVm0ZW4MPPoSqcNCskHybzG4fbKYtfk8I2yYSBj7aMKEDMOssQPBl7Oq0YFAb6yNAcref4hKA8N6nCUPk8tjVcV5rdTqId/qDTl3iHDCa+go3a+jzQoTH6F0S1NwHOD/xOw9zVUoqbqaLhb+MYCSRdfsX8Xz7V+baTJG3XSIlcRkB7veLmc4MztuEiwQWznVfxRrqcfemxfrH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aJqPWUO/4YOcY7q56S10M0vmFWV0vbbyVkzrVIJI= X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5113; 6:eO9wRUsVlpu16NsYIthrrTSWr3q9v0KAIJAAjszzRGq+jSXXTJOpptRD/I2J6jIHER2K5Oy838l7vA34R6KXxY9GA0tUMhENr9X1o4XwT+5sLAHyWoN6jmNaoxlAXUqkb2h5X/me3g5scsnCilzGZMwyF7laxBrvE63pLDERQ3gIEX4+a2gt+9D+0W6ByAQqHo3TbGA7r5wCjbOwGThD7gxX2yqPladOyAxUP9YL7cukpeNopGAD97BYNBf/qEE6EVctdzgGY8ZUo3d5dqI2/0VNWZHGE4ZsWrGKY3ut4xfojOwSHJ06AUsM0hpWf6wkMSeq1OkVKRPQ7dlmCh2w3vWo7uzy1bcMuSc3XL6IZgj3VjaObZTlZBRDX6ihfCKAdGmvI5BP9S79OYkYDCR1UfTA1Xtqlfkupj/76n8b89yY4VifWT7JHot4c0V2GnZ8U1SsdlmWd8ZqgbALLb8rKA==; 5:iL4TB/rR/6MdIiVK5y3BBshDuz/3lMg7M8LW3ZAlPTIW4NuNjbRyGtqYbRCS2j/BLCloCFAJ4iVTjyBSFlLjhuB+nuL/wETUdw0slOUFzB73ri5IIGzocCB1E2rkln6c0u0+AkN+fuFZdVSq+atR5TwvrtML7u/k4GD/DKsi8zo=; 7://gobCvAVaxQDniGwgffba9HEY/QCVUUyMbpqDH29lN4Cq85hT0bdNwb/+W46XH8eqDL2mkzX3j0pdhtmNq7AW3DjxWdbMhgIyWFePR8N1EjN/E4r/AxtICbnUTTQH5IVzjmcxzyKS7wsU07Aut0k48f40Z6RjxDf2IFk8KRSMezTylaMxdlLHOz7R/dHe8foWEjQNbgNbOunUfe8fJuk7Hx/WxuK4wP6iM07CELPQszRFYX/wqpyKmEDRlWT9pB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 19:40:19.1490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ca4619e-26a0-4206-21fd-08d61a79e780 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: DM6PR02MB5113 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180914_124038_769789_645D7626 X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rajan Vaja , linux-kernel@vger.kernel.org, Jolly Shah , rajanv@xilinx.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rajan Vaja Add Xilinx ZynqMP firmware APIs to set suspend mode and inform firmware that master has initialized its own power management. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah --- drivers/firmware/xilinx/zynqmp.c | 29 +++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 20 ++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 84b3fd2..c7a3b6c 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -428,6 +428,33 @@ static int zynqmp_pm_clock_getparent(u32 clock_id, u32 *parent_id) return ret; } +/** + * zynqmp_pm_init_finalize() - PM call to inform firmware that the caller + * master has initialized its own power management + * + * This API function is to be used for notify the power management controller + * about the completed power management initialization. + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_init_finalize(void) +{ + return zynqmp_pm_invoke_fn(PM_PM_INIT_FINALIZE, 0, 0, 0, 0, NULL); +} + +/** + * zynqmp_pm_set_suspend_mode() - Set system suspend mode + * @mode: Mode to set for system suspend + * + * This API function is used to set mode of system suspend. + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_set_suspend_mode(u32 mode) +{ + return zynqmp_pm_invoke_fn(PM_SET_SUSPEND_MODE, mode, 0, 0, 0, NULL); +} + static const struct zynqmp_eemi_ops eemi_ops = { .get_api_version = zynqmp_pm_get_api_version, .query_data = zynqmp_pm_query_data, @@ -440,6 +467,8 @@ static const struct zynqmp_eemi_ops eemi_ops = { .clock_getrate = zynqmp_pm_clock_getrate, .clock_setparent = zynqmp_pm_clock_setparent, .clock_getparent = zynqmp_pm_clock_getparent, + .init_finalize = zynqmp_pm_init_finalize, + .set_suspend_mode = zynqmp_pm_set_suspend_mode, }; /** diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 015e130..1424170 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -28,12 +28,21 @@ /* SMC SIP service Call Function Identifier Prefix */ #define PM_SIP_SVC 0xC2000000 #define PM_GET_TRUSTZONE_VERSION 0xa03 +#define PM_SET_SUSPEND_MODE 0xa02 +#define GET_CALLBACK_DATA 0xa01 /* Number of 32bits values in payload */ #define PAYLOAD_ARG_CNT 4U +/* Number of arguments for a callback */ +#define CB_ARG_CNT 4 + +/* Payload size (consists of callback API ID + arguments) */ +#define CB_PAYLOAD_SIZE (CB_ARG_CNT + 1) + enum pm_api_id { PM_GET_API_VERSION = 1, + PM_PM_INIT_FINALIZE = 21, PM_QUERY_DATA = 35, PM_CLOCK_ENABLE, PM_CLOCK_DISABLE, @@ -73,6 +82,12 @@ enum pm_query_id { PM_QID_CLOCK_GET_ATTRIBUTES, }; +enum zynqmp_pm_suspend_reason { + SUSPEND_POWER_REQUEST = 201, + SUSPEND_ALERT, + SUSPEND_SYSTEM_SHUTDOWN, +}; + /** * struct zynqmp_pm_query_data - PM query data * @qid: query ID @@ -99,8 +114,13 @@ struct zynqmp_eemi_ops { int (*clock_getrate)(u32 clock_id, u64 *rate); int (*clock_setparent)(u32 clock_id, u32 parent_id); int (*clock_getparent)(u32 clock_id, u32 *parent_id); + int (*init_finalize)(void); + int (*set_suspend_mode)(u32 mode); }; +int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1, + u32 arg2, u32 arg3, u32 *ret_payload); + #if IS_REACHABLE(CONFIG_ARCH_ZYNQMP) const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void); #else From patchwork Fri Sep 14 19:39:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jolly Shah X-Patchwork-Id: 10601171 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 8C16614BD for ; Fri, 14 Sep 2018 19:42:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 730252BCF8 for ; Fri, 14 Sep 2018 19:42:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 669302BCA5; Fri, 14 Sep 2018 19:42:47 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A38942BCD4 for ; Fri, 14 Sep 2018 19:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rTa/yeH4nYpzNxGfXejfVXP9eeBbExPIkcfDdqRbGfc=; b=GTVF6E2jna7ZkN BccDckiZzTyLG7hHxri3Wnf7AVN+LkCmS9mduAEX08QzF+Fv9GkxFduWOKbKU5+El4fq2GCdPuJar XSGweBAS735yuGi/Zbc4LHbKt1ZWSW7a9DE8nTIPcCL0G8q/q+wUZoOxvs7yFpbQcSjeFkO8vLkBQ 5NEYl1ANquqZCGRfRkc38bQtf1blh7RVGWPXLMsIItm7+nLHnwn4y+cmN0JRCBxdBnjgioDRvl1Px s2VqRZkZTltbiqYqx/3trnjL8D6urETdAoosV2FDBPyr8r2mYVKaKdCfQcpOgaLYaj+DNNHozSCod XkRmEc5JuYLwJhO7t4Tg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0tz7-00063V-Ih; Fri, 14 Sep 2018 19:42:33 +0000 Received: from mail-sn1nam04on0620.outbound.protection.outlook.com ([2a01:111:f400:fe4c::620] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0txF-0004DL-Js for linux-arm-kernel@lists.infradead.org; Fri, 14 Sep 2018 19:40:39 +0000 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=2rRCt/Fp2LLqjvnno6HZDN4J5l5gTptrmTa7RJuTUAg=; b=y5uFkPYYrKfnNXtIbbvrAnN1gfSCzX3bwRznPGuy0rYHM1dP856l+se9ckwNqMO8L3PbaYO5F2u/qpEI1N0d1VQM6mwvvlu/gXglh+hJ0bgSn7peGZNvbNJfpUXKnvzaLBWycsckqdx/VX91VXdUqASxCiX2FWS2+ng2tl2Vd8k= Received: from BN6PR02CA0046.namprd02.prod.outlook.com (2603:10b6:404:5f::32) by SN6PR02MB5118.namprd02.prod.outlook.com (2603:10b6:805:68::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.15; Fri, 14 Sep 2018 19:40:19 +0000 Received: from BL2NAM02FT027.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::203) by BN6PR02CA0046.outlook.office365.com (2603:10b6:404:5f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.15 via Frontend Transport; Fri, 14 Sep 2018 19:40:19 +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 BL2NAM02FT027.mail.protection.outlook.com (10.152.77.160) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1143.14 via Frontend Transport; Fri, 14 Sep 2018 19:40:19 +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 1g0tww-0005SF-MV; Fri, 14 Sep 2018 12:40:18 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g0twr-0006TC-Ib; Fri, 14 Sep 2018 12:40:13 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w8EJe3oa012253; Fri, 14 Sep 2018 12:40:03 -0700 Received: from [172.19.2.91] (helo=xsjjollys50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g0twg-0006EA-8c; Fri, 14 Sep 2018 12:40:02 -0700 From: Jolly Shah To: , , , , , , , , , Subject: [PATCH v4 3/3] drivers: soc: xilinx: Add ZynqMP PM driver Date: Fri, 14 Sep 2018 12:39:50 -0700 Message-ID: <1536953990-12755-4-git-send-email-jollys@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536953990-12755-1-git-send-email-jollys@xilinx.com> References: <1536953990-12755-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)(39860400002)(136003)(346002)(376002)(396003)(2980300002)(438002)(199004)(189003)(336012)(7696005)(63266004)(316002)(7416002)(51416003)(76176011)(54906003)(2906002)(107886003)(106002)(186003)(36386004)(6666003)(5660300001)(16586007)(486006)(11346002)(446003)(39060400002)(8676002)(2616005)(110136005)(126002)(50466002)(48376002)(44832011)(305945005)(106466001)(14444005)(72206003)(356003)(4326008)(36756003)(476003)(426003)(8936002)(50226002)(9786002)(47776003)(26005)(77096007)(81166006)(81156014)(575784001)(2201001)(478600001)(107986001)(921003)(2101003)(1121003)(83996005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB5118; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT027; 1:7/xG+jaS79BAtpVknc5eji4wpcQMHpA0Y3G13GCfJx8fEIKHPoLyuvvmx1j69LS/NczBmIb4MYcORi7t2vd+4WXm5OVeEld0j5A1ivK8He+VX8D5rdKTpEIm7texDSJH MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb61e6fe-a176-420b-cde9-08d61a79e76f X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:SN6PR02MB5118; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB5118; 3:pBP0op7NwHhGqU3ufVhaCZJN85pEekIlKZpFnXRc85S3p8m3avASuP06ZyOCMwUr6HVgNkeb1cIlbs2aegs3nN2Pjcb3oalmJ+jBYyGM3+RTq5N686Qep9Lwb4+/l2nNLccaCrwEvcyCv2OikSXQuyfrd54MfkHzPQmpqfG+wnxL/QLxRHi5Op8ZM3C78Ofhq+GtwUeNu9XRUruIVxQOF4JtT5UxO3nfiZM3DaG5YE+kn3DzxKZ55L20ImDvFLF5w3MN1XHyI1h6u2s//0yApJLpm/fqi8HMaTcLlykJf0df5WutLRgFFMjDRXCshH9StTnTmNjpKXMusj7l2YK1XdHZH7CsQIxGdAqtLKFw/QA=; 25:r1HShdLP/OjDJ40sLJmmehwGuHeLqZScR7thmaKBu4fQYYtZ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Z7IrgMg4gLv7ZTR3SIkmEfiRKq5MTefq6hpGhMajfScxgp0 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(3002001)(93006095)(93004095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699050); SRVR:SN6PR02MB5118; BCL:0; PCL:0; RULEID:; SRVR:SN6PR02MB5118; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB5118; 4:Tin8CasCahGNt8NzjQjzAAbMtPE4FkLZmYZJ5hFh2ok6aFojLUnV3TQpzVuLyg8IxnW4KlW9fILpsNef9+uNP6HgI5aasFlnrhi0VRwdyNICDu+w4J8+GCMfeWzzFjVc/PrmnZIrBWJIq/gznHwnWtp8htk6lpvEfFTXeswiKtcnCtlaYCCSl1EM/NRkMD1Op4XXKvyfvOW2MstoxMzLl7Irr08A8qvbWjIbfrNH0uYhHnmY5PG0jHmX3Ec+xdjuYuUYdgFH1vD01R3l3wGSpnB7MX8hqX3bT5wwQ577Kmu8JQDVSaMlxt3XjWpKBm/p X-Forefront-PRVS: 07954CC105 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR02MB5118; 23:D+L+H9KmngJk036nQZBzpyRdPOgHMp5FWPhQ2l6jn?= XKeWDToD1Tyj33lIyHLEYHr7qv6V4vcPRdElnViDWEAmADZlc0ttoyh4yxLjgDaRPJKCNOyPdN5ERzzAcqTQjn6pQjc8tkpm30ogHU6UFvQVZ6d39WdEirN8V5jj6Tk0KJQEzY3gJzDg9kQ0G49m/F3wU7T35MgjB7aaskyDzUJdv7JUP/ifIQ/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IsI0/g7kmNsZpYeDr4=; 7:zQ2oFPu8cyR6FOppSMTSnXxT92IBgmvrmgDrP1xtfuAYaChQoXZDEN+Dl03uDL9DnIoQeeHUj2PrCRfQc9W8qOFrXAB1OmF2m/I9jsHCfMhdS46DPszaBvsT0BTGIGXYu/k6M1vXW1dj53NQeqdtCT0dHg0hn1BKE5VeUKi58e7+GibyGo0OeGr2jXDgrgC3Ek9Bjf4QeXnrvFoktrBSAeKIRxGUV2O+UtvqcFRRZhVf34Ab71fDG7VE+UT2FGPA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2018 19:40:19.3076 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb61e6fe-a176-420b-cde9-08d61a79e76f 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: SN6PR02MB5118 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180914_124037_888864_870A448D X-CRM114-Status: GOOD ( 15.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rajan Vaja , linux-kernel@vger.kernel.org, Jolly Shah , rajanv@xilinx.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rajan Vaja Add ZynqMP PM driver. PM driver provides power management support for ZynqMP. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah --- drivers/soc/xilinx/Kconfig | 11 +++ drivers/soc/xilinx/Makefile | 1 + drivers/soc/xilinx/zynqmp_power.c | 178 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 drivers/soc/xilinx/zynqmp_power.c diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig index 687c8f3..5025e0e 100644 --- a/drivers/soc/xilinx/Kconfig +++ b/drivers/soc/xilinx/Kconfig @@ -17,4 +17,15 @@ config XILINX_VCU To compile this driver as a module, choose M here: the module will be called xlnx_vcu. +config ZYNQMP_POWER + bool "Enable Xilinx Zynq MPSoC Power Management driver" + depends on PM && ARCH_ZYNQMP + default y + help + Say yes to enable power management support for ZyqnMP SoC. + This driver uses firmware driver as an interface for power + management request to firmware. It registers isr to handle + power management callbacks from firmware. + If in doubt, say N. + endmenu diff --git a/drivers/soc/xilinx/Makefile b/drivers/soc/xilinx/Makefile index dee8fd5..428b9db 100644 --- a/drivers/soc/xilinx/Makefile +++ b/drivers/soc/xilinx/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_XILINX_VCU) += xlnx_vcu.o +obj-$(CONFIG_ZYNQMP_POWER) += zynqmp_power.o diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c new file mode 100644 index 0000000..771cb59 --- /dev/null +++ b/drivers/soc/xilinx/zynqmp_power.c @@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Xilinx Zynq MPSoC Power Management + * + * Copyright (C) 2014-2018 Xilinx, Inc. + * + * Davorin Mista + * Jolly Shah + * Rajan Vaja + */ + +#include +#include +#include +#include +#include + +#include + +enum pm_suspend_mode { + PM_SUSPEND_MODE_FIRST = 0, + PM_SUSPEND_MODE_STD = PM_SUSPEND_MODE_FIRST, + PM_SUSPEND_MODE_POWER_OFF, +}; + +#define PM_SUSPEND_MODE_FIRST PM_SUSPEND_MODE_STD + +static const char *const suspend_modes[] = { + [PM_SUSPEND_MODE_STD] = "standard", + [PM_SUSPEND_MODE_POWER_OFF] = "power-off", +}; + +static enum pm_suspend_mode suspend_mode = PM_SUSPEND_MODE_STD; + +enum pm_api_cb_id { + PM_INIT_SUSPEND_CB = 30, + PM_ACKNOWLEDGE_CB, + PM_NOTIFY_CB, +}; + +static void zynqmp_pm_get_callback_data(u32 *buf) +{ + zynqmp_pm_invoke_fn(GET_CALLBACK_DATA, 0, 0, 0, 0, buf); +} + +static irqreturn_t zynqmp_pm_isr(int irq, void *data) +{ + u32 payload[CB_PAYLOAD_SIZE]; + + zynqmp_pm_get_callback_data(payload); + + /* First element is callback API ID, others are callback arguments */ + if (payload[0] == PM_INIT_SUSPEND_CB) { + switch (payload[1]) { + case SUSPEND_SYSTEM_SHUTDOWN: + orderly_poweroff(true); + break; + case SUSPEND_POWER_REQUEST: + pm_suspend(PM_SUSPEND_MEM); + break; + default: + pr_err("%s Unsupported InitSuspendCb reason " + "code %d\n", __func__, payload[1]); + } + } + + return IRQ_HANDLED; +} + +static ssize_t suspend_mode_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + char *s = buf; + int md; + + for (md = PM_SUSPEND_MODE_FIRST; md < ARRAY_SIZE(suspend_modes); md++) + if (suspend_modes[md]) { + if (md == suspend_mode) + s += sprintf(s, "[%s] ", suspend_modes[md]); + else + s += sprintf(s, "%s ", suspend_modes[md]); + } + + /* Convert last space to newline */ + if (s != buf) + *(s - 1) = '\n'; + return (s - buf); +} + +static ssize_t suspend_mode_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int md, ret = -EINVAL; + const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops(); + + if (!eemi_ops || !eemi_ops->set_suspend_mode) + return ret; + + for (md = PM_SUSPEND_MODE_FIRST; md < ARRAY_SIZE(suspend_modes); md++) + if (suspend_modes[md] && + sysfs_streq(suspend_modes[md], buf)) { + ret = 0; + break; + } + + if (!ret && md != suspend_mode) { + ret = eemi_ops->set_suspend_mode(md); + if (likely(!ret)) + suspend_mode = md; + } + + return ret ? ret : count; +} + +static DEVICE_ATTR_RW(suspend_mode); + +static int zynqmp_pm_probe(struct platform_device *pdev) +{ + int ret, irq; + u32 pm_api_version; + + const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops(); + + if (!eemi_ops || !eemi_ops->get_api_version || !eemi_ops->init_finalize) + return -ENXIO; + + eemi_ops->init_finalize(); + eemi_ops->get_api_version(&pm_api_version); + + /* Check PM API version number */ + if (pm_api_version < ZYNQMP_PM_VERSION) + return -ENODEV; + + irq = platform_get_irq(pdev, 0); + if (irq <= 0) + return -ENXIO; + + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, zynqmp_pm_isr, + IRQF_NO_SUSPEND | IRQF_ONESHOT, + dev_name(&pdev->dev), &pdev->dev); + if (ret) { + dev_err(&pdev->dev, "devm_request_threaded_irq '%d' failed " + "with %d\n", irq, ret); + return ret; + } + + ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr); + if (ret) { + dev_err(&pdev->dev, "unable to create sysfs interface\n"); + return ret; + } + + return 0; +} + +static int zynqmp_pm_remove(struct platform_device *pdev) +{ + sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr); + + return 0; +} + +static const struct of_device_id pm_of_match[] = { + { .compatible = "xlnx,zynqmp-power", }, + { /* end of table */ }, +}; +MODULE_DEVICE_TABLE(of, pm_of_match); + +static struct platform_driver zynqmp_pm_platform_driver = { + .probe = zynqmp_pm_probe, + .remove = zynqmp_pm_remove, + .driver = { + .name = "zynqmp_power", + .of_match_table = pm_of_match, + }, +}; +module_platform_driver(zynqmp_pm_platform_driver);