Skip to contentSkip to conversation

firmware: imx: NXP Edgelock Enclave MUAP Driver

PATCH Superseded Pankaj Gupta 3 participants 19 messages Jun 16, 2023 – Jul 24, 2023

Subsystems (2)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v3 cover firmware: imx: NXP Edgelock Enclave MUAP Driver

v3 Changes:
- update the commit message for documentation.
- Fixed dt-binding checking error for file- fsl,ele_mu.yaml
- Coverity fixes in the ele_mu.c

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):
dt-bindings: arm: fsl: add mu binding doc
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    |  144 ++
 MAINTAINERS                                   |    9 +
 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      |   12 +-
 drivers/firmware/imx/Kconfig                  |   11 +
 drivers/firmware/imx/Makefile                 |    2 +
 drivers/firmware/imx/ele_base_msg.c           |  372 +++++
 drivers/firmware/imx/ele_fw_api.c             |  112 ++
 drivers/firmware/imx/ele_mu.c                 | 1442 +++++++++++++++++
 drivers/firmware/imx/ele_mu.h                 |  180 ++
 include/linux/firmware/imx/ele_base_msg.h     |   62 +
 include/linux/firmware/imx/ele_fw_api.h       |   19 +
 include/linux/firmware/imx/ele_mu_ioctl.h     |   52 +
 15 files changed, 2458 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_fw_api.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_fw_api.h
 create mode 100644 include/linux/firmware/imx/ele_mu_ioctl.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/7 dt-bindings: arm: fsl: add mu binding doc

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.

---
 .../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
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +144 -0
new file mode 100644
index 000000000000..29e309a88899
@@ -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 <[email protected]>
+
+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>;
+    };
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Quoted 7 lines · Pankaj Gupta

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.

I don't see reply to Daniel's concerns.

I don't see improvements here based on the previous review you received. It seems you just ignored everything, right?

Limited review follows up because binding is not in the shape for upstream. Do some internal reviews prior sending it.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Quoted 10 lines
---
 .../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
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +0 -0
new file mode 100644
index 000000000000..29e309a88899

No underscores, filename based on compatibles.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 7

Quoted 8 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +7 -0
@@ -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

Drop driver.

Quoted 73 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +73 -0
+
+maintainers:
+  - Pankaj Gupta <[email protected]>
+
+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.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 90

Quoted 10 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +10 -0
+    items:
+      - description: TX0 MU channel
+      - description: RX0 MU channel
+
+  mbox-names:
+    items:
+      - const: tx
+      - const: rx
+
+  fsl,ele_mu_did:

No underscores. Drop all properties not related to hardware.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 95

Quoted 5 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +5 -0
+    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]

That's not the syntax you can find. Open example-schema and rewrite your bindings.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 135

Quoted 4 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +4 -0
+
+examples:
+  - |
+    ele_mu: ele_mu {

Node names should be generic. See also explanation and list of examples in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 144

Quoted 9 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +9 -0
+      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>;
+    };

Best regards,
Krzysztof

#3 lore raw

RE: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Quoted 27 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, June 16, 2023 6:51 PM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 3 lines · Pankaj Gupta

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

Quoted 3 lines

Enclave etc.
It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93 etc.

Quoted 6 lines
Quoted 1 line

I don't see reply to Daniel's concerns.

I don't see improvements here based on the previous review you received. It seems you just ignored everything, right?

Replied to Daniel's concern.

Quoted 3 lines

Limited review follows up because binding is not in the shape for upstream. Do some internal reviews prior sending it.

Done the internal review.

Quoted 7 lines
Quoted 7 lines
---
 .../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

Quoted 9 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Quoted 7 lines

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

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +0 -0

No underscores, filename based on compatibles.

Accepted. Will correct in V4.

Quoted 38 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 3

Quoted 6 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +3 -0
@@ -0,0 +1,144 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
+---
+$id:

+https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi

Quoted 1 line

+cetree.org%2Fschemas%2Farm%2Ffreescale%2Ffsl%2Cele_mu.yaml%23&d ata=05

Quoted 1 line

+%7C01%7Cpankaj.gupta%40nxp.com%7C72b9e18a32a342bcf68c08db6e6c 8d5a%7C6

Quoted 1 line

+86ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638225184750511073 %7CUnknow

Quoted 1 line

+n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h aWwiL

Quoted 1 line

+CJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5quVB0LAMCdjYghThl6PSI3 CJPfuGtVoW

Quoted 3 lines

+AtN1gr4xm0%3D&reserved=0
+$schema:

