devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Jason-JH.Lin" <jason-jh.lin@mediatek.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Conor Dooley <conor+dt@kernel.org>,
	Jason-ch Chen <jason-ch.chen@mediatek.com>,
	Johnson Wang <johnson.wang@mediatek.com>,
	Elvis Wang <Elvis.Wang@mediatek.com>,
	Singo Chang <singo.chang@mediatek.com>,
	Nancy Lin <nancy.lin@mediatek.com>,
	Shawn Sung <shawn.sung@mediatek.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	dri-devel@lists.freedesktop.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH 01/15] dt-bindings: mailbox: Add property for CMDQ secure driver
Date: Tue, 19 Sep 2023 11:46:14 -0500	[thread overview]
Message-ID: <20230919164614.GA4059766-robh@kernel.org> (raw)
In-Reply-To: <20230918192204.32263-2-jason-jh.lin@mediatek.com>

On Tue, Sep 19, 2023 at 03:21:50AM +0800, Jason-JH.Lin wrote:
> Add mboxes to define a GCE loopping thread as a secure irq handler.
> Add mediatek,event to define a GCE software event siganl as a secure
> irq.
> 
> These 2 properties are required for CMDQ secure driver.
> 
> Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
> ---
>  .../mailbox/mediatek,gce-mailbox.yaml         | 30 +++++++++++++++----
>  1 file changed, 24 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> index cef9d7601398..5c9aebe83d2d 100644
> --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> @@ -49,6 +49,21 @@ properties:
>      items:
>        - const: gce
>  
> +  mboxes:
> +    description:
> +      A mailbox channel used as a secure irq handler in normal world.
> +      Using mailbox to communicate with GCE to setup looping thread,
> +      it should have this property and a phandle, mailbox specifiers.

All cases of 'mboxes' have a phandle and specifiers. No need to repeat 
that here.

> +    $ref: /schemas/types.yaml#/definitions/phandle-array

Already has a type definition too. You need to define how many entries 
and what each entry is if more than one. IOW, the same thing as clocks, 
resets, interrupts, etc.

> +
> +  mediatek,gce-events:

This is used all over. It really needs a single definition which is then 
referenced by the users.

