mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Pankaj Gupta <pankaj.gupta@nxp.com>,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, gaurav.jain@nxp.com,
	sahil.malhotra@nxp.com, aisheng.dong@nxp.com, V.Sethi@nxp.com,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>
Subject: Re: [NXP ELE-MUAP 1/7] doc: device tree binding addition for ele MU
Date: Wed, 12 Apr 2023 16:00:39 +0800	[thread overview]
Message-ID: <99aeb60e-4d30-7a2b-318d-8b6f07776fea@oss.nxp.com> (raw)
In-Reply-To: <20230411162536.30604-2-pankaj.gupta@nxp.com>

Please use scripts/get_maintainer.pl to cc all. DT maintainers should 
review this patch.

On 4/12/2023 12:25 AM, Pankaj Gupta wrote:
> Documentation update with addition of new device tree
> for NXP ele-mu (Edgelock Enclave Message Unit), driver.

The subject should be "dt-bindings: [susbsys]: [module]: ..."
> 
> Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
> ---
>   .../bindings/arm/freescale/fsl,ele_mu.yaml    | 90 +++++++++++++++++++
>   .../devicetree/bindings/mailbox/fsl,muap.txt  | 89 ++++++++++++++++++
No txt binding. Only yaml.

>   2 files changed, 179 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml
>   create mode 100644 Documentation/devicetree/bindings/mailbox/fsl,muap.txt
> 
> 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..8f75a43aec26
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

This should be firmware binding, not freescale machine.

> @@ -0,0 +1,90 @@
> +# 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 MUAP

> +
> +maintainers:
> +  - Pankaj Gupta <pankaj.gupta@nxp.com>
> +
> +description: |
> +  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:
> +      List of <&phandle type channel> - 4 channels for TX, 4 channels for RX,
> +      1 channel for TXDB (see mailbox/fsl,muap.txt)
> +    maxItems: 9
> +
> +  mbox-names:
> +    items:
> +      - const: tx
> +      - const: rx

You listed 9 mboxes handle, but you only has 2 names here?

> +
> +  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 {
I would prefer this ele or system-controller,
mu is message unit ,should not be used.

> +      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>;
> +    };
> diff --git a/Documentation/devicetree/bindings/mailbox/fsl,muap.txt b/Documentation/devicetree/bindings/mailbox/fsl,muap.txt

This should be in a new patch and yaml format, but we already have 
fsl,mu.yaml, is there a need to add a new one here?

Regards,
Peng.

> new file mode 100644
> index 000000000000..6854ce3467fe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/fsl,muap.txt
> @@ -0,0 +1,89 @@
> +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.
> +
> + When a message is received, the driver select the device_ctx receiving the
> + message depending on the tag in the message. It selects the device_ctx
> + accordingly.
> +
> +
> +NXP i.MX ELE-MU Device Node:
> +===========================
> +Required properties:
> +--------------------
> +- compatible:		Shall be: "fsl,imx-ele", "fsl,imx93-ele"
> +- mbox-names:		Contains the name of TX/RX channels- "tx", "rx";
> +- mboxes:		Details of the shared mailbox node instance from the
> +			device tree. Example values are:
> +			For TX: s4muap 0 0
> +			For RX: s4muap 1 0
> +
> +- fsl,ele_mu_id		Contains the message unit id that connects between
> +			application core and NXP EL-Enclave.
> +- fsl,ele_max_users	For 1 user-space application, value of >2  is suggested.
> +- fsl,cmd_tag		Default value of command tag is 0x17. Though it can be
> +			over-ridden for futures SoCs.
> +- fsl,rsp_tag		Default value of command tag is 0xe1. Though it can be
> +			over-ridden for futures SoCs.
> +
> +Example:
> +--------
> +
> +	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>;
> +	};

  reply	other threads:[~2023-04-12  8:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 16:25 [NXP ELE-MUAP Driver 0/7] *** firmware: imx: NXP Edgelock Enclave MUAP Driver *** Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 1/7] doc: device tree binding addition for ele MU Pankaj Gupta
2023-04-12  8:00   ` Peng Fan [this message]
2023-04-12  8:01   ` Krzysztof Kozlowski
2023-04-11 16:25 ` [NXP ELE-MUAP 2/7] arm64: dts: imx93-11x11-evk: added ele-mu Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 3/7] arm64: dts: imx93-11x11-evk: reserved mem-ranges to constrain ele-mu dma-range Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 4/7] arm64: dts: imx8ulp-evk: added ele-mu Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 5/7] arm64: dts: imx8ulp-evk: reserved mem-ranges to constrain ele-mu dma-range Pankaj Gupta
2023-04-11 16:25 ` [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support Pankaj Gupta
2023-04-11 17:31   ` kernel test robot
2023-04-12  1:11   ` kernel test robot
2023-04-11 16:25 ` [NXP ELE-MUAP 7/7] MAINTAINERS: Added maintainer details Pankaj Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99aeb60e-4d30-7a2b-318d-8b6f07776fea@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=V.Sethi@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=gaurav.jain@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sahil.malhotra@nxp.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®