From patchwork Wed Sep 5 06:40:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nava kishore Manne X-Patchwork-Id: 10588321 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 6D73213BB for ; Wed, 5 Sep 2018 06:41:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B70129652 for ; Wed, 5 Sep 2018 06:41:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D0C629656; Wed, 5 Sep 2018 06:41:26 +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,UPPERCASE_50_75 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 8803F29652 for ; Wed, 5 Sep 2018 06:41:25 +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: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fbVSEZLi4ymef1PrOGTNguh6r50Awv4gSbyvYr2HQZ4=; b=gTqcNzo3RuppVN aGna/IuSRIiC8JVQ4290QDQkxq3GW0Ga60S8xkXjzMankXQmzErPeKEFBy4Isky30STJaIOYpIc1i yGz/ft3nd48Y34eovkFiZVPyrMahSAR46fR6r3qHnfm+vuby2k1OxSJlOaWCTfs8FZAxmFWiRvtHq B8uLixgEOoeH0pYjEBzeUti/16Fhui/0B5HUvMJaLjlCsVAQyZmQqBy9ewiGOBbyYit9doAjOkXkD hrPGX0utv4vd1Z6+2T4MxYVuEsTNYgR8Zw9SpKRhrduTCaTs94mR3nWLXfMp6hUge3MhO8beOPpV0 9IQs2UpsUP8nlXym5TKg==; 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 1fxRV9-0000Ol-16; Wed, 05 Sep 2018 06:41:19 +0000 Received: from mail-bn3nam01on0075.outbound.protection.outlook.com ([104.47.33.75] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxRV4-0000NK-M2 for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2018 06:41:16 +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=ycf/AG8aWzKGhUh3rHp71cSVd8aILkGQPft4sxJCOLE=; b=41N/TG+WbmN1DHxY+rN1cBkIeuxUuGYWij6aQEL/UVbjWmMGsvoNm9HoHQPkzSUI/U7GD2HHpe9Fi7pwkJeoghaPw5I/LY38Rp3uuSDx+gtV/ZKTITVCihoEbg9nDEU9Av95xMTTx+fXGJmzVxjG38n89JSLUxTp9S5sXYKtpKM= Received: from MWHPR02CA0035.namprd02.prod.outlook.com (2603:10b6:301:60::24) by DM6PR02MB4939.namprd02.prod.outlook.com (2603:10b6:5:11::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Wed, 5 Sep 2018 06:41:01 +0000 Received: from SN1NAM02FT025.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::208) by MWHPR02CA0035.outlook.office365.com (2603:10b6:301:60::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.14 via Frontend Transport; Wed, 5 Sep 2018 06:41:00 +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 SN1NAM02FT025.mail.protection.outlook.com (10.152.72.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1101.10 via Frontend Transport; Wed, 5 Sep 2018 06:41:00 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:37426 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fxRUp-0001Xg-P4; Tue, 04 Sep 2018 23:40:59 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fxRUk-0000kn-LT; Tue, 04 Sep 2018 23:40:54 -0700 Received: from xsj-pvapsmtp01 (mailman.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w856eqqP009916; Tue, 4 Sep 2018 23:40:52 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fxRUi-0000hO-8M; Tue, 04 Sep 2018 23:40:52 -0700 From: Nava kishore Manne To: , , , , , , , , , Subject: [RFC PATCH v2 1/3] firmware: xilinx: Add reset API's Date: Wed, 5 Sep 2018 12:10:40 +0530 Message-ID: <1536129642-7049-2-git-send-email-nava.manne@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536129642-7049-1-git-send-email-nava.manne@xilinx.com> References: <1536129642-7049-1-git-send-email-nava.manne@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)(346002)(396003)(39860400002)(136003)(376002)(2980300002)(438002)(189003)(199004)(486006)(106002)(476003)(110136005)(2616005)(48376002)(50466002)(50226002)(47776003)(426003)(336012)(217873002)(186003)(126002)(2201001)(77096007)(14444005)(8676002)(26005)(316002)(76176011)(7696005)(36756003)(36386004)(11346002)(81156014)(81166006)(6666003)(305945005)(16586007)(356003)(51416003)(8936002)(446003)(478600001)(63266004)(2906002)(9786002)(106466001)(5660300001)(107986001)(921003)(1121003)(83996005)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4939; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT025; 1:Cdf73CM767m665V8y8hcnzOQnYiMgkZrhIbmcqdSrfdNaTxJJgmWAgdC8mq0vyQ/U5rYwNvdKEhEY2hC/zmJhhablTZc13XyZvBY0pbyLEsc65uq7qkq2aHmOQTS24FL MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 023b6963-a3e7-4bf7-1e2d-08d612fa8b1d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060); SRVR:DM6PR02MB4939; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4939; 3:KGt1qNxYrehrkPxp9dDOHo+ZIx2y1qYdk4fKis8ucybl/hkqkQmlRU4EGLdSyPkx4fwlCyl8U/vda0QVoUWPmxbVlN8j5Y17yYVTP/BK9GS9wE+LlyptF+/fQaudgFYFkR3kncuE5XR1XBw176VIaLpbOpFs8abXJ759fmmM+bvEIaOuPHvKZThvwisj+TF6Bu1R6WFxlr2et+GscczV7ULUyvJUdgKvyasvI0TEbZgTYzo+psMMCBc37tIKePgnl09so+fBg/fCqnLU0WLWEqIxxp5PNZ/qr+coPnUJmWfDzrgSOjz5iwzby4RQ/al/kkUApGBd90FSgfrV/7Wn1Yn3a1XdiyEPzPBkfJJvofQ=; 25:iBYifCXd0PyDoYql+tplV2F80HdHMPTjKq2uYaODn2/4OfSv6q423fFIdiHnWZXs+9LMc/995lgiqms45VMGjJZn9PfqSq0hxExf2l/PU64jSwLq71QYhGp9e8hAGa+voPlaX5nnp5/CNRbcCDWv5XWUUaM94iN66z71AjzPg9dZ5qvZziBhMkK8fuh7igXgFjs3e/A9fLdtn8cLV2TatSAiwy1e6xXPJukWdx4YAkr/GcbVKa7cb3OQh35jq5Fa04x4SmCRgkfaRRisRF0PMNEr/DGOmnnloiC88wG8Qsgq3QS8D9ajirzXNe1qCyx+7Cjt9dN5KbQS0RN5fzt2Nw== X-MS-TrafficTypeDiagnostic: DM6PR02MB4939: X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4939; 31:z2kcKUaV0rVPXoT5hDQOsGCbWcabXhH/kkMoXCfu7d6RxEUTBO6ygLsSEjV+yzKcqWWJbp5UGyYltIyNHi2tLoOqdMJgeIqabQjUahtO46MZTdg5Bfc5qBbpjrwT61ccO4z4qmO//qDUGXrZqmLHdPZQdtA55DdtxYWOlqhKhTlwJfTP5xurnHvR0vFCiZvjT1neCsP9/KDpQ4kv8JolytHOkC4EkVTFPBgxn7nizS8=; 20:x5GHErDU4taEb1/1L9B4VFadzMoAkxYIZLXYnNPAk6uehAxjweAEspI985Sv3CAIeN89wy5Rfyn0xqJueZXrMmszCAilYRfLHryNE0nC+fnDPN9iqcfw4JkF34u84Zr0xh/Ev+T4/kLYV5JmgGKterPV7losbrBXeU/vcXPw7oZMONCOpJ5iEju9crTEKA3eC6qW2bZH4eZ81gfDudCwspmlyiXqEPE4e12rp37RsGY6kGgI+YXeBoM63dbTSjFEwFQenbzKZFKqGK/HiZDfTHsEtuZjLfz6/2Vg44YUJJ/ZVsdQIn9LtnMyKopQEufbP6b8l4LOKbbzL6oY0qK26TfRikwVrVYl8UNHN7tFxRPj5KaQLzvW66xGeoQ3HwIm2vHULeRFcVkZll1Ynme8wvhE2hqmByFrHuKSKj7RPST9JeS0kW+M6EWcMY2kWcPKyFRSrcB817FluVZlu+HveBww7O5eHW0gtXsuVMbi8rjtTW1NZKSASPnpHE0FAHYY 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)(93006095)(93004095)(10201501046)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(201708071742011)(7699016); SRVR:DM6PR02MB4939; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB4939; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4939; 4:XMGon8fw0ZRvo0P5/MFXYq3OsM/TOnz3W0MNX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s6iBJxNXKqPJiPnaOxsXLx+PwcX+d9FH8XDOvUtGktav1T46HMPyHlS+NxghV2hw+Z3PdmyMkd7dGor/d5e30XJucA6fQrLd/dS1/f0aQJpcUwzicVGCVcgGTUo0xt7DlVfgQTZ4jXLl7+5XFhcZifABVY4VaqJ8iOMRlFejoD7vyHsvQHfcet2WpvHappfoiyepYjuH+yEc+wZLCPQdyAv2HycWz7Di1IRPHh+5rX/u1oLBLFAIqGwDzQrOsr3pcHkcZ6kHaUGU95YHEgpGiGlOPUSxjmU9ANd9hmzffneTe9W5nPaSdnLiqo/cAA==; 5:9vPakSdrj79mRBkIbbnmgEjV4nbjyNBadMe4C4hx4IbLkqtKbIarJuu84Sx3fXrY5/SF1cP1OaTUfSNRv2igjeEQC2LDRQ1OI/FX93uwcjG/Lgkvpx1k9LnMJ2OyZ9Vs1IhXMIrshpmKw6bTobvf3BEZrWR0CH5jzaXQeQgIvDo=; 7:mjch17xIDQzB6PI2QcCJz40cB0sXWtSvpCD8KKZGg9/cxGYoxee9QQTDOQ0/VDaf4GQq98suP0qucZNPIdmarH2k8BloN+VmIVFJ+vDjaVPTY/hJTv/2e3z4vo3VwJ8S/9Ey/t9g0uyzZJSRrBd/SeyZqnXasAq7kdAQBxV1bAhqZfbRdDvnFb5uOVGe777vLBeUElmcu63Yl+azdEZ0Vx9UcbrI144FprBHn+Jp6/DwPcEjrAe/uE5eZcF07Xhb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2018 06:41:00.1444 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 023b6963-a3e7-4bf7-1e2d-08d612fa8b1d 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: DM6PR02MB4939 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180904_234114_954041_C35E44CE X-CRM114-Status: UNSURE ( 9.31 ) 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: , 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 This Patch Adds reset API's to support release, assert and status functionalities by using firmware interface. Signed-off-by: Nava kishore Manne --- Changes for v2: -New Patch. drivers/firmware/xilinx/zynqmp.c | 40 +++++++++++ include/linux/firmware/xlnx-zynqmp.h | 136 +++++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 7ccedf0..639c72f 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -447,6 +447,44 @@ static int zynqmp_pm_clock_getparent(u32 clock_id, u32 *parent_id) return ret; } +/** + * zynqmp_pm_reset_assert - Request setting of reset (1 - assert, 0 - release) + * @reset: Reset to be configured + * @assert_flag: Flag stating should reset be asserted (1) or + * released (0) + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset, + const enum zynqmp_pm_reset_action assert_flag) +{ + return zynqmp_pm_invoke_fn(PM_RESET_ASSERT, reset, assert_flag, + 0, 0, NULL); +} + +/** + * zynqmp_pm_reset_get_status - Get status of the reset + * @reset: Reset whose status should be returned + * @status: Returned status + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, + u32 *status) +{ + u32 ret_payload[PAYLOAD_ARG_CNT]; + int ret; + + if (!status) + return -EINVAL; + + ret = zynqmp_pm_invoke_fn(PM_RESET_GET_STATUS, reset, 0, + 0, 0, ret_payload); + *status = ret_payload[1]; + + return ret; +} + static const struct zynqmp_eemi_ops eemi_ops = { .get_api_version = zynqmp_pm_get_api_version, .ioctl = zynqmp_pm_ioctl, @@ -460,6 +498,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, + .reset_assert = zynqmp_pm_reset_assert, + .reset_get_status = zynqmp_pm_reset_get_status, }; /** diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 58a7478..93decf5 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -34,6 +34,8 @@ enum pm_api_id { PM_GET_API_VERSION = 1, + PM_RESET_ASSERT = 17, + PM_RESET_GET_STATUS, PM_IOCTL = 34, PM_QUERY_DATA, PM_CLOCK_ENABLE, @@ -74,6 +76,137 @@ enum pm_query_id { PM_QID_CLOCK_GET_ATTRIBUTES, }; +enum zynqmp_pm_reset_action { + PM_RESET_ACTION_RELEASE, + PM_RESET_ACTION_ASSERT, + PM_RESET_ACTION_PULSE, +}; + +enum zynqmp_pm_reset { + ZYNQMP_PM_RESET_START = 999, + ZYNQMP_PM_RESET_PCIE_CFG, + ZYNQMP_PM_RESET_PCIE_BRIDGE, + ZYNQMP_PM_RESET_PCIE_CTRL, + ZYNQMP_PM_RESET_DP, + ZYNQMP_PM_RESET_SWDT_CRF, + ZYNQMP_PM_RESET_AFI_FM5, + ZYNQMP_PM_RESET_AFI_FM4, + ZYNQMP_PM_RESET_AFI_FM3, + ZYNQMP_PM_RESET_AFI_FM2, + ZYNQMP_PM_RESET_AFI_FM1, + ZYNQMP_PM_RESET_AFI_FM0, + ZYNQMP_PM_RESET_GDMA, + ZYNQMP_PM_RESET_GPU_PP1, + ZYNQMP_PM_RESET_GPU_PP0, + ZYNQMP_PM_RESET_GPU, + ZYNQMP_PM_RESET_GT, + ZYNQMP_PM_RESET_SATA, + ZYNQMP_PM_RESET_ACPU3_PWRON, + ZYNQMP_PM_RESET_ACPU2_PWRON, + ZYNQMP_PM_RESET_ACPU1_PWRON, + ZYNQMP_PM_RESET_ACPU0_PWRON, + ZYNQMP_PM_RESET_APU_L2, + ZYNQMP_PM_RESET_ACPU3, + ZYNQMP_PM_RESET_ACPU2, + ZYNQMP_PM_RESET_ACPU1, + ZYNQMP_PM_RESET_ACPU0, + ZYNQMP_PM_RESET_DDR, + ZYNQMP_PM_RESET_APM_FPD, + ZYNQMP_PM_RESET_SOFT, + ZYNQMP_PM_RESET_GEM0, + ZYNQMP_PM_RESET_GEM1, + ZYNQMP_PM_RESET_GEM2, + ZYNQMP_PM_RESET_GEM3, + ZYNQMP_PM_RESET_QSPI, + ZYNQMP_PM_RESET_UART0, + ZYNQMP_PM_RESET_UART1, + ZYNQMP_PM_RESET_SPI0, + ZYNQMP_PM_RESET_SPI1, + ZYNQMP_PM_RESET_SDIO0, + ZYNQMP_PM_RESET_SDIO1, + ZYNQMP_PM_RESET_CAN0, + ZYNQMP_PM_RESET_CAN1, + ZYNQMP_PM_RESET_I2C0, + ZYNQMP_PM_RESET_I2C1, + ZYNQMP_PM_RESET_TTC0, + ZYNQMP_PM_RESET_TTC1, + ZYNQMP_PM_RESET_TTC2, + ZYNQMP_PM_RESET_TTC3, + ZYNQMP_PM_RESET_SWDT_CRL, + ZYNQMP_PM_RESET_NAND, + ZYNQMP_PM_RESET_ADMA, + ZYNQMP_PM_RESET_GPIO, + ZYNQMP_PM_RESET_IOU_CC, + ZYNQMP_PM_RESET_TIMESTAMP, + ZYNQMP_PM_RESET_RPU_R50, + ZYNQMP_PM_RESET_RPU_R51, + ZYNQMP_PM_RESET_RPU_AMBA, + ZYNQMP_PM_RESET_OCM, + ZYNQMP_PM_RESET_RPU_PGE, + ZYNQMP_PM_RESET_USB0_CORERESET, + ZYNQMP_PM_RESET_USB1_CORERESET, + ZYNQMP_PM_RESET_USB0_HIBERRESET, + ZYNQMP_PM_RESET_USB1_HIBERRESET, + ZYNQMP_PM_RESET_USB0_APB, + ZYNQMP_PM_RESET_USB1_APB, + ZYNQMP_PM_RESET_IPI, + ZYNQMP_PM_RESET_APM_LPD, + ZYNQMP_PM_RESET_RTC, + ZYNQMP_PM_RESET_SYSMON, + ZYNQMP_PM_RESET_AFI_FM6, + ZYNQMP_PM_RESET_LPD_SWDT, + ZYNQMP_PM_RESET_FPD, + ZYNQMP_PM_RESET_RPU_DBG1, + ZYNQMP_PM_RESET_RPU_DBG0, + ZYNQMP_PM_RESET_DBG_LPD, + ZYNQMP_PM_RESET_DBG_FPD, + ZYNQMP_PM_RESET_APLL, + ZYNQMP_PM_RESET_DPLL, + ZYNQMP_PM_RESET_VPLL, + ZYNQMP_PM_RESET_IOPLL, + ZYNQMP_PM_RESET_RPLL, + ZYNQMP_PM_RESET_GPO3_PL_0, + ZYNQMP_PM_RESET_GPO3_PL_1, + ZYNQMP_PM_RESET_GPO3_PL_2, + ZYNQMP_PM_RESET_GPO3_PL_3, + ZYNQMP_PM_RESET_GPO3_PL_4, + ZYNQMP_PM_RESET_GPO3_PL_5, + ZYNQMP_PM_RESET_GPO3_PL_6, + ZYNQMP_PM_RESET_GPO3_PL_7, + ZYNQMP_PM_RESET_GPO3_PL_8, + ZYNQMP_PM_RESET_GPO3_PL_9, + ZYNQMP_PM_RESET_GPO3_PL_10, + ZYNQMP_PM_RESET_GPO3_PL_11, + ZYNQMP_PM_RESET_GPO3_PL_12, + ZYNQMP_PM_RESET_GPO3_PL_13, + ZYNQMP_PM_RESET_GPO3_PL_14, + ZYNQMP_PM_RESET_GPO3_PL_15, + ZYNQMP_PM_RESET_GPO3_PL_16, + ZYNQMP_PM_RESET_GPO3_PL_17, + ZYNQMP_PM_RESET_GPO3_PL_18, + ZYNQMP_PM_RESET_GPO3_PL_19, + ZNQMP_PM_RESET_GPO3_PL_20, + ZYNQMP_PM_RESET_GPO3_PL_21, + ZYNQMP_PM_RESET_GPO3_PL_22, + ZYNQMP_PM_RESET_GPO3_PL_23, + ZYNQMP_PM_RESET_GPO3_PL_24, + ZYNQMP_PM_RESET_GPO3_PL_25, + ZYNQMP_PM_RESET_GPO3_PL_26, + ZYNQMP_PM_RESET_GPO3_PL_27, + ZYNQMP_PM_RESET_GPO3_PL_28, + ZYNQMP_PM_RESET_GPO3_PL_29, + ZYNQMP_PM_RESET_GPO3_PL_30, + ZYNQMP_PM_RESET_GPO3_PL_31, + ZYNQMP_PM_RESET_RPU_LS, + ZYNQMP_PM_RESET_PS_ONLY, + ZYNQMP_PM_RESET_PL, + ZYNQMP_PM_RESET_PS_PL0, + ZYNQMP_PM_RESET_PS_PL1, + ZYNQMP_PM_RESET_PS_PL2, + ZYNQMP_PM_RESET_PS_PL3, + ZYNQMP_PM_RESET_END +}; + /** * struct zynqmp_pm_query_data - PM query data * @qid: query ID @@ -101,6 +234,9 @@ 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 (*reset_assert)(const enum zynqmp_pm_reset reset, + const enum zynqmp_pm_reset_action assert_flag); + int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status); }; #if IS_REACHABLE(CONFIG_ARCH_ZYNQMP) From patchwork Wed Sep 5 06:40:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nava kishore Manne X-Patchwork-Id: 10588325 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 6148E13BB for ; Wed, 5 Sep 2018 06:43:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ECAC27853 for ; Wed, 5 Sep 2018 06:43:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 309F626530; Wed, 5 Sep 2018 06:43:03 +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 6261D26530 for ; Wed, 5 Sep 2018 06:43:02 +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: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lGBKtwYOjVxxwgb24fnijF7+GH0jhoklYYm8KmXtg2A=; b=cLAFAX5K84IllU BOHbq0y9lSR1Nz1S0Jt6tZnHUsIYuK/NGHSFSdyE7PrWV+kJ28SgSmg8a0FOW0bJCC5+I3seb9UAN von22fcwXtqFpDyZ/4HUKKt+RMmt4rkGMXyvaIOY7zCV2pyoWXqAqNF8zWDhU0C9wWe8yt+HNwphC WN9/zx2Bsdd6gaIAQ9opFgIhjIkHzyScsa6kwhySTcT3XxPf0F9vOZt8yuUNxsvzFxziMlZ1zvfKB tgv+syGq91LPWDZrESDGhGjb/eBBtPDaAX7jTT6uhQUHw372ZCnxMyiDNxOkQnTrr791HWiaeYMJY NiUNv6kywSGg64/Y4XAg==; 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 1fxRWc-00011s-32; Wed, 05 Sep 2018 06:42:50 +0000 Received: from mail-by2nam03on0063.outbound.protection.outlook.com ([104.47.42.63] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxRVD-0000O9-Oc for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2018 06:41:25 +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=Ef2szFAro65kzedAXrH6t6bpfJSi4xbl8lbr+MTgIAI=; b=zZXSrXGa8ON0bBzQz5gtVBhkSXSR17nMK2vc5QnThRV0Au/8F9RnZHMuoe0AmuGnkAl6lHHmCl4Oq6S0LeGi55S0t69C3J6A+WIg4/vYpWmbEJ2IL2Sb7huNMhAPtlkgBz2+xy0AdhgSbZb1Sa9QI8xT6GSYW+yChtUktIBQbiY= Received: from CY4PR02CA0035.namprd02.prod.outlook.com (2603:10b6:903:117::21) by CY4PR02MB2679.namprd02.prod.outlook.com (2603:10b6:903:11a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.18; Wed, 5 Sep 2018 06:41:11 +0000 Received: from CY1NAM02FT019.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::201) by CY4PR02CA0035.outlook.office365.com (2603:10b6:903:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.14 via Frontend Transport; Wed, 5 Sep 2018 06:41:11 +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 CY1NAM02FT019.mail.protection.outlook.com (10.152.75.177) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1101.10 via Frontend Transport; Wed, 5 Sep 2018 06:41:10 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:38350 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fxRV0-0001Xt-3u; Tue, 04 Sep 2018 23:41:10 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fxRUv-0000v6-0W; Tue, 04 Sep 2018 23:41:05 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w856ev7I015659; Tue, 4 Sep 2018 23:40:57 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fxRUn-0000hO-2t; Tue, 04 Sep 2018 23:40:57 -0700 From: Nava kishore Manne To: , , , , , , , , , Subject: [RFC PATCH v2 2/3] dt-bindings: fpga: Add bindings for ZynqMP reset driver Date: Wed, 5 Sep 2018 12:10:41 +0530 Message-ID: <1536129642-7049-3-git-send-email-nava.manne@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536129642-7049-1-git-send-email-nava.manne@xilinx.com> References: <1536129642-7049-1-git-send-email-nava.manne@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)(136003)(39860400002)(396003)(346002)(376002)(2980300002)(438002)(199004)(189003)(76176011)(106002)(77096007)(36386004)(51416003)(7696005)(9786002)(81156014)(8936002)(186003)(305945005)(81166006)(50226002)(2201001)(36756003)(217873002)(11346002)(110136005)(16586007)(2616005)(126002)(476003)(478600001)(446003)(336012)(426003)(486006)(6666003)(47776003)(50466002)(316002)(48376002)(106466001)(5660300001)(2906002)(356003)(8676002)(26005)(63266004)(921003)(107986001)(83996005)(5001870100001)(1121003)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB2679; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT019; 1:bLzgkMvsALwXFWF9Z/YAesmJxRynZUUYuJwecF0jaPX+XkgFOmjYSIf9kfX0Rox6KNKN34rtTsoL1wV1fiYIl0oyoOuKyrkDM3D1VPqRUWUE4mfNeQo4hGrExC7Rkm77 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0de60f0-f3a2-4f87-6aae-08d612fa9165 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:CY4PR02MB2679; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB2679; 3:oHQxqRWxOQVE26FcQsjH31+m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irrZdLID6UPdntlFctzynLOFzNzUE40pRHcNIGjW2rMqBiZ4DQtJNkveyK8rDrp885PTbJfFMAh9ZMdGCCJHIgjvWDqEoE36RCavhOUvUQSr2Bhg4GqfmYl9nOZbvNCAoOxA2lRj8M24KxhVdVqeKA7x9W6kiaKxmyeB2lQJ3AmUNMpG0hgTxc7MsZmj3ETNckgjIpdIEfw+U2L9jAj9gITfSgnxX6753DRlzq5IpGDk4NrUJNx2poXZTeS9OwFtBMrH8YDpBKoYJJaD//Y9UEP+dNxFJSKKSfKjYD5KxSXTqi08hHq4BgMvOMLVhYTjrnXHMCidWgy0D7j9H2ickYXnTETfA/08G1ormQOz+18bEnA9BFAdecXgPUvWjypzL1NvgYdL5XdOVc4V4JvBEQjlRf6pDRC8n5BmWLc1y3Ry X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(17755550239193); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699016); SRVR:CY4PR02MB2679; BCL:0; PCL:0; RULEID:; SRVR:CY4PR02MB2679; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB2679; 4:zBlxNv2pZdLQ/0VNIfnGP6nubrdHRfRSzlQen9yRc8k/3k8YCZ2b5y/sY7/ZMreM8CyU2/dD+0HMX2qq9qcr0aXxWdbl4SowwWiu0GnjldB+/W9SbKfiXVs3drgTh14/aLI+IXsT/XlQdfDlkbS3nWck31tBFrt80gdfJBDv6ttLu6Ici5wz5Lg9MNS4nAxcATlykSNcgN5vtBVE22t4xeyHLb0SYEr3COkHJNuoJVND94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G8tIf5HlvWun27VtBcm+wxBAKvFov/Ymx87d9F3iJMJ/7WTnHdX1Z2gRReA9S+QKURtakiv13mtkBFUHnf5iieqadLoXDD/s9DQuVYo7Fag/qpHk1RNqxhWyxRUu/j0IP6N+fXQ/g==; 5:ILitFJoSRNdH419fCRNdBhupswrgLb35mtuUQvA6piGv9ETEprnKavwgDMs42hCPo/jwtTY2xb4R3znDLn0PiGktzzT2C/mZKZOePFEGQsZKeE3U6ftYbM4r7NQUxNsyo+gLHl16FowobHzCPAIHC00lqsIrNn3d1WXfxbsArl0=; 7:Gw7H9CyVGHMUNUL58NMgB44vg/+gxnEPnwH5QStEPw9mGXtjRgfGgoacpR3VobykbtSm3VCOmVL2BWUTYaVqN4pOJAX8AeDYY8ftvysqoUTEHRvYqCbBgmKc+CcgnOu3FCmH0RUBtShAELd9KfFWQ1QwWVG54YYfPrZZ07oVPPMgDuV8DVSXjDCVVygcU59CdtqTq8+p/F9ihGYXWtEd48eIjUBprw0ZRDKCZ83x8bR/EfII5BNEAc0gnIqi8rAv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2018 06:41:10.5751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0de60f0-f3a2-4f87-6aae-08d612fa9165 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: CY4PR02MB2679 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180904_234123_898933_2BF8A64B X-CRM114-Status: UNSURE ( 7.51 ) 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: , 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 Add documentation to describe Xilinx ZynqMP reset driver bindings. Signed-off-by: Nava kishore Manne --- Changes for v2: -Moved reset node as a child to firwmare node. .../firmware/xilinx/xlnx,zynqmp-firmware.txt | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt b/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt index 1b431d9..351b1bb 100644 --- a/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt +++ b/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt @@ -17,6 +17,144 @@ Required properties: - "smc" : SMC #0, following the SMCCC - "hvc" : HVC #0, following the SMCCC +-------------------------------------------------------------------------- + = Zynq UltraScale+ MPSoC reset driver binding = +-------------------------------------------------------------------------- +The Zynq UltraScale+ MPSoC has several different resets. + +See Chapter 36 of the Zynq UltraScale+ MPSoC TRM (UG) for more information +about zynqmp resets. + +Please also refer to reset.txt in this directory for common reset +controller binding usage. + +Required Properties: +- compatible: "xlnx,zynqmp-reset" +- #reset-cells: Specifies the number of cells needed to encode reset + line, should be 1 + +Reset outputs: + 0 :PCIE config reset. + 1 :PCIE bridge block level reset (AXI interface). + 2 :PCIE control block level,reset. + 3 :Display Port block level reset (includes DPDMA). + 4 :FPD WDT reset. + 5 :AF_FM5 block level reset. + 6 :AF_FM4 block level reset. + 7 :AF_FM3 block level reset. + 8 :AF_FM2 block level reset. + 9 :AF_FM1 block level reset. + 10 :AF_FM0 block level reset. + 11 :GDMA block level reset. + 12 :Pixel Processor (GPU_PP1) block level reset. + 13 :Pixel Processor (GPU_PP0) block level reset. + 14 :GPU block level reset. + 15 :GT block level reset. + 16 :Sata block level reset. + 17 :ACPU3 power on reset. + 18 :ACPU2 power on reset. + 19 :ACPU1 power on reset. + 20 :ACPU0 power on reset. + 21 :APU L2 reset. + 22 :ACPU3 reset. + 23 :ACPU2 reset. + 24 :ACPU1 reset. + 25 :ACPU0 reset. + 26 :DDR block level reset inside of the DDR Sub System. + 27 :APM block level reset inside of the DDR Sub System. + 28 :soft reset. + 29 :GEM 0 reset. + 30 :GEM 1 reset. + 31 :GEM 2 reset. + 32 :GEM 3 reset. + 33 :qspi reset. + 34 :uart0 reset. + 35 :uart1 reset. + 36 :spi0 reset. + 37 :spi1 reset. + 38 :sdio0 reset. + 39 :sdio1 reset. + 40 :can0 reset. + 41 :can1 reset. + 42 :i2c0 reset. + 43 :i2c1 reset. + 44 :ttc0 reset. + 45 :ttc1 reset. + 46 :ttc2 reset. + 47 :ttc3 reset. + 48 :swdt reset. + 49 :nand reset. + 50 :adma reset. + 51 :gpio reset. + 52 :iou_cc reset. + 53 :timestamp reset. + 54 :rpu_r50 reset. + 55 :rpu r51 reset. + 56 :rpu_amba reset. + 57 :ocm reset. + 58 :rpu_pge reset. + 59 :usb0_core reset. + 60 :usb1_core reset. + 61 :usb0_hiber reset. + 62 :usb1_hiber reset. + 63 :usb0_apb reset. + 64 :usb1_apb reset. + 65 :ipi reset. + 66 :apm reset. + 67 :rtc reset. + 68 :sysmon reset. + 69 :afi_fm6 reset. + 70 :lpd_swdt reset. + 71 :fpd_reset. + 72 :rpu_dbg1 reset. + 73 :rpu_dbg0 reset. + 74 :dbg_lpd reset. + 75 :dbg_fpd reset. + 76 :apll reset. + 77 :dpll reset. + 78 :vpll reset. + 79 :iopll reset. + 80 :rpll reset. + 81 :gpio_pl_0 reset. + 82 :gpio_pl_1 reset. + 83 :gpio_pl_2 reset. + 84 :gpio_pl_3 reset. + 85 :gpio_pl_4 reset. + 86 :gpio_pl_5 reset. + 87 :gpio_pl_6 reset. + 88 :gpio_pl_7 reset. + 89 :gpio_pl_8 reset. + 90 :gpio_pl_9 reset. + 91 :gpio_pl_10 reset. + 92 :gpio_pl_11 reset. + 93 :gpio_pl_12 reset. + 94 :gpio_pl_13 reset. + 95 :gpio_pl_14 reset. + 96 :gpio_pl_15 reset. + 97 :gpio_pl_16 reset. + 98 :gpio_pl_17 reset. + 99 :gpio_pl_18 reset. + 100 :gpio_pl_19 reset. + 101 :gpio_pl_20 reset. + 102 :gpio_pl_21 reset. + 103 :gpio_pl_22 reset. + 104 :gpio_pl_23 reset. + 105 :gpio_pl_24 reset. + 106 :gpio_pl_25 reset. + 107 :gpio_pl_26 reset. + 108 :gpio_pl_27 reset. + 109 :gpio_pl_28 reset. + 110 :gpio_pl_29 reset. + 111 :gpio_pl_30 reset. + 112 :gpio_pl_31 reset. + 113 :rpu_ls reset. + 114 :ps_only reset. + 115 :pl reset. + 116 :ps_pl0 reset + 117 :ps_pl1 reset + 118 :ps_pl2 reset + 119 :ps_pl3 reset + ------- Example ------- @@ -25,5 +163,9 @@ firmware { zynqmp_firmware: zynqmp-firmware { compatible = "xlnx,zynqmp-firmware"; method = "smc"; + reset-controller:reset-controller@0 { + compatible = "xlnx,zynqmp-reset"; + #reset-cells = <1>; + }; }; }; From patchwork Wed Sep 5 06:40:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nava kishore Manne X-Patchwork-Id: 10588327 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 0732014BD for ; Wed, 5 Sep 2018 06:43:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBBE92916F for ; Wed, 5 Sep 2018 06:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF66429656; Wed, 5 Sep 2018 06:43:44 +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 216A22916F for ; Wed, 5 Sep 2018 06:43:44 +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: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zo312sHb6PnKz8Wn0fqGA241TcQQ0CFMJ448zYs8lS8=; b=lvbv+0wpjaDoRc yu6/9cD4vX5oZdKoIHwMkxQJGG4/ylM6+aXBpvjdcW3YWPduUQod0319dur0t5+n4k6X2QE/Z5Usp Ryx1PTRlWC8F3hXeaxj6E50e4PydSNJiRWpE+XyOGLAG+obBbcfrGcjbNPPH6kkhGVoeFtA5p3GNx t3xG8g8NhJosR+7nP2GKGtaU0me1fwwtvYQIiTfysUAgLqih1IVTYFSJB4fOlz3FHQeKw+Xbl0PZx iItWUNRg+z3MuAc8efjey5pfHUgif6ojxE4a/qjZYWWf6dFtPh/SvKTXFHvXYcHSMggyB30cERn7g dYYR4ANC5v6aL7RC/Iqw==; 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 1fxRXJ-0001Iz-0S; Wed, 05 Sep 2018 06:43:33 +0000 Received: from mail-bn3nam01on0072.outbound.protection.outlook.com ([104.47.33.72] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxRVE-0000OA-Fl for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2018 06:41:26 +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=9nYqESsuCPGWfdDU22qIiRLmysA6EKd19Ewc7+lo/Yc=; b=FOE8llOrH4aE0mXAaaWQuG5UzKwULVMnL9IpfjlP6ChWgVjNZV4La2Zf5f59Y3I9cZbd4TQB8iGxBVITzVWARxU+gbohHGvnIJEWCO/K1ZgxSwKHEBjFtQ9FWxlW2Ri+8AqFQOZn5vUKIeeUUlMUaq5A+KSd0s2TaiRQ5DaSWcM= Received: from DM6PR02CA0021.namprd02.prod.outlook.com (2603:10b6:5:1c::34) by DM6PR02MB4937.namprd02.prod.outlook.com (2603:10b6:5:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Wed, 5 Sep 2018 06:41:11 +0000 Received: from BL2NAM02FT006.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::209) by DM6PR02CA0021.outlook.office365.com (2603:10b6:5:1c::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.16 via Frontend Transport; Wed, 5 Sep 2018 06:41:11 +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 BL2NAM02FT006.mail.protection.outlook.com (10.152.76.239) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1101.10 via Frontend Transport; Wed, 5 Sep 2018 06:41:10 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:38348 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fxRV0-0001Xs-2b; Tue, 04 Sep 2018 23:41:10 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fxRUu-0000v6-VJ; Tue, 04 Sep 2018 23:41:05 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w856f2FS015813; Tue, 4 Sep 2018 23:41:02 -0700 Received: from [172.23.37.94] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fxRUr-0000hO-Ty; Tue, 04 Sep 2018 23:41:02 -0700 From: Nava kishore Manne To: , , , , , , , , , Subject: [RFC PATCH v2 3/3] reset: reset-zynqmp: Adding support for Xilinx zynqmp reset controller. Date: Wed, 5 Sep 2018 12:10:42 +0530 Message-ID: <1536129642-7049-4-git-send-email-nava.manne@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536129642-7049-1-git-send-email-nava.manne@xilinx.com> References: <1536129642-7049-1-git-send-email-nava.manne@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)(346002)(39860400002)(376002)(396003)(136003)(2980300002)(438002)(189003)(199004)(478600001)(50466002)(476003)(356003)(2616005)(63266004)(36756003)(305945005)(126002)(8676002)(9786002)(336012)(446003)(81166006)(11346002)(426003)(36386004)(47776003)(81156014)(486006)(48376002)(77096007)(5660300001)(50226002)(2201001)(106466001)(26005)(2906002)(186003)(8936002)(110136005)(7696005)(217873002)(16586007)(106002)(6666003)(51416003)(76176011)(316002)(921003)(107986001)(83996005)(1121003)(5001870100001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4937; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT006; 1:kRGMopOdDwbhHtSRec7ORWk2ankpeKAj4BXQKy/CdMtD972qqBnmEpMHKtHwj6whpipdxActUntRWN51OcgRz2peQfEL8q5JJBJB8EGcmSzW5FW+dkmDctwGqiq7EYzm MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9661225c-3135-4992-b956-08d612fa914f X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:DM6PR02MB4937; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4937; 3:bktQ0wWLnvazuZ3sdkNUWuxMwbeAF9rXwpYU/ed1sjnoOTiohBbAiaPpEbAyA1PGf2iWaMYGZmcurm+0nIf8blqZrhD/5Bn7ODJ4oUD/TR3BYbA0uWQ+4326lsL0gipggsXHw4ck0GilGLAtVb/7YF17M3Tmf6G62pobljaMVQYL/t6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JvIFBRymexzgq4RPyEW6PvnhB8i6GEpsPLxEmnug70UQRubna/YVwCeVcwMqwaj54eITeCVdEVLsfT2R5qzM+rE7FutTv8QUrDE1XNDBoTHGLGgFcg+K/OfNGD8zKXYiEO6R+qA0vHqMOpW/di4FywPynt0XhIg6KS2r8S6cs28QfOGHSKVKyNiCQVB1D/U2+WDPU5XewSnW0RCtZd4e9W2839w9UFf7XdxvwWg0W8reGlpVX7G9zSJcH6kj0USK5ZbFMbeWeS4V0 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)(93006095)(93004095)(3231311)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016); SRVR:DM6PR02MB4937; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB4937; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4937; 4:6I7KNrD474UcJV8kQdZ7WM0WMsPYawiX2I64DQY5ULhph40KL23roRCAjGi72uj4Vc8zpAKS6bReapduKFgXTkifueKM8+XcwvFdQ0/RKefzPlo1EgPkQ8LXsh07DpOA5SkKKyk6SSF4a3cqxi+gFI9oRd8KEwPf6u8RuNW6EnssUsA1qPyhRPmVBqUDdxzfwx2icWSZJejnY+gbATyOWqxKXtEgkha2tAC2ZrtV11rGypMRasNvVEHAT0H2bFW7tUs26qBVQT6YZ63YsRDTFao7IpvWswDe6nQ9WE5KAh+YaOIbuHwUDIDGHvFaSpEa X-Forefront-PRVS: 078693968A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR02MB4937; 23:/Mk4j+JrLf9a2PYborVmCWueqj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9FbMarEuVIu4YUlBL4sFHaruVO88UZGngMY+A+MHS+evYPP8Ov1vywRFoymsD+X2i+7wMXjNPWjpcDqfx8EGbiHcZTgtC+MtbQs=; 7:fVRTDwPkXkGmDLBuAQ0aTorGjrn5XmDTXdHoBtiJgFHGvX6R1tKXqfKfXDGS1CVDtABSKnFX0r4AtfKBIdeAMmriD2OFoK1pqxzr6kN3MbzCfY0Uk1p4Jbv5CCJz3aNntAEfHJ6qDphy5d+0efX0vU8icGyWYHVZKLM8qGp4dsAG9wxhN+qweQCg9FgkeqNb8vMyPEBtmLXWt1AOyXwZTUWS6maEPfPCeVbLfRHhxRIOsHxHdDTOdajUFO2BVk56 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2018 06:41:10.5892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9661225c-3135-4992-b956-08d612fa914f 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: DM6PR02MB4937 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180904_234124_642595_6F7FC77E X-CRM114-Status: GOOD ( 12.45 ) 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: , 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 Add a reset controller driver for Xilinx Zynq UltraScale+ MPSoC. The zynqmp reset-controller has the ability to reset lines connected to different blocks and peripheral in the Soc. Signed-off-by: Nava kishore Manne --- Changes for v2: -Moved eemi_ops into a priv struct as suggested by philipp. drivers/reset/Makefile | 1 + drivers/reset/reset-zynqmp.c | 115 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 drivers/reset/reset-zynqmp.c diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index c1261dc..27e4a33 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -21,4 +21,5 @@ obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o obj-$(CONFIG_RESET_TI_SYSCON) += reset-ti-syscon.o obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o +obj-$(CONFIG_ARCH_ZYNQMP) += reset-zynqmp.o diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c new file mode 100644 index 0000000..f908492 --- /dev/null +++ b/drivers/reset/reset-zynqmp.c @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Xilinx, Inc. + * + */ + +#include +#include +#include +#include +#include + +#define ZYNQMP_NR_RESETS (ZYNQMP_PM_RESET_END - ZYNQMP_PM_RESET_START - 2) +#define ZYNQMP_RESET_ID (ZYNQMP_PM_RESET_START + 1) + +struct zynqmp_reset_data { + struct reset_controller_dev rcdev; + const struct zynqmp_eemi_ops *eemi_ops; +}; + +static inline struct zynqmp_reset_data * +to_zynqmp_reset_data(struct reset_controller_dev *rcdev) +{ + return container_of(rcdev, struct zynqmp_reset_data, rcdev); +} + +static int zynqmp_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); + + return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id, + PM_RESET_ACTION_ASSERT); +} + +static int zynqmp_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); + + return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id, + PM_RESET_ACTION_RELEASE); +} + +static int zynqmp_reset_status(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); + int val, err; + + err = priv->eemi_ops->reset_get_status(ZYNQMP_RESET_ID + id, &val); + if (!err) + return -EINVAL; + + return val; +} + +static int zynqmp_reset_reset(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); + + return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id, + PM_RESET_ACTION_PULSE); +} + +static struct reset_control_ops zynqmp_reset_ops = { + .reset = zynqmp_reset_reset, + .assert = zynqmp_reset_assert, + .deassert = zynqmp_reset_deassert, + .status = zynqmp_reset_status, +}; + +static int zynqmp_reset_probe(struct platform_device *pdev) +{ + struct zynqmp_reset_data *priv; + + priv = devm_kzalloc(&pdev->dev, + sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + platform_set_drvdata(pdev, priv); + + priv->eemi_ops = zynqmp_pm_get_eemi_ops(); + if (!priv->eemi_ops) + return -ENXIO; + + priv->rcdev.ops = &zynqmp_reset_ops; + priv->rcdev.owner = THIS_MODULE; + priv->rcdev.of_node = pdev->dev.of_node; + priv->rcdev.nr_resets = ZYNQMP_NR_RESETS; + + return devm_reset_controller_register(&pdev->dev, &priv->rcdev); +} + +static const struct of_device_id zynqmp_reset_dt_ids[] = { + { .compatible = "xlnx,zynqmp-reset", }, + { }, +}; + +static struct platform_driver zynqmp_reset_driver = { + .probe = zynqmp_reset_probe, + .driver = { + .name = KBUILD_MODNAME, + .of_match_table = zynqmp_reset_dt_ids, + }, +}; + +static int __init zynqmp_reset_init(void) +{ + return platform_driver_register(&zynqmp_reset_driver); +} + +arch_initcall(zynqmp_reset_init);