+https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi

Quoted 1 line

+cetree.org%2Fmeta-

schemas%2Fcore.yaml%23&data=05%7C01%7Cpankaj.gupta%

Quoted 1 line

+40nxp.com%7C72b9e18a32a342bcf68c08db6e6c8d5a%7C686ea1d3bc2b4c 6fa92cd9

Quoted 1 line

+9c5c301635%7C0%7C0%7C638225184750511073%7CUnknown%7CTWFpb GZsb3d8eyJWI

Quoted 1 line

+joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7 C3000%

Quoted 1 line
Quoted 7 lines

+7C%7C%7C&sdata=GyUGJThMnxLNEQX1guW9Q%2BdoVjMrvn%2FSupgJ7tu fkXk%3D&res

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 7

Quoted 3 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +3 -0
+erved=0
+
+title: NXP i.MX EdgeLock Enclave MUAP driver

Drop driver.

Accepted. Will correct in V4.

Quoted 77 lines
Quoted 5 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +4 -0
+
+maintainers:
+  - Pankaj Gupta <[email protected]>
+

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Quoted 10 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +10 -0
+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.

Quoted 45 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +45 -0
+
+  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.
+

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Quoted 10 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +10 -0
+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

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Quoted 2 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +2 -0
+      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

Quoted 1 line

+ for imx8ulp & imx93. Users need to ensure that used MU instance does

not

Quoted 13 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 90

Quoted 11 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +11 -0
+      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:

No underscores. Drop all properties not related to hardware.

Accepted. Will correct in V4.

Quoted 10 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 95

Quoted 7 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +5 -0
+    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]

That's not the syntax you can find. Open example-schema and rewrite your bindings.

Accepted. Will correct in V4.

Change it to:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Owner of message-unit, is identified via Domain ID or did.

Quoted 19 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 135

Quoted 6 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +4 -0
+
+examples:
+  - |
+    ele_mu: ele_mu {

Node names should be generic. See also explanation and list of examples in DT specification:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevic
etree-specification.readthedocs.io%2Fen%2Flatest%2Fchapter2-devicetree- basics.html%23generic-names- recommendation&data=05%7C01%7Cpankaj.gupta%40nxp.com%7C72b9e1 8a32a342bcf68c08db6e6c8d5a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7 C0%7C0%7C638225184750511073%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30 00%7C%7C%7C&sdata=wvrm2b84xq6KYEIEEGm9%2BCAHaDsXOfKlLvamsjh3 jTg%3D&reserved=0

Accepted. Will correct in V4.
Will use the generic name "se-fw" for "secure-enclave firmware", instead of "ele-mu"

Quoted 5 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 140

Quoted 5 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +5 -0
+      compatible = "fsl,imx93-ele";
+      mbox-names = "tx", "rx";
+      mboxes = <&s4muap 2 0
+                &s4muap 3 0>;
+      fsl,ele_mu_id = <1>;

Used generic name and changed from "ele_mu_id" to "mu-id"

Quoted 3 lines

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 143

Quoted 3 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +3 -0
+      fsl,ele_max_users = <4>;
+      fsl,cmd_tag = /bits/ 8 <0x17>;
+      fsl,rsp_tag = /bits/ 8 <0xe1>;

Removed the above 3 non-hw defined bindings.

Quoted 4 lines
Quoted 1 line

+ };

Best regards,
Krzysztof

#4 lore raw

Re: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Quoted 31 lines · Pankaj Gupta
Quoted 31 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, June 16, 2023 6:51 PM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 3 lines · Pankaj Gupta

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

Quoted 4 lines

Enclave etc.
It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93 etc.

I don't see reply to Daniel's concerns.

Quoted 8 lines
Quoted 2 lines

I don't see improvements here based on the previous review you received. It seems you just ignored everything, right?

Replied to Daniel's concern.

Quoted 3 lines

Limited review follows up because binding is not in the shape for upstream. Do some internal reviews prior sending it.

Done the internal review.

I doubt. Your v4 bindings and DTS were not tested. v4 Driver has trivial issues.

Best regards,
Krzysztof

#5 lore raw

RE: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Quoted 55 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Thursday, July 13, 2023 12:12 AM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: Re: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 34 lines · Pankaj Gupta
Quoted 34 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, June 16, 2023 6:51 PM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 3 lines · Pankaj Gupta

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

Quoted 4 lines

Enclave etc.
It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93 etc.

I don't see reply to Daniel's concerns.

