From patchwork Fri Jun 16 18:11:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13282759 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 AA0C5EB64DA for ; Fri, 16 Jun 2023 12:59:18 +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:References:In-Reply-To: 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: List-Owner; bh=JjIx51bRpM////IGigqY5AIWQK2F8QqCzvZok/07nBk=; b=OL/5SAoNeyy8EO W84fFzxtXIYbz7kvCyaT72yd9ifKfnVteYh9zJ8frxz9kcKrUQ4bqcJeV+lGPbNFYT4qQBSgxELiV EERC0r1031E+R3cqTq1o7rQPPrvaiP0GUJMnIu/TdlrcjD5Ar+ai6FfUr+WNPaSKd8JmSHILubnnX G8d8ZxPhdLNX3B8X/X/PlzvUoRJTrybqCdqgbNGlOHASOorVPWNHfxzR3PFd7RHPGw2RlvMkpZieL R1B7i6MbRhZfIKWKJL+LeXtXxU1BkE2k8dnCPBeXZxe439z4wp4yJwLroSJQF1jhBEaRPXQ200J7B JJEcmibltWIWsCdQ1ZuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qA92W-000cnX-35; Fri, 16 Jun 2023 12:58:56 +0000 Received: from mail-db8eur05on20622.outbound.protection.outlook.com ([2a01:111:f400:7e1a::622] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qA92N-000cij-38 for linux-arm-kernel@lists.infradead.org; Fri, 16 Jun 2023 12:58:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GO7P3SUjoEHJq9/deKGoGXoDx/Qr2ud3lswUxm2+VMmtRv3wfOK4WE7C3vQdF3UBS9Psfhqf5Dq5DVK2uTt95h33vT4RaGqPOZh63cv/y1/CY37EmfCPnGVXAHfjNnewoFCnTeQO2u13RG3KelurUGa5Py0GKqtmIl6wtdrG+3aYuu3IKhZTCLQxRoSZHz2Mvw/83jQ0zFNANh05Ym7ToyGnVU0PjkNMuEakiZTYe39UOYv5N0Uwk88Gh8uEU3sPeW/N8AsrmpJ5fwD4n52IP4mdtZYFnndX7wCVqUYBVMAXhiWdrPT1UMmUeyOEYASNssKNaeBhHKkZoGwefRGcjw== 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=n1fhPRIZOPPL6zUY6w4eSpTu9xFM7irWNsi7ifWfsS0=; b=dUxnPUhQy4ahtZbTDMxQbSd8NrIzO6obS3+4RZXaujADwk50QzAidCorkdVSTehBU61O/h7GtolWXEEqwUUMbLy6Rhv+yIBiLQLWoE8tneid7XeNynjnTqcfZI/mr8aBx2pS0NS/jo7pg3DMYnX4ubUjo+blxixDGbzv2UQem8AK3KsvqJi/7QDI35f0T67NJ+Y3DUkT2Nlih3aWLLTa3ZB1dk0qlj7H3AFtiFti8gao8TDzkfu9iipsgFESQ+FKArbNSErx7F5yafDhDbCn63xhXGyHkXcmzjBwAs3FqL8yePSbZ+FUGukztOjuIkqdFM6kqiFimSL5B5mwe5I3fQ== 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=n1fhPRIZOPPL6zUY6w4eSpTu9xFM7irWNsi7ifWfsS0=; b=nXLN8bMtg/UWzQBMcppexiKijo4I4EZbEsIjQ8WQeTg84bKTkzT1uka4+jq1dFlttigwa27MXGyhsYwWNOBLr5jS+nXA3ecU13iUozKfvfGBJO+GlM1VOR7BZOrMFmUpUaRGQgZIC7G98FhNF3g2zcQjf8eJxnOeKxV3N3YZLGo= 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 PAXPR04MB8320.eurprd04.prod.outlook.com (2603:10a6:102:1cf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.25; Fri, 16 Jun 2023 12:42:55 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::413f:a9d5:4c09:9dad]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::413f:a9d5:4c09:9dad%3]) with mapi id 15.20.6500.029; Fri, 16 Jun 2023 12:42:55 +0000 From: Pankaj Gupta To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gaurav.jain@nxp.com, linux-kernel@vger.kernel.org Cc: Pankaj Gupta Subject: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc Date: Fri, 16 Jun 2023 23:41:38 +0530 Message-Id: <20230616181144.646500-2-pankaj.gupta@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230616181144.646500-1-pankaj.gupta@nxp.com> References: <20230616181144.646500-1-pankaj.gupta@nxp.com> X-ClientProxiedBy: SG2PR03CA0100.apcprd03.prod.outlook.com (2603:1096:4:7c::28) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8630:EE_|PAXPR04MB8320:EE_ X-MS-Office365-Filtering-Correlation-Id: d4a5de26-3b6e-49c5-542a-08db6e6734ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q5Qc8/nVCq2mUqmkl9JhcQcZbPPGNTVQeLdIz4IbNF5EUkpyb/oX2ztus/t1mWdQVxSaKL+AyiL2P3LbcqoU7zeGfu4ZlO5PQWN7bsm0N/6PIRxtmS+jvtBM5LZjCY319LYnBtgGN//4kpl3AWzGcNVRirigRRNGdlo8NKx5HrDYZvHZ7ZDqttcYNhOc3+zkLXDyYsyOKz8ZqFi1CJnSWxxhfSEE2ylqatj5efhSAyyBVZGuve7naQDiMkqF/n8z8yS1m8vXor/uwHWwCqda1Ef/LcCjUQZyZwgt6Q91WGGKvYGWt/atURA2WAXf/9BN+6KzoQkbhX2/Lz8Rg4/y619SEMjYzWD2BlRLmx9p5AQxToL7I3sCGQcie18ybnzkXsaHMc2TWNfR6nYqApmzLJ2WKEZ5wOQq9WLG+45ZeFA8RjKpBTDhCtqtOWDqiQLmQ92jqq3Ft4NS8cJh65agivBkscx906Sn637C/qt+dVingaIgorjn7fxC692WSvYtOZ9Ee7zRObTXbGcZFzJu9UlZTtJilJOWjcUUz8AUN7t33U2kJ5OhuwRyTOms1KZhz/3iVeNFvMwJXqrJJQDBy0YUgTHWg5KAsgl1B+nItRS/0H7BFDQQwwc9hWGZfwg6nDMKBCLHP/9jHacJ+ZMgh9q3jTXmBvnE99HfvuehsG8= 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)(346002)(396003)(39860400002)(376002)(136003)(366004)(451199021)(5660300002)(478600001)(8936002)(41300700001)(8676002)(966005)(316002)(6486002)(52116002)(1076003)(6506007)(7416002)(44832011)(186003)(6666004)(4326008)(66476007)(66556008)(66946007)(26005)(6512007)(2616005)(2906002)(83380400001)(921005)(38100700002)(38350700002)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XMcTFZVTi0QnQ+by3RqCyf9rNFjOxCW7vNajsuLPQTAr3I1eaaIvu+SqRAi/9fgyfOCHL7U956wkHhKBJJcTnS7Y9NAYHewnAzkq6Lq8l7akKfDH7TbWrRgy39ZdO7ypZ281ZDHaIqLCH0q64MLtctcF1FFmuZEHgDJndV73EA7DKEn3o4YvjZ5hm3TeKoglzS4nP02a8mVuXK7B0ZS89G3EFqiPZ/VexqQK6I15R1nt9qNUekGHookVkU5EOMGyvlc1EmkHzxZwHTN4kGAeOOzMEd9wthLN+9Aa7Spo7A3rEB7NPUIGM0yTookUlpavMKXpH7CBlqce7NYnnBq3VgfP04REYI+rI1IrX/VCJ12d1brB1NZxHuSL+IyyR/wcRMce5NfR0TcMnwq4gLQtV/rjUEkNQX2WBwQCoVxDhj9Oa8wyNuwOEcx1Sy/7mqjmFMzjm/2eo/z38GaESi2PGPNScDf/7mNRBAK/6HiSm1n+VNyu64vsRHtlc1DRkMPA+yUAcVSajE6rPtUHH9wQIApaduHNL1d+lrYMt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id: d4a5de26-3b6e-49c5-542a-08db6e6734ec X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 12:42:55.3162 (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: ahDo/ITaoz7kmL/JxDd25KlFc17qDUzrNq6a0L5w7rTqEUosOXvdGrS9VsRkAPn+Zxb6636K0ku6cNW67zkmCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8320 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230616_055848_012991_F3820F11 X-CRM114-Status: GOOD ( 18.62 ) 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 The NXP i.MX Message Unit enables two processing elements to communicate & co-ordinate with each other. This driver is used to communicate between Application Core and NXP HSM IPs like NXP EdgeLock Enclave etc. It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93 etc. Signed-off-by: Pankaj Gupta --- .../bindings/arm/freescale/fsl,ele_mu.yaml | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file mode 100644 index 000000000000..29e309a88899 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml @@ -0,0 +1,144 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/freescale/fsl,ele_mu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX EdgeLock Enclave MUAP driver + +maintainers: + - Pankaj Gupta + +description: | + + NXP i.MX EdgeLock Enclave Message Unit Driver. + 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. + + The messages must follow the protocol defined. + + Non-Secure + Secure + | + | + +---------+ +-------------+ | + | ele_mu.c+<---->+imx-mailbox.c| | + | | | mailbox.c +<-->+------+ +------+ + +---+-----+ +-------------+ | MU X +<-->+ ELE | + | +------+ +------+ + +----------------+ | + | | | + v v | + logical logical | + receiver waiter | + + + | + | | | + | | | + | +----+------+ | + | | | | + | | | | + device_ctx device_ctx device_ctx | + | + User 0 User 1 User Y | + +------+ +------+ +------+ | + |misc.c| |misc.c| |misc.c| | + kernel space +------+ +------+ +------+ | + | + +------------------------------------------------------ | + | | | | + userspace /dev/ele_muXch0 | | | + /dev/ele_muXch1 | | + /dev/ele_muXchY | + | + + When a user sends a command to the ELE, it registers its device_ctx as + waiter of a response from ELE. + + A user can be registered as receiver of command from the ELE. + Create char devices in /dev as channels of the form /dev/ele_muXchY with X + the id of the driver and Y for each users. It allows to send and receive + messages to the NXP EdgeLock Enclave IP on NXP SoC, where current possible + value, i.e., supported SoC(s) are imx8ulp, imx93. + +properties: + compatible: + enum: + - fsl,imx-ele + - fsl,imx93-ele + + mboxes: + description: + A list of phandles of TX MU channels followed by a list of phandles of + RX MU channels. The number of expected tx and rx channels is 1 TX, and + 1 RX channels. All MU channels must be within the same MU instance. + Cross instances are not allowed. The MU instance to be used is S4MUAP + for imx8ulp & imx93. Users need to ensure that used MU instance does not + conflict with other execution environments. + items: + - description: TX0 MU channel + - description: RX0 MU channel + + mbox-names: + items: + - const: tx + - const: rx + + fsl,ele_mu_did: + description: + Owner of message-unit, is identified via Domain ID or did. + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [0, 1, 2, 3, 4, 5, 6, 7] + + fsl,ele_mu_id: + description: + Identifier to the message-unit among the multiple message-unit that exists on SoC. + It is used to create the channels, default to 2 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [0, 1, 2, 3] + + fsl,ele_max_users: + description: + Number of misclleneous devices to be created, default to 4 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + fsl,cmd_tag: + description: + Tag in message header for commands on this MU, default to 0x17 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint8 + - enum: [0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e] + + fsl,rsp_tag: + description: + Tag in message header for responses on this MU, default to 0xe1 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint8 + - enum: [0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8] + +required: + - compatible + - mboxes + - mbox-names + +additionalProperties: false + +examples: + - | + ele_mu: ele_mu { + compatible = "fsl,imx93-ele"; + mbox-names = "tx", "rx"; + mboxes = <&s4muap 2 0 + &s4muap 3 0>; + fsl,ele_mu_id = <1>; + fsl,ele_max_users = <4>; + fsl,cmd_tag = /bits/ 8 <0x17>; + fsl,rsp_tag = /bits/ 8 <0xe1>; + };