Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp538658ybh; Wed, 15 Jul 2020 08:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSsPG14I+MIgC+T+RAUhfXDXIcvmMo6KEI/QuN6lihqEFIpmvKNmH+3rzyKGXnRdxRRlLe X-Received: by 2002:a05:6402:b84:: with SMTP id cf4mr164634edb.21.1594827251123; Wed, 15 Jul 2020 08:34:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594827251; cv=pass; d=google.com; s=arc-20160816; b=Hv2McenJfmq/8PJNSIaCtlSsjTE31csY6vNNVZW5a/3wVjEqo6uyraKGPM/LMrEFJk ZJnILeUsbMLEdja6KACXR9FogxoCcMyGlpghJaWvl1GARtHTrSEBOzfIMIF+AqsPoRsg av9NnnqoQxPnRQROrEBFmFULC6gLnf7czIssG+5CT9nTBDbMX7lHWMEfvaX3H0IOcc7c 97BH0AETpRgaRqpwCeeM4hf5gGnC9Rqw63VvtgzJmP83SLh5vDYiuS0fjWIxMTsOvHjR g26HHjalk06eEbjgmSvYsws3pWJUomugR8fYduWBV+F5S6o/aJwDVraOIzKx5JdUFx0t L6rQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Xaq65E5Ymew1qmOFlWLncCeqH7fbHsQ5vSuITJJWhFQ=; b=KSSS84NN7/mZzaBqV6Vp1u0601T7VstFVTZdMT/sX8Euk1at377MsSpa8udrRGRz+y vauJI6HIukjalPYKpz2yOWqqN3/nGBsE+aOS5igvbVshmt5928fivFSzXPH1VriPH5Po ZENJKfxjZLf3AoqOJUx3S7rmcxBdbsAptPwkWoedD/MzLO8k8NGEPJ3XGJmbH9FTRgv1 R3RB2LlKyNExeOv22Rd+bpJ1uQzV5i2HflvGFlHkm5bBW/M3QHhHtUGbtbUcjNN34hC/ E5Jq8rmH0kP2jYC8zt0dudjPKtegifNNYYMMbSh9039jvGcUzxe0pHU6IQBl6a7Cudlj RzmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector2-xilinx-onmicrosoft-com header.b=r3zP1eoh; arc=pass (i=1 spf=pass spfdomain=xilinx.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si1451279ejj.468.2020.07.15.08.33.47; Wed, 15 Jul 2020 08:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector2-xilinx-onmicrosoft-com header.b=r3zP1eoh; arc=pass (i=1 spf=pass spfdomain=xilinx.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726856AbgGOPd0 (ORCPT + 99 others); Wed, 15 Jul 2020 11:33:26 -0400 Received: from mail-dm6nam12on2077.outbound.protection.outlook.com ([40.107.243.77]:42177 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725770AbgGOPdY (ORCPT ); Wed, 15 Jul 2020 11:33:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UTrhICtaIFYoVP/NVtyaJxqdDJ7MHimTV3fUPBcLkYcFPca53p7EC5t+/4eB5O1KzQIQp86o9anJjpDvMifgJmRuOE7wEifbV2dZhfIFsoKu2Ysr4vCjVxkQMIYVNIiYPmCfsaWeBuf/jrobjnyb6gWnFleFignnK+0VCJklwB4qPF2DAQUjW2PTs7beBCyzO4ljpw/eIa7YbCmT7qUQQh4S4kVtOJfP2AJcRU9RLX+iXtxJnn/UHrhT6Yv7jiB+LU4enBs4blnIyNJBjB+ZgnrF7B+0NtTH7AXLi66IN3LXg2tZHlTeCG5OckjQgIikmDly05jFs8OwesH8+kjDHQ== 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=Xaq65E5Ymew1qmOFlWLncCeqH7fbHsQ5vSuITJJWhFQ=; b=R9Rm5BF7Sj88duKUeyZwCHdL9EKDp58Y6KukUhoXN55PZzBA8iFQ9788inO6AyzQw7m8PLLHXCjd30lPvAAk+WsYJv9ndtAK5lDsZDdgvxArZyVbYpYXGGRdfOIg7M4B3TfXwSURD36RHxSBGy9TNl5Yim9if5jeOvTb1rXKA6/NgMYs1xtu+BGHluDG8VYuwV1vzHY61E3sZE8PWoHv8+85icoEygPi9YKhtnVlBNvkRUtZqIx0P+mKVi/uXTC0mW5jNLtR58Z9eQdXN3Bjic6fvDtZYRqf/na3d5w9ardckFyeJ0AN075D1ic5zn6H1WiRAq6Z6G4Rx2oGK8iphw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=wizery.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass 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=Xaq65E5Ymew1qmOFlWLncCeqH7fbHsQ5vSuITJJWhFQ=; b=r3zP1eoh/sfD9iUDMa34uv1OIftPtiCB1Daf1zZJcFejRztgxzeZW+ieclrqp92B6fc80T91Qse6Kg55v3aUWV/B0QKjf6Vo76zUcBj/xkWoSuKrAzS48goWylvLEhDZfS4D6UPgJgpWMOhD7lODCbjaMAKWvu0fIv+7gNZ6mjY= Received: from DM6PR06CA0046.namprd06.prod.outlook.com (2603:10b6:5:54::23) by DM5PR0201MB3399.namprd02.prod.outlook.com (2603:10b6:4:76::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Wed, 15 Jul 2020 15:33:21 +0000 Received: from CY1NAM02FT024.eop-nam02.prod.protection.outlook.com (2603:10b6:5:54:cafe::4c) by DM6PR06CA0046.outlook.office365.com (2603:10b6:5:54::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17 via Frontend Transport; Wed, 15 Jul 2020 15:33:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; wizery.com; dkim=none (message not signed) header.d=none;wizery.com; 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 CY1NAM02FT024.mail.protection.outlook.com (10.152.74.210) with Microsoft SMTP Server id 15.20.3195.18 via Frontend Transport; Wed, 15 Jul 2020 15:33:20 +0000 Received: from [149.199.38.66] (port=39379 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.90) (envelope-from ) id 1jvjNh-0005fR-Da; Wed, 15 Jul 2020 08:31:37 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1jvjPM-0007rZ-4x; Wed, 15 Jul 2020 08:33:20 -0700 Received: from [172.19.2.206] (helo=xsjblevinsk50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1jvjPJ-0007qz-JJ; Wed, 15 Jul 2020 08:33:17 -0700 From: Ben Levinsky To: ohad@wizery.com, bjorn.andersson@linaro.org, michals@xilinx.com, JOLLYS@xilinx.com, RAJANV@xilinx.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-remoteproc@vger.kernel.org, linux-arm-kernell@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jliang@xilinx.com, stefanos@xilinx.com Subject: [PATCH v6 0/5] Provide basic driver to control Arm R5 co-processor found on Date: Wed, 15 Jul 2020 08:33:12 -0700 Message-Id: <20200715153317.25643-1-ben.levinsky@xilinx.com> X-Mailer: git-send-email 2.17.1 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;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapsmtpgw01;PTR:unknown-60-83.xilinx.com;CAT:NONE;SFTY:;SFS:(136003)(396003)(39860400002)(346002)(376002)(46966005)(426003)(2616005)(6666004)(44832011)(36756003)(186003)(336012)(4326008)(7696005)(70206006)(107886003)(70586007)(26005)(5660300002)(316002)(9786002)(47076004)(81166007)(8676002)(83380400001)(478600001)(82740400003)(2906002)(356005)(1076003)(82310400002)(8936002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 38009c0d-c0c8-4495-f208-08d828d46762 X-MS-TrafficTypeDiagnostic: DM5PR0201MB3399: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1qoYZuHMxuZ8aKjwdCTtqxlITOHSLW4kdbvJB8+Jp7mF59gl0rOeMDfnffapFhcMO5GhkVlFSBcx78UfxY8e1nq0Ic/b4FqJTF80VJD59E7OZtzTgEf5WvnAnYo95SSZzal5pRCb54qkFFN2tgG/SR+Am5a3TTuHcC2FYG+ksNy7lmOMasLmLDiYbZKWgsu+tmEt+ZEqvkiAgJVXyupn5jK81UXIEcENJzlYaz9ReHY9R9hnyfIOvOcb6tKI4VIlO+b7I94UYAsmt6+OzETfpSgduk6abxV8Vz+hGuS16Mnn65PEVUOjKNg4Q5JEsSb80omDDArYNhcKpPQ9Duagb4Wt+Z8ixnVGFrPfEnlnD0W3bwcAZB3+jpg+Tqgf0yVQJoX16yHdQQjW47JeX0JcKw== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2020 15:33:20.5520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38009c0d-c0c8-4495-f208-08d828d46762 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-AuthSource: CY1NAM02FT024.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0201MB3399 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently it is able to start, stop and load elf on to the processor. The driver was tested on Xilinx ZynqMP and Versal. v2: - remove domain struct as per review from Mathieu v3: - add xilinx-related platform mgmt fn's instead of wrapping around function pointer in xilinx eemi ops struct - update zynqmp_r5 yaml parsing to not raise warnings for extra information in children of R5 node. The warning "node has a unit name, but no reg or ranges property" will still be raised though as this particular node is needed to describe the '#address-cells' and '#size-cells' information. v4: - add default values for enums - fix formatting as per checkpatch.pl --strict. Note that 1 warning and 1 check are still raised as each is due to fixing the warning results in that particular line going over 80 characters. - remove warning '/example-0/rpu@ff9a0000/r5@0: node has a unit name, but no reg or ranges property' by adding reg to r5 node. v5: - update device tree sample and yaml parsing to not raise any warnings - description for memory-region in yaml parsing - compatible string in yaml parsing for TCM - parse_fw change from use of rproc_of_resm_mem_entry_init to rproc_mem_entry_init and use of alloc/release - var's of type zynqmp_r5_pdata all have same local variable name - use dev_dbg instead of dev_info v6: - adding memory carveouts is handled much more similarly. All mem carveouts are now described in reserved memory as needed. That is, TCM nodes are not coupled to remoteproc anymore. This is reflected in the remoteproc R5 driver and the device tree binding. - remove mailbox from device tree binding as it is not necessary for elf loading 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 | 73 ++ drivers/firmware/xilinx/zynqmp.c | 134 +++ drivers/remoteproc/Kconfig | 10 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/zynqmp_r5_remoteproc.c | 911 ++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 75 ++ 6 files changed, 1204 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/xilinx,zynqmp-r5-remoteproc.yaml create mode 100644 drivers/remoteproc/zynqmp_r5_remoteproc.c -- 2.17.1