> +    description:
> +      The event id which is mapping to a software event signal to gce.
> +      It is used as a secure irq for every secure gce threads.
> +      The event id is defined in the gce header
> +      include/dt-bindings/mailbox/mediatek,<chip>-gce.h of each chips.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +
>  required:
>    - compatible
>    - "#mbox-cells"
> @@ -71,20 +86,23 @@ additionalProperties: false
>  
>  examples:
>    - |
> -    #include <dt-bindings/clock/mt8173-clk.h>
> +    #include <dt-bindings/clock/mediatek,mt8188-clk.h>
>      #include <dt-bindings/interrupt-controller/arm-gic.h>
>      #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/mailbox/mediatek,mt8188-gce.h>
>  
>      soc {
>          #address-cells = <2>;
>          #size-cells = <2>;
>  
> -        gce: mailbox@10212000 {
> -            compatible = "mediatek,mt8173-gce";
> -            reg = <0 0x10212000 0 0x1000>;
> -            interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>;
> +        gce0: mailbox@10320000 {
> +            compatible = "mediatek,mt8188-gce";

Are these new properties only for mt8188? If so, then you need a schema 
saying that. If not, then this is an unnecessary change to the example.

> +            reg = <0 0x10320000 0 0x4000>;
> +            interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH 0>;
>              #mbox-cells = <2>;
> -            clocks = <&infracfg CLK_INFRA_GCE>;
> +            clocks = <&infracfg_ao CLK_INFRA_AO_GCE>;
>              clock-names = "gce";
> +            mboxes = <&gce0 15 CMDQ_THR_PRIO_1>;

The provider is also a consumer?

> +            mediatek,gce-events = <CMDQ_SYNC_TOKEN_SECURE_THR_EOF>;
>          };
>      };
> -- 
> 2.18.0
> 

  reply	other threads:[~2023-09-19 16:46 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 19:21 [PATCH 00/15] Add CMDQ secure driver for SVP Jason-JH.Lin
2023-09-18 19:21 ` [PATCH 01/15] dt-bindings: mailbox: Add property for CMDQ secure driver Jason-JH.Lin
2023-09-19 16:46   ` Rob Herring [this message]
2023-09-21 15:12     ` Jason-JH Lin (林睿祥)
2023-09-18 19:21 ` [PATCH 02/15] dt-bindings: gce: mt8195: Add CMDQ_SYNC_TOKEN_SECURE_THR_EOF event id Jason-JH.Lin
2023-09-23 18:01   ` Krzysztof Kozlowski
2023-09-25  5:05     ` Jason-JH Lin (林睿祥)
2023-09-25  6:42       ` Krzysztof Kozlowski
2023-09-25  9:11         ` Jason-JH Lin (林睿祥)
2023-09-25  9:28           ` Krzysztof Kozlowski
2023-09-26  2:45             ` Jason-JH Lin (林睿祥)
2023-09-18 19:21 ` [PATCH 03/15] soc: mailbox: Add SPR definition for GCE Jason-JH.Lin
2023-09-23 18:02   ` Krzysztof Kozlowski
2023-09-25  5:08     ` Jason-JH Lin (林睿祥)
2023-09-25  6:42       ` Krzysztof Kozlowski
2023-09-25 10:24         ` Jason-JH Lin (林睿祥)
2023-09-18 19:21 ` [PATCH 04/15] soc: mailbox: Add cmdq_pkt_logic_command to support math operation Jason-JH.Lin
2023-09-18 19:21 ` [PATCH 05/15] mailbox: mediatek: Add cmdq_pkt_write_s_reg_value to CMDQ driver Jason-JH.Lin
2023-09-18 19:21 ` [PATCH 06/15] mailbox: mediatek: Add cmdq_mbox_stop to disable GCE thread Jason-JH.Lin
2023-09-19  1:24   ` CK Hu (胡俊光)
2023-09-21 14:15     ` Jason-JH Lin (林睿祥)
2023-09-23 18:02   ` Krzysztof Kozlowski
2023-09-25  5:10     ` Jason-JH Lin (林睿祥)
2023-09-23 18:07   ` Krzysztof Kozlowski
2023-09-25  5:25     ` Jason-JH Lin (林睿祥)
2023-09-18 19:21 ` [PATCH 07/15] mailbox: mediatek: Add loop pkt flag and irq handling for loop command Jason-JH.Lin
2023-09-23 18:03   ` Krzysztof Kozlowski
2023-09-25  5:21     ` Jason-JH Lin (林睿祥)
2023-09-25  6:44       ` Krzysztof Kozlowski
2023-09-26  3:20         ` Jason-JH Lin (林睿祥)
2023-09-26 20:32           ` Krzysztof Kozlowski
2023-09-18 19:21 ` [PATCH 08/15] soc: mediatek: Add cmdq_pkt_finalize_loop to CMDQ driver Jason-JH.Lin
2023-09-19  1:38   ` CK Hu (胡俊光)
2023-09-21 14:25     ` Jason-JH Lin (林睿祥)
2023-09-23 18:04   ` Krzysztof Kozlowski
2023-09-23 18:08   ` Krzysztof Kozlowski
2023-09-25  6:04     ` Jason-JH Lin (林睿祥)
2023-09-25  6:40       ` Krzysztof Kozlowski
2023-09-18 19:21 ` [PATCH 09/15] mailbox: mediatek: Add secure CMDQ driver support for " Jason-JH.Lin
2023-09-18 19:21 ` [PATCH 10/15] mailbox: mediatek: Add CMDQ secure mailbox driver Jason-JH.Lin
2023-09-18 19:22 ` [PATCH 11/15] soc: mediatek: Add cmdq_insert_backup_cookie before EOC for secure pkt Jason-JH.Lin
2023-09-19  3:04   ` CK Hu (胡俊光)
2023-09-21 14:28     ` Jason-JH Lin (林睿祥)
2023-09-18 19:22 ` [PATCH 12/15] mailbox: mediatek: Add CMDQ driver support for mt8188 Jason-JH.Lin
2023-09-18 19:22 ` [PATCH 13/15] mailbox: mediatek: Add mt8188 support for CMDQ secure driver Jason-JH.Lin
2023-09-23 18:09   ` Krzysztof Kozlowski
2023-09-25  6:01     ` Jason-JH Lin (林睿祥)
2023-09-25  6:45       ` Krzysztof Kozlowski
2023-09-25  9:02         ` Jason-JH Lin (林睿祥)
2023-09-18 19:22 ` [PATCH 14/15] mailbox: mediatek: Add mt8195 " Jason-JH.Lin
2023-09-23 18:08   ` Krzysztof Kozlowski
2023-09-25  5:48     ` Jason-JH Lin (林睿祥)
2023-09-18 19:22 ` [PATCH 15/15] arm64: dts: mediatek: mt8195: Add CMDQ secure driver support for gce0 Jason-JH.Lin
2023-09-20  3:08 ` [PATCH 00/15] Add CMDQ secure driver for SVP CK Hu (胡俊光)
2023-09-21 14:44   ` Jason-JH Lin (林睿祥)

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=20230919164614.GA4059766-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Elvis.Wang@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jason-ch.chen@mediatek.com \
    --cc=jason-jh.lin@mediatek.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=johnson.wang@mediatek.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nancy.lin@mediatek.com \
    --cc=shawn.sung@mediatek.com \
    --cc=singo.chang@mediatek.com \
    /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;
as well as URLs for NNTP newsgroup(s).