I don't see improvements here based on the previous review you received. It seems you just ignored everything, right?

Quoted 9 lines
Quoted 6 lines

Replied to Daniel's concern.

Quoted 3 lines

Limited review follows up because binding is not in the shape for upstream. Do some internal reviews prior sending it.

Done the internal review.

I doubt. Your v4 bindings and DTS were not tested. v4 Driver has trivial issues.

It is tested and my driver get probed. And all my functional tests are passing. No Patch-set is sent without testing.

Quoted 2 lines

Best regards,
Krzysztof

#6 lore raw

Re: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Quoted 58 lines · Pankaj Gupta
Quoted 58 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Thursday, July 13, 2023 12:12 AM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: Re: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 37 lines · Pankaj Gupta
Quoted 28 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, June 16, 2023 6:51 PM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 3 lines · Pankaj Gupta

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

Quoted 3 lines

Enclave etc.
It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93 etc.

Quoted 6 lines
Quoted 1 line

I don't see reply to Daniel's concerns.

I don't see improvements here based on the previous review you received. It seems you just ignored everything, right?

Replied to Daniel's concern.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines

Limited review follows up because binding is not in the shape for upstream. Do some internal reviews prior sending it.

Done the internal review.

I doubt. Your v4 bindings and DTS were not tested. v4 Driver has trivial issues.

It is tested and my driver get probed. And all my functional tests are passing. No Patch-set is sent without testing.

As you explained there, you did not test the bindings nor DTS with dtbs_check. So your test-suite is incomplete, it lacks basic testing.

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 90

Quoted 6 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +6 -0
+  mbox-names:
+    items:
+      - const: tx
+      - const: rx
+
+  fsl,ele_mu_did:

No underscores. Drop all properties not related to hardware.

How is this related to hardware?

Best regards,
Krzysztof

#8 lore raw

RE: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Quoted 27 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Thursday, July 13, 2023 12:11 AM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]; Daniel Baluta <[email protected]>
Subject: [EXT] Re: [PATCH v3 1/7] dt-bindings: arm: fsl: add mu binding doc

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 7 lines · Krzysztof Kozlowski
Quoted 6 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +6 -0
+  mbox-names:
+    items:
+      - const: tx
+      - const: rx
+
+  fsl,ele_mu_did:
Quoted 3 lines
Quoted 1 line

No underscores. Drop all properties not related to hardware.

How is this related to hardware?

Already Corrected in V4.

Quoted 3 lines

Best regards,
Krzysztof

#9 lore raw

PATCH v3 2/7 arm64: dts: imx93-11x11-evk: added ele-mu

In reply to Pankaj Gupta

adde support for ele-mu for imx93-11x11-evk.

---
 arch/arm64/boot/dts/freescale/imx93.dtsi | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx93.dtsi +11 -1
index e8d49660ac85..03ee20cf74ce 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Copyright 2022 NXP
+ * Copyright 2022-2023 NXP
  */
 
 #include <dt-bindings/clock/imx93-clock.h>
@@ -788,5 +788,15 @@ media_blk_ctrl: system-controller@4ac10000 {
 			#power-domain-cells = <1>;
 			status = "disabled";
 		};
+
+		ele_mu: ele-mu {
+			compatible = "fsl,imx93-ele";
+			mboxes = <&s4muap 0 0 &s4muap 1 0>;
+			mbox-names = "tx", "rx";
+			fsl,ele_mu_did = <3>;
+			fsl,ele_mu_id = <2>;
+			fsl,ele_mu_max_users = <4>;
+			status = "okay";
+		};
 	};
 };
Signature · 1 line
2.34.1
#10 lore raw

Re: [PATCH v3 2/7] arm64: dts: imx93-11x11-evk: added ele-mu

Quoted 9 lines · Pankaj Gupta

adde support for ele-mu for imx93-11x11-evk.

#include <dt-bindings/clock/imx93-clock.h>

