From patchwork Wed Apr 19 17:55:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13216761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01B9BC6FD18 for ; Wed, 19 Apr 2023 12:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=O2IQUR/7TZCfYYT6yugLbtOeQENNJNR4rGHMKxMoFD0=; b=2FTv0M6zcoPKUI 1LnD7hMlt/Ei/f5NWTzIGwapuF8KXvfeGwOZyOmubmyHXmqiOqLN4HQZVNv+1YiLVOk0ydBBfoTXu vRgbnMhsNoCzXFCi6SoCzDyAe1SPAdIfdMok4Mv/Pnws7l9Ls+joBB2hEd6vXuvikha3eWoOv9fIL 09jagmu5INyix2FEwgYE0nK/UrJwxHHGz1UFKzHQyDsZPxAv7u+WduYg0frNABNiVscF0Gspc2MaZ XL54LuMlUDg30P4CH9DzUWE1p0uwTyJNqIstMwk9SJZpxqMcC8icq+r6Dta4MzoZQx1f3p5MXa2cb HDRH4rD7inFplz0JWzfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pp6tC-005N2u-0A; Wed, 19 Apr 2023 12:26:22 +0000 Received: from mail-db3eur04on060e.outbound.protection.outlook.com ([2a01:111:f400:fe0c::60e] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pp6t8-005N1J-0q for linux-arm-kernel@lists.infradead.org; Wed, 19 Apr 2023 12:26:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NzX4IRQ3kmUifqkKNsJZJUmD3Sm5sRJOO+FnQUhCIK7rEx3XZNj5qLso4zc9k4kVDWC26gl2aGEhAIsyKesnU1DBNZ97MA8oEFoSo2OzpjiashD18HNb07kL2cYWh3kkQ/QfkM1ukEEKE74ctHFWEwpzg4nmCztOXVZ22wI6inQUzltgkQYjOd/W3Uf7RmRNumT81FrrsDnlWperOiQjm7neJwNZBBFJ86nNXZw6rFsnWpt47EmLZFKoZcMMpfYg+aN2ny8SehaOaLTwPg1pkjijuB/XvXKObZCogEKGpe5IxMnJzs3xzfN+DV5SvXAJtcSo/2HHuMeo9N5NHKlG5A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=k3OuFcS8FmoUWaFC4M6KJidIIuemm41W6vqZI4YlH8s=; b=S8J1azNMK/VXWIHtHzcwYBuxx8YW6kIcwLPjO38psHGTrIigltOdQoNM7QVv+/BMPg6gbQikZIte229ceiA6EKAnXCBpYZy9Yd3bGtQePpF6wrYr5fSmxoQpx3mMr7HVkbqNst+BycEZBonuicFXt4EGZ7BWUWCayZ54hGYYYMxgr+QEn7OR9tl1/UNR/fCdd1Rv4dhOHG6egUj4/b83rDY4t5l2F0J7D5hU5Py4ESheDqZsuoEOFabP4n2Whpl6A5DL3dA40GvPDppHOf7ZvuEldke0eb5c3GX1gIDD18tACIlYIWw4r6lMixuK45tUfU84++jjQ5GoXrtLdT1vkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k3OuFcS8FmoUWaFC4M6KJidIIuemm41W6vqZI4YlH8s=; b=UOwp1AJyysMkiBh5E7PkfjoRwdEqvEP428fx8r0UV6l3jH+14F1FKwANAYKIIqKWSCxdI/cWTkuwkdarFpI0x/lYILRma7BsfT3Lq8xNGrMGx45Xf+nJcpzA9IbeIDBGSJ+a651Iihq6DQSt4qT9+YmJsiCZS7jqSrRRA/6mgl8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by PAXPR04MB8912.eurprd04.prod.outlook.com (2603:10a6:102:20f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.21; Wed, 19 Apr 2023 12:26:12 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::bb08:83bc:69ce:21ed]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::bb08:83bc:69ce:21ed%9]) with mapi id 15.20.6298.030; Wed, 19 Apr 2023 12:26:12 +0000 From: Pankaj Gupta To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, gaurav.jain@nxp.com, sahil.malhotra@nxp.com, aisheng.dong@nxp.com, V.Sethi@nxp.com Cc: Pankaj Gupta Subject: [PATCH v2 0/7] *** firmware: imx: NXP Edgelock Enclave MUAP Driver *** Date: Wed, 19 Apr 2023 23:25:31 +0530 Message-Id: <20230419175538.855493-1-pankaj.gupta@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2PR06CA0008.apcprd06.prod.outlook.com (2603:1096:4:186::23) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8630:EE_|PAXPR04MB8912:EE_ X-MS-Office365-Filtering-Correlation-Id: 0447e269-e379-4086-2c2d-08db40d142d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ms6Q56DmXSnafV74dedXwDqZuZeTqt1RwI4MAXkU76Rp3pjB8kWSrN4kuBxqWcZKYpjZy8edxy2VsdMqMv7no1G8VlEJx6Aq6B5MGppbYern0xlUHDNfRpTiPS+9i3rzgRZhkUwp1XgJKgGbnsGkiBvuGTMrg1GK2UOjUYHQ0lpOsv6PNBqBgQo2eB3/tJ7vfJtrkX74EfRMkCdQsr0wnlOtXmLIQi7uUVsTMjN1OIzC2tvnSzsu68cE9vuA5yWRE6BOQoJryfHfFLqElBUoe6e2Odque4ld2kSdhKxhZuY6I38h0mwDK+fYSnhWAS72oEhMbrujO6bEOtkMz4nWNL60dv/4k/dExCwKthre7xy1xWwoPGFivBMraRe0hjCpxyIivvDLGJihoCQAWbgr3yFXIgUt6GL6BzLA1YAlczQ7eCCVmuOav+44njw7xC8xYjoCi6g5UtHGBbElc86PnKbtCkXSWkt2GLw/j/uGd++5xsIsYr8PIQvzUaxsTfCE+m3dobwgj5Xpd+84UGmoDULPkNgAwuDZtBlPH11CoYkkFfZW1Ndc9CqW3VW2M2LjXrT3EMe1/eKNRMhTFs0+fv1RWiueilz8jnIRXNWrwJ1R4idXo0eYpjqqtRdZQkf5/ASLPMbGNbGCs9aIQsTLbQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(346002)(366004)(396003)(39860400002)(376002)(451199021)(44832011)(5660300002)(8676002)(8936002)(41300700001)(316002)(4326008)(66476007)(66556008)(66946007)(2906002)(6636002)(478600001)(86362001)(26005)(38100700002)(38350700002)(921005)(36756003)(6486002)(52116002)(6666004)(83380400001)(6506007)(1076003)(186003)(6512007)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xptzECeHwWLKPMbN6KwmMGttRorFY11ABQ28GVfcOWYufVA/qXiQL7jfE6wNWHOANpy8u5DapMmt4EslG9Ul6dsAn4thx184FxvcOwzpeXGyAn8Qfy47rtSw7zXg8WIK51BBw97wJcrQHAjbM7BPFrpDeWP7/JxWFLDJ90BCp8NnJ/2e/ApQMxlAXE+WDkuc6CaHFZZHuPcWQgj3YZhHJWarWjd3xC2fy/OGZ4fNibY5AieXEyPTRwjx9MUWi3K9rW5K3uJ02nTG/NNDxHTDMXwvHC2T8O0qXUefjFBJUYl03NGn7AXMrm5ye34Rm/r5CWOLsXqnhJyxhlNLxKkaTTImlhTwlbgqfJfQhEtECnfYa6nsTsPIbGGkwo7dIJ1q4AqXl7G6oWBGJGmKuTRnfytcXcuGN65fBbc2Sxyr6CRj6twzyZLXFpe2mNPcPekJU0HeLQJgi3BIxteIZkCi4RbexGE1HCfMqzMSGjUMXrGbVGbnByBwcPqyU6O7+iF7+pXQ033YwcG4Cle2YGlAo1UaqXxZCW+hj7JqH30jCus0QaGR420pghFGwSlw5PtFQZwyTqqqkPNkLj/6IwP/iWzYpxKxwypxgTl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ange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2023 12:26:11.9017 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Tt9BIjBx7XYppMY+p+rO5fZBpZunc8/1f/E0hMAn+wDFv9F67GAbOOgKGQ6dXH85N6d01E7OrPzZVA/bpEYpHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8912 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230419_052618_360090_9B75363F X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org v2 Changes: - Fixed Kernel Test Bot issues. - Removed ".../devicetree/bindings/mailbox/fsl,muap.txt" v1: The Messaging Unit module enables two processing elements within the SoC to communicate and coordinate by passing messages (e.g., data, status and control) through its interfaces. The NXP i.MX EdgeLock Enclave Message Unit (ELE-MUAP) is specifically targeted for use between application core and Edgelocke Enclave. It allows to send messages to the EL Enclave using a shared mailbox. Patch-set add the ELE-MU kernel driver for exchanging messages with i.MX NXP ELE IP; both from: - User-Space Applications via character driver. - Kernel-space, used by kernel management layers like DM-Crypt. Pankaj Gupta (7): doc: device tree binding addition for ele MU arm64: dts: imx93-11x11-evk: added ele-mu arm64: dts: imx93-11x11-evk: reserved mem-ranges to constrain ele-mu dma-range arm64: dts: imx8ulp-evk: added ele-mu arm64: dts: imx8ulp-evk: reserved mem-ranges to constrain ele-mu dma-range firmware: imx: add ELE MU driver support MAINTAINERS: Added maintainer details .../bindings/arm/freescale/fsl,ele_mu.yaml | 139 ++ MAINTAINERS | 7 + arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 15 + arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 +- .../boot/dts/freescale/imx93-11x11-evk.dts | 15 + arch/arm64/boot/dts/freescale/imx93.dtsi | 11 +- drivers/firmware/imx/Kconfig | 11 + drivers/firmware/imx/Makefile | 2 + drivers/firmware/imx/ele_base_msg.c | 378 +++++ drivers/firmware/imx/ele_mu.c | 1285 +++++++++++++++++ drivers/firmware/imx/ele_mu.h | 174 +++ include/linux/firmware/imx/ele_base_msg.h | 67 + include/linux/firmware/imx/ele_mu_ioctl.h | 52 + 13 files changed, 2167 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml create mode 100644 drivers/firmware/imx/ele_base_msg.c create mode 100644 drivers/firmware/imx/ele_mu.c create mode 100644 drivers/firmware/imx/ele_mu.h create mode 100644 include/linux/firmware/imx/ele_base_msg.h create mode 100644 include/linux/firmware/imx/ele_mu_ioctl.h