From patchwork Tue Feb 23 15:44:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Levinsky X-Patchwork-Id: 12100485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04B81C433E6 for ; Tue, 23 Feb 2021 15:46:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A567E64E20 for ; Tue, 23 Feb 2021 15:46:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A567E64E20 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=WJgNCB6IOTqoxMC/U3KcBvzX1dhIHo5c1oREe3SoRuI=; b=JfTEXr2ozadokTgTo2U6xjBzd/ MBmmw5nHEdDLfIVs6A4keQwJMT9AWYnkoA6asK85z6mH7qfM4QLQoLNfSIESYU9ltRyp8ndIC1ReJ ViWcnhzDevJIHFlwF0UvYkFQsL9pTAyJ/nrnn5fZC1r60PLii+U65G4wawEflBJzKqEZBAdzfW5cZ JbbxEjbw4dAvoEwF9fuPcLpU2mnuYdb+nbv4V92Y68kuqajQ2IY4X0qVVkR5pBZ1r8mrwXAx4GkJ4 MeTaqvpIbV3i5rTSmZa7VR9oxlR23C2JFHLSilA2YCuX7V45GEaR+vtWIzfsoh2690qRSKZjcIYmB w4GvNZ0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEZs2-0003Mn-9K; Tue, 23 Feb 2021 15:45:06 +0000 Received: from mail-bn8nam11on2075.outbound.protection.outlook.com ([40.107.236.75] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEZrq-0003JQ-5u for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 15:44:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K/WUn6HRAP2y4IUAi/ZnnRIbOK2irBEdORwf1jA2d+T0A0nk4P1U38lh2rBnIfbNOH4/icWKvwm6kEzNShX+yJTRp9jlui8fp0YBb56+o+Mhwq0N901Zfv6LxBVkL0OaYoP0IIn9iXjeMDc32meE6Rvum3nx4+1ZIAGRmi/X/pvfzwDRc/ew8vv5ZL2eAJuRJ9h/gpu/x3zMbTeySj0O0ION2WhjayXwGCAG+7wjk4L4MciWXuHJlKQxcsfx+/R40ab4jjrqzEpkeESq5Ajw6Zc8MuQXFn14xrg0vKpkSXtFX0fGG1SvqObi+n67TWb2IaTDTLNx1HA7uMGtBKAvDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mIYdrva6H9kIaRX0b2IF5a0nO4/e+Uw1FIKrnbv4lig=; b=eOJA4KlIsExYA2nVWxbGPTUlS56E2X+ZYOA9b/iJszj44XPuU+hwKGI0tdvZOHPLfKyghlgawvpzaqQnLjuso8WMEZ5MPdZjZQ6geKFjdH1Dkb4m19L36fMIjZejYzC0mq2a8+3YxWzBJtZWYoBybB4+qozcqJ1jfXvCg3ma4inLeU9xeQzdyWk3rV6qUMamC6V/BaYAgCOpxdBaD8/Ybd7LO68SMb8DUFVsH5zO5I3WmTWGlPUS0dHff8GcNIwDhWrR2r/Z+9jBRKODUeHCPxTctpYLfIJsl9US5EZRuT69jhtY9GQrgB6yCvQ3MDUWQhauCPBMrxzpHVcQ0I5gdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mIYdrva6H9kIaRX0b2IF5a0nO4/e+Uw1FIKrnbv4lig=; b=Uoil20EyaP1TA4BDb57yTgJlZ0xtlFuY0c0fc7+tLwIDh6Qt5d5HnYumG89XrqeQOQbdZrRw5ZXFX2jDcYHZWhaDTgheQs2wl6oTzvwPc5k7CiJULPR/V1zlj7YiqKiSN4p1b7ECw9M2Cg/4luQ3YZGAGtS9i+wPcdG3yRzl/ug= Received: from MN2PR07CA0003.namprd07.prod.outlook.com (2603:10b6:208:1a0::13) by BY5PR02MB6625.namprd02.prod.outlook.com (2603:10b6:a03:209::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.26; Tue, 23 Feb 2021 15:44:51 +0000 Received: from BL2NAM02FT020.eop-nam02.prod.protection.outlook.com (2603:10b6:208:1a0:cafe::df) by MN2PR07CA0003.outlook.office365.com (2603:10b6:208:1a0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Tue, 23 Feb 2021 15:44:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BL2NAM02FT020.mail.protection.outlook.com (10.152.77.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3868.27 via Frontend Transport; Tue, 23 Feb 2021 15:44:51 +0000 Received: from xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 23 Feb 2021 07:44:47 -0800 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Tue, 23 Feb 2021 07:44:47 -0800 Received: from [172.19.2.206] (port=40282 helo=xsjblevinsk50.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lEZrj-0006uk-7n; Tue, 23 Feb 2021 07:44:47 -0800 From: Ben Levinsky To: Subject: [PATCH v26 0/5] Add initial zynqmp R5 remoteproc driver Date: Tue, 23 Feb 2021 07:44:42 -0800 Message-ID: <20210223154447.13247-1-ben.levinsky@xilinx.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b627133-d693-4ea9-0b13-08d8d811f52f X-MS-TrafficTypeDiagnostic: BY5PR02MB6625: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cW6qmwqe2hZDPAps0+OCFWnUH0K+29jjxmH3tWR+xADclMwtZcAY+RhGMXcDZenEJ86HarQN+VanlgGi10cpT7YB+UavuWGdfIWF9Smkh6fLqNUXDcEZDU+Ha/dZPBad+ywCY4n6P3/bW19fcml7NCqp5WLyPQru8YPtmcTNE2Pz27kfaFxqDK6siNfqPNKJ4ikPlFZhEqHeBH6pYTmcy/csOq/ZkRv6iX7QXKcGFb0osICGmBo3pEn4HODi0whFMLjG18Y0NV9l+xHVDpPkWTMxgXclLoTdVr1sLLti14ghZlCmZrhpVUuJYaDLGrOHkJ+Sn5wntjE1NlWGSh1CdfeMEJa+vN3eN25uSSFRSxHANH5hU+JW7j8ba8xntS6arhBc1w4BAGFjMLnS4crETxlU016CUo9s7a0d47bLvxEJPg078KGj1TvGcMgw1hXmg0RJX48+xvH1myjBl8RA5r5c5jMpzkkgVXZWFUAKMdnE4WTn2FAfqLDIUy4RI+9xv++6k6rs9o5OnCIzrYn+9oJjmZb4q/Kg15enZbeIu1E5uDAEXWNXFsVXkoAfu2QJXykQxHIVhSybLiI0IOsVthj+YpOIJYJFIBRZYzTVUAeFKCDuRRTJA1EPFQk+pMlxhF7jqzx/Ji2hS7OS3VO9tp456zcytNfeEqtPuoX5vkzU3x8FCHU0wLKdrDZAQhjEeLhgvjIu3Xmgwyo3os0BJ1iN1ZMr6kuG2i30mEJC/77oWl195C1IIgfAGdmEe/fmznSZDQ4wYolMQVqgz3iz7A== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(396003)(376002)(346002)(39860400002)(136003)(46966006)(36840700001)(36756003)(1076003)(8676002)(5660300002)(44832011)(7636003)(186003)(47076005)(6666004)(966005)(356005)(36906005)(70586007)(6916009)(316002)(9786002)(7696005)(4326008)(54906003)(36860700001)(426003)(83380400001)(70206006)(26005)(336012)(2906002)(2616005)(8936002)(82310400003)(82740400003)(107886003)(478600001)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2021 15:44:51.1060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b627133-d693-4ea9-0b13-08d8d811f52f X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BL2NAM02FT020.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6625 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_104454_252506_0F499A55 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, michal.simek@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org R5 is included in Xilinx Zynq UltraScale MPSoC so by adding this remotproc driver, we can boot the R5 sub-system in two different configurations - * Split * Lockstep The Xilinx R5 Remoteproc Driver boots the R5's via calls to the Xilinx Platform Management Unit that handles the R5 configuration, memory access and R5 lifecycle management. The interface to this manager is done in this driver via zynqmp_pm_* function calls. v26: - add prepare and unprepare to handle Xilinx platform management's request_node and release node using each core's list of srams that is constructed in each core's zynqmp_r5_probe. - add new field sram to zynqmp_r5_rproc to store each core's srams being used as described in device tree. This helps to reduce unneeded looping of the sram prop in device tree. As now only zynqmp_r5_probe has to parse and validate each core's sram property. The ensuing prepare, unprepare and parse_fw logic are now much simpler. - similarly add 'size' field to struct sram_addr_data to simplify prepare, unprepare and parse_fw. Previous version: https://patchwork.kernel.org/project/linux-remoteproc/list/?series=412083 Ben Levinsky (5): firmware: xilinx: Add ZynqMP firmware ioctl enums for RPU configuration. firmware: xilinx: Add shutdown/wakeup APIs firmware: xilinx: Add RPU configuration APIs dt-bindings: remoteproc: Add documentation for ZynqMP R5 rproc bindings remoteproc: Add initial zynqmp R5 remoteproc driver .../xilinx,zynqmp-r5-remoteproc.yaml | 223 ++++ drivers/firmware/xilinx/zynqmp.c | 96 ++ drivers/remoteproc/Kconfig | 8 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/zynqmp_r5_remoteproc.c | 954 ++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 64 ++ 6 files changed, 1356 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml create mode 100644 drivers/remoteproc/zynqmp_r5_remoteproc.c