diff mbox series

[1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property

Message ID 1582546474-21721-2-git-send-email-peng.fan@nxp.com (mailing list archive)
State New, archived
Headers show
Series mailbox/firmware: imx: support SCU channel type | expand

Commit Message

Peng Fan Feb. 24, 2020, 12:14 p.m. UTC
From: Peng Fan <peng.fan@nxp.com>

Add fsl,scu property, this needs to be enabled for SCU channel type.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 1 +
 1 file changed, 1 insertion(+)

Comments

Oleksij Rempel Feb. 24, 2020, 1:06 p.m. UTC | #1
Hi Peng,

On 24.02.20 13:14, peng.fan@nxp.com wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add fsl,scu property, this needs to be enabled for SCU channel type.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>   Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> index 9c43357c5924..5b502bcf7122 100644
> --- a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> +++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> @@ -45,6 +45,7 @@ Optional properties:
>   -------------------
>   - clocks :	phandle to the input clock.
>   - fsl,mu-side-b : Should be set for side B MU.
> +- fsl,scu: Support i.MX8/8X SCU channel type

Hm.. what you are doing is a "link aggregation" with round-robin scheduling:
https://en.wikipedia.org/wiki/Link_aggregation

I would be happy if we can define a generic mailbox property for this.

Kind regards,
Oleksij Rempel
Peng Fan Feb. 24, 2020, 1:33 p.m. UTC | #2
Hi Oleksij,

> Subject: Re: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property
> 
> Hi Peng,
> 
> On 24.02.20 13:14, peng.fan@nxp.com wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add fsl,scu property, this needs to be enabled for SCU channel type.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >   Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> > index 9c43357c5924..5b502bcf7122 100644
> > --- a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> > +++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> > @@ -45,6 +45,7 @@ Optional properties:
> >   -------------------
> >   - clocks :	phandle to the input clock.
> >   - fsl,mu-side-b : Should be set for side B MU.
> > +- fsl,scu: Support i.MX8/8X SCU channel type

From RM, one of the MU using example.
12.9.2.3.2 Messaging Examples
The following are messaging examples:
• Passing short messages: Transmit register(s) can be used to pass short messages
from one to four words in length. For example, when a four-word message is desired,
only one of the registers needs to have its corresponding interrupt enable bit set at the
receiver side; the message’s first three words are written to the registers whose
interrupt is masked, and the fourth word is written to the other register (which
triggers an interrupt at the receiver side).

So we could define flexible channel, but not restricted only one TR0 or RR0 register.

And SCFW SCU side IPC is using "Passing short messages" method.

> 
> Hm.. what you are doing is a "link aggregation" with round-robin scheduling:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wik
> ipedia.org%2Fwiki%2FLink_aggregation&amp;data=02%7C01%7Cpeng.fan%4
> 0nxp.com%7C23f8a75e19a4484159d908d7b92a6524%7C686ea1d3bc2b4c6f
> a92cd99c5c301635%7C0%7C0%7C637181464049069832&amp;sdata=yGyL3
> GwLvzkNh%2Btsl8Qc%2B5CgAtpooOocxXpUrsJ7Kg8%3D&amp;reserved=0

Due to SCFW message is not fixed length, driver has to parse the msg header
to know how many to transmit and how many to receive.

> 
> I would be happy if we can define a generic mailbox property for this.

Any suggestions? I am thinking mbox_send_message_size with an extra
size parameter from firmware client side. But not have good idea
on rx.

Thanks,
Peng.

> 
> Kind regards,
> Oleksij Rempel
> 
> --
> Pengutronix e.K.                           |
> |
> Industrial Linux Solutions                 |
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.p
> engutronix.de%2F&amp;data=02%7C01%7Cpeng.fan%40nxp.com%7C23f8a7
> 5e19a4484159d908d7b92a6524%7C686ea1d3bc2b4c6fa92cd99c5c301635%
> 7C0%7C0%7C637181464049079826&amp;sdata=1hEs2jScRBEGAS%2FrzD8i6l
> R%2FRybXu8hiq8hfQ3wDQ8I%3D&amp;reserved=0  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0
> |
> Amtsgericht Hildesheim, HRA 2686           | Fax:
> +49-5121-206917-5555 |
Rob Herring (Arm) Feb. 28, 2020, 3:13 p.m. UTC | #3
On Mon, Feb 24, 2020 at 08:14:32PM +0800, peng.fan@nxp.com wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add fsl,scu property, this needs to be enabled for SCU channel type.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> index 9c43357c5924..5b502bcf7122 100644
> --- a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> +++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> @@ -45,6 +45,7 @@ Optional properties:
>  -------------------
>  - clocks :	phandle to the input clock.
>  - fsl,mu-side-b : Should be set for side B MU.
> +- fsl,scu: Support i.MX8/8X SCU channel type

What's the type for this?

Perhaps update the example.

>  
>  Examples:
>  --------
> -- 
> 2.16.4
>
Peng Fan Feb. 29, 2020, 2:09 a.m. UTC | #4
Hi Rob,

> Subject: Re: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property
> 
> On Mon, Feb 24, 2020 at 08:14:32PM +0800, peng.fan@nxp.com wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add fsl,scu property, this needs to be enabled for SCU channel type.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> > index 9c43357c5924..5b502bcf7122 100644
> > --- a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> > +++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
> > @@ -45,6 +45,7 @@ Optional properties:
> >  -------------------
> >  - clocks :	phandle to the input clock.
> >  - fsl,mu-side-b : Should be set for side B MU.
> > +- fsl,scu: Support i.MX8/8X SCU channel type
> 
> What's the type for this?
> 
> Perhaps update the example.

This patch is deprecated, please help review
https://lore.kernel.org/patchwork/patch/1200460/

Thanks,
Peng.

> 
> >
> >  Examples:
> >  --------
> > --
> > 2.16.4
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
index 9c43357c5924..5b502bcf7122 100644
--- a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
+++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.txt
@@ -45,6 +45,7 @@  Optional properties:
 -------------------
 - clocks :	phandle to the input clock.
 - fsl,mu-side-b : Should be set for side B MU.
+- fsl,scu: Support i.MX8/8X SCU channel type
 
 Examples:
 --------