2020-02-24 12:21:52

by Peng Fan

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

From: Peng Fan <[email protected]>

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

Signed-off-by: Peng Fan <[email protected]>
---
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

Examples:
--------
--
2.16.4


2020-02-24 13:08:11

by Oleksij Rempel

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property

Hi Peng,

On 24.02.20 13:14, [email protected] wrote:
> From: Peng Fan <[email protected]>
>
> Add fsl,scu property, this needs to be enabled for SCU channel type.
>
> Signed-off-by: Peng Fan <[email protected]>
> ---
> 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

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

2020-02-24 13:33:32

by Peng Fan

[permalink] [raw]
Subject: RE: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property

Hi Oleksij,

> Subject: Re: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property
>
> Hi Peng,
>
> On 24.02.20 13:14, [email protected] wrote:
> > From: Peng Fan <[email protected]>
> >
> > Add fsl,scu property, this needs to be enabled for SCU channel type.
> >
> > Signed-off-by: Peng Fan <[email protected]>
> > ---
> > 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 |

2020-02-28 15:13:47

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property

On Mon, Feb 24, 2020 at 08:14:32PM +0800, [email protected] wrote:
> From: Peng Fan <[email protected]>
>
> Add fsl,scu property, this needs to be enabled for SCU channel type.
>
> Signed-off-by: Peng Fan <[email protected]>
> ---
> 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
>

2020-02-29 02:10:09

by Peng Fan

[permalink] [raw]
Subject: RE: [PATCH 1/3] dt-bindings: mailbox: imx-mu: add fsl,scu property

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, [email protected] wrote:
> > From: Peng Fan <[email protected]>
> >
> > Add fsl,scu property, this needs to be enabled for SCU channel type.
> >
> > Signed-off-by: Peng Fan <[email protected]>
> > ---
> > 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
> >