arch/arm64/boot/dts/freescale/imx93.dtsi +0 -0
@@ -788,5 +788,15 @@ media_blk_ctrl: system-controller@4ac10000 {
 			#power-domain-cells = <1>;
 			status = "disabled";

arch/arm64/boot/dts/freescale/imx93.dtsi media_blk_ctrl: system-controller@4ac10000 { · line 799

Quoted 10 lines
arch/arm64/boot/dts/freescale/imx93.dtsi +9 -0
 		};
+
+		ele_mu: ele-mu {
+			compatible = "fsl,imx93-ele";
+			mboxes = <&s4muap 0 0 &s4muap 1 0>;
+			mbox-names = "tx", "rx";
+			fsl,ele_mu_did = <3>;
+			fsl,ele_mu_id = <2>;
+			fsl,ele_mu_max_users = <4>;
+			status = "okay";

Can you do some internal review first?

Best regards,
Krzysztof

#11 lore raw

RE: [EXT] Re: [PATCH v3 2/7] arm64: dts: imx93-11x11-evk: added ele-mu

Quoted 40 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, June 16, 2023 6:52 PM
To: Pankaj Gupta <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <[email protected]>; [email protected]; [email protected]; Gaurav Jain <[email protected]>; [email protected]
Subject: [EXT] Re: [PATCH v3 2/7] arm64: dts: imx93-11x11-evk: added ele- mu

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 10 lines · Pankaj Gupta

adde support for ele-mu for imx93-11x11-evk.

#include <dt-bindings/clock/imx93-clock.h> @@ -788,5 +788,15 @@

media_blk_ctrl: system-controller@4ac10000 {
                      #power-domain-cells = <1>;
                      status = "disabled";
              };

arch/arm64/boot/dts/freescale/imx93.dtsi media_blk_ctrl: system-controller@4ac10000 { · line 799

Quoted 9 lines
arch/arm64/boot/dts/freescale/imx93.dtsi +9 -0
+
+             ele_mu: ele-mu {
+                     compatible = "fsl,imx93-ele";
+                     mboxes = <&s4muap 0 0 &s4muap 1 0>;
+                     mbox-names = "tx", "rx";
+                     fsl,ele_mu_did = <3>;
+                     fsl,ele_mu_id = <2>;
+                     fsl,ele_mu_max_users = <4>;
+                     status = "okay";
Quoted 1 line

Can you do some internal review first?

Done.
- Removed non h/w dependent DT binding : " fsl,ele_mu_max_users".
- To denote the kernel driver for interacting with Secure-Enclave Firmware; re-named to "se-fw" from "ele-mu".

Quoted 3 lines

Best regards,
Krzysztof

#12 lore raw

PATCH v3 3/7 arm64: dts: imx93-11x11-evk: reserved mem-ranges to constrain ele-mu dma-range

In reply to Pankaj Gupta

EdgeLock Enclave are has a hardware limitation of restricted access to the DDR memory range:
- 0x80000000 0x9FFFFFFF

ELE-MU driver requireis 1MB of memory. In this patch the we are reserving 1MB of ddr memory region from the lower 32-bit range.

---
 arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts +15 -0
index fefb93487291..bb090300829e 100644
@@ -7,6 +7,10 @@
 
 #include "imx93.dtsi"
 
+&ele_mu {
+	memory-region = <&ele_reserved>;
+};
+
 / {
 	model = "NXP i.MX93 11X11 EVK board";
 	compatible = "fsl,imx93-11x11-evk", "fsl,imx93";
@@ -22,6 +26,17 @@ reg_vref_1v8: regulator-adc-vref {
 		regulator-max-microvolt = <1800000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		ele_reserved: ele-reserved@a4120000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa4120000 0 0x100000>;
+			no-map;
+		};
+	};
+
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
Signature · 1 line
2.34.1
#13 lore raw

PATCH v3 4/7 arm64: dts: imx8ulp-evk: added ele-mu

In reply to Pankaj Gupta

added support for ele-mu for imx8ulp-evk.

---
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8ulp.dtsi +12 -1
index ce8de81cac9a..cbc2769e4c8c 100644
@@ -113,7 +113,7 @@ sosc: clock-sosc {
 		#clock-cells = <0>;
 	};
 
-	sram@2201f000 {
+	sram0: sram@2201f000 {
 		compatible = "mmio-sram";
 		reg = <0x0 0x2201f000 0x0 0x1000>;
 
@@ -160,6 +160,17 @@ s4muap: mailbox@27020000 {
 			#mbox-cells = <2>;
 		};
 
+		ele_mu: ele-mu {
+			compatible = "fsl,imx-ele";
+			mboxes = <&s4muap 0 0 &s4muap 1 0>;
+			mbox-names = "tx", "rx";
+			fsl,ele_mu_did = <7>;
+			fsl,ele_mu_id = <2>;
+			fsl,ele_mu_max_users = <4>;
+			sram-pool = <&sram0>;
+			status = "okay";
+		};
+
 		per_bridge3: bus@29000000 {
 			compatible = "simple-bus";
 			reg = <0x29000000 0x800000>;
Signature · 1 line
2.34.1
#14 lore raw

PATCH v3 5/7 arm64: dts: imx8ulp-evk: reserved mem-ranges to constrain ele-mu dma-range

In reply to Pankaj Gupta

EdgeLock Enclave are has a hardware limitation of restricted access to the DDR memory range:
- 0x90000000 - 0xAFFFFFFF

ELE-MU driver requireis 1MB of memory. In this patch the we are reserving 1MB of ddr memory region from the lower 32-bit range.

---
 arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts +15 -0
index f1c6d933a17c..d2a39e9aa951 100644
@@ -19,6 +19,17 @@ memory@80000000 {
 		device_type = "memory";
 		reg = <0x0 0x80000000 0 0x80000000>;
 	};
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ele_reserved: ele-reserved@90000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x90000000 0 0x100000>;
+			no-map;
+		};
+	};
 
 	clock_ext_rmii: clock-ext-rmii {
 		compatible = "fixed-clock";
@@ -53,6 +64,10 @@ &usdhc0 {
 	status = "okay";
 };
 
+&ele_mu {
+	memory-region = <&ele_reserved>;
+};
+
 &fec {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&pinctrl_enet>;
Signature · 1 line
2.34.1
#15 lore raw

PATCH v3 6/7 firmware: imx: add ELE MU driver support

In reply to Pankaj Gupta

The Edgelock Enclave Message Unit (ELE MU), is a message based communication channel, to communicated with ELE Firmware.

This runs on a dedicated MU present between application core and ELE H/W IP. It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93

This patch implements the mail-box based communication with ELE firmware.

---
 drivers/firmware/imx/Kconfig              |   11 +
 drivers/firmware/imx/Makefile             |    2 +
 drivers/firmware/imx/ele_base_msg.c       |  372 ++++++
 drivers/firmware/imx/ele_fw_api.c         |  112 ++
 drivers/firmware/imx/ele_mu.c             | 1442 +++++++++++++++++++++
 drivers/firmware/imx/ele_mu.h             |  180 +++
 include/linux/firmware/imx/ele_base_msg.h |   62 +
 include/linux/firmware/imx/ele_fw_api.h   |   19 +
 include/linux/firmware/imx/ele_mu_ioctl.h |   52 +
 9 files changed, 2252 insertions(+)
 create mode 100644 drivers/firmware/imx/ele_base_msg.c
 create mode 100644 drivers/firmware/imx/ele_fw_api.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_fw_api.h
 create mode 100644 include/linux/firmware/imx/ele_mu_ioctl.h
drivers/firmware/imx/Kconfig +11 -0
index c027d99f2a59..eef6c6a8b61d 100644
@@ -28,3 +28,14 @@ config IMX_SCU_PD
 	depends on IMX_SCU
 	help
 	  The System Controller Firmware (SCFW) based power domain driver.
+
+config IMX_EL_ENCLAVE
+	tristate "i.MX Embedded EdgeLock Enclave support."
+	depends on IMX_MBOX && ARCH_MXC && ARM64
+	default m if ARCH_MXC
+
+	help
+	  It is possible to use APIs exposed by the iMX EdgeLock Enclave like base, HSM &
+	  SHE using the SAB protocol via the shared Messaging Unit. This driver exposes
+	  these interfaces via a set of file descriptors allowing to configure shared
+	  memory, send and receive messages.
drivers/firmware/imx/Makefile +2 -0
index b76acbade2a0..169870ad0fb5 100644
@@ -2,3 +2,5 @@
 obj-$(CONFIG_IMX_DSP)		+= imx-dsp.o
 obj-$(CONFIG_IMX_SCU)		+= imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o
 obj-$(CONFIG_IMX_SCU_PD)	+= scu-pd.o
+el_enclave-objs			= ele_mu.o ele_base_msg.o ele_fw_api.o
+obj-${CONFIG_IMX_EL_ENCLAVE}	+= el_enclave.o
drivers/firmware/imx/ele_base_msg.c new file +372 -0

372 lines not on this page · raw message

drivers/firmware/imx/ele_fw_api.c new file +112 -0

112 lines not on this page · raw message

drivers/firmware/imx/ele_mu.c new file +1442 -0

1,442 lines not on this page · raw message

drivers/firmware/imx/ele_mu.h new file +180 -0

180 lines not on this page · raw message

include/linux/firmware/imx/ele_base_msg.h new file +62 -0

62 lines not on this page · raw message

include/linux/firmware/imx/ele_fw_api.h new file +19 -0
new file mode 100644
index 000000000000..74108c7be4a8
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2023 NXP
+ */
+
+#ifndef ELE_FW_API_H
+#define ELE_FW_API_H
+
+#include <linux/hw_random.h>
+
+#define MESSAGING_VERSION_7		0x7
+
+#define ELE_INIT_FW_REQ                 0x17
+#define ELE_GET_RANDOM_REQ		0xCD
+
+int ele_get_random(struct hwrng *rng, void *data, size_t len, bool wait);
+int ele_init_fw(void);
+
+#endif /* ELE_FW_API_H */
include/linux/firmware/imx/ele_mu_ioctl.h new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.34.1
#16 lore raw

PATCH v3 7/7 MAINTAINERS: Added maintainer details

In reply to Pankaj Gupta

MAINTAINERS: Added maintainer details for ele-mu driver.

---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
index 6992b7cc7095..21a7a5604436 100644
@@ -13536,6 +13536,15 @@ F:	mm/
 F:	tools/mm/
 F:	tools/testing/selftests/mm/
 
+NXP Edgelock Enclave MU DRIVER
+M:	Pankaj Gupta <[email protected]>
+R:	NXP Linux Team <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml
+F:	drivers/firmware/imx/ele*.*
+F:	include/linux/firmware/imx/ele*.*
+
 MEMORY TECHNOLOGY DEVICES (MTD)
 M:	Miquel Raynal <[email protected]>
 M:	Richard Weinberger <[email protected]>
Signature · 1 line
2.34.1
#17 lore raw

RE: [PATCH v3 7/7] MAINTAINERS: Added maintainer details

Quoted 26 lines

-----Original Message-----
From: Pankaj Gupta
Sent: Friday, June 16, 2023 6:13 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; linux-arm- [email protected]; Gaurav Jain <[email protected]>; linux- [email protected]
Cc: Pankaj Gupta <[email protected]>
Subject: [PATCH v3 7/7] MAINTAINERS: Added maintainer details

MAINTAINERS: Added maintainer details for ele-mu driver.

---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index 6992b7cc7095..21a7a5604436 100644

MAINTAINERS F: mm/ · line 13544

Quoted 9 lines
MAINTAINERS +6 -0
@@ -13536,6 +13536,15 @@ F:	mm/
 F:	tools/mm/
 F:	tools/testing/selftests/mm/
 
+NXP Edgelock Enclave MU DRIVER
+M:	Pankaj Gupta <[email protected]>
+R:	NXP Linux Team <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Accepted. Will correct in V4 patch.

Quoted 8 lines
MAINTAINERS +3 -1
+F:	drivers/firmware/imx/ele*.*
+F:	include/linux/firmware/imx/ele*.*
+
 MEMORY TECHNOLOGY DEVICES (MTD)
 M:	Miquel Raynal <[email protected]>
 M:	Richard Weinberger <[email protected]>
--

2.34.1

#18 lore raw

Re: [PATCH v3 7/7] MAINTAINERS: Added maintainer details

Quoted 29 lines · Pankaj Gupta
Quoted 29 lines

-----Original Message-----
From: Pankaj Gupta
Sent: Friday, June 16, 2023 6:13 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; linux-arm- [email protected]; Gaurav Jain <[email protected]>; linux- [email protected]
Cc: Pankaj Gupta <[email protected]>
Subject: [PATCH v3 7/7] MAINTAINERS: Added maintainer details

MAINTAINERS: Added maintainer details for ele-mu driver.

---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index 6992b7cc7095..21a7a5604436 100644
@@ -13536,6 +13536,15 @@ F:	mm/
 F:	tools/mm/
 F:	tools/testing/selftests/mm/
 
Quoted 8 lines

MAINTAINERS F: mm/ · line 13544

Quoted 6 lines
MAINTAINERS +6 -0
+NXP Edgelock Enclave MU DRIVER
+M:	Pankaj Gupta <[email protected]>
+R:	NXP Linux Team <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Accepted. Will correct in V4 patch.

Also please put it in the MAINTAINERS file in alphabetical order, not where it is in this patch.
Thanks.

Quoted 9 lines
Quoted 8 lines
MAINTAINERS +3 -1
+F:	drivers/firmware/imx/ele*.*
+F:	include/linux/firmware/imx/ele*.*
+
 MEMORY TECHNOLOGY DEVICES (MTD)
 M:	Miquel Raynal <[email protected]>
 M:	Richard Weinberger <[email protected]>
--

2.34.1

Signature · 1 line
~Randy