From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "conor@kernel.org" <conor@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
"Jason-ch Chen (陳建豪)" <Jason-ch.Chen@mediatek.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"Shawn Sung (宋孝謙)" <Shawn.Sung@mediatek.com>,
"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"jassisinghbrar@gmail.com" <jassisinghbrar@gmail.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH RESEND,v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver
Date: Tue, 28 May 2024 15:10:11 +0000 [thread overview]
Message-ID: <9c39bbb1b1363887aa55cfe4118683ee97f9f875.camel@mediatek.com> (raw)
In-Reply-To: <20240528-herbicide-starving-3d162906914e@spud>
On Tue, 2024-05-28 at 15:59 +0100, Conor Dooley wrote:
> On Tue, May 28, 2024 at 02:38:46PM +0000, Jason-JH Lin (林睿祥) wrote:
> > Hi Conor,
> >
> > On Mon, 2024-05-27 at 18:36 +0100, Conor Dooley wrote:
> > > On Sun, May 26, 2024 at 10:44:37PM +0800, Jason-JH.Lin wrote:
> > > > 1. Add mboxes property to define a GCE loopping thread as a
> > > > secure
> > > > IRQ
> > > > handler.
> > > > The CMDQ secure driver requests a mbox channel and sends a
> > > > looping
> > > > command to the GCE thread. The looping command will wait for a
> > > > secure
> > > > packet done event signal from secure world and then jump back
> > > > to
> > > > the
> > > > first instuction. Each time it waits for an event, it notifies
> > > > the
> > > > CMDQ driver to perform the same action as the IRQ handler.
> > > >
> > > > 2. Add gce-events property from gce-props.yaml to define a
> > > > secure packet done signal in secure world.
> > > > There are 1024 events IDs for GCE to use to execute
> > > > instructions in
> > > > the specific event happened. These events could be signaled by
> > > > HW
> > > > or SW
> > > > and their value would be different in different SoC because of
> > > > HW
> > > > event
> > > > IDs distribution range from 0 to 1023.
> > > > If we set a static event ID: 855 for mt8188, it might be
> > > > conflict
> > > > the
> > > > event ID original set in mt8195.
> > >
> > > Two different SoCs, two different compatibles, no problem.
> > > I'm almost certain you previously told me that the firmware
> > > changing
> > > could result in a different event ID, but I see no mention of
> > > that
> > > here.
> >
> > Yes, it could be, but we don't use it that way.
> >
> > > The commit messages makes it seem like this can be determined by
> > > the
> > > compatible, so either give me a commit message that explains why
> > > the
> > > compatible is not sufficient or drop the patch.
> > >
> >
> > Yes, this can be determined by compatible in CMDQ mailbox driver,
> > so I think it's possible to put this in the CMDQ mailbox driver
> > data
> > and configure by different SoC.
> >
> > The problem is these events are defined in include/dt-
> > bindings/mailbox/mediatek,mt8188-gce.h and include/dt-
> > bindings/gce/mt8195-gce.h.
> > I can only use them in their mt8188.dts or mt8195.dts.
> >
> > If I want to use the same event define in 2 different headers in
> > the
> > same CMDQ mailbox driver, I think I just can parse their dts to get
> > the
> > corresponding one.
> > Do you know how to generally deal with this problem?
> > Or I can just use the number of event ID in driver data without the
> > event define in dt-bindings header.
>
> I don't think I really understand the problem. You get the
> channelid/event data from the match data, right? Is the problem that
> both files define the same "word" to mean different numbers?
Yes, I mean the same "event define" with different event ID numbers in
different SoC headers.
> In that
> case, just define the numbers locally in the driver, you don't need
> to
> include a binding header when there's no data sharing between dts and
> kernel.
OK, I'll do that and drop this patch.
Thanks~
Regards,
Jason-JH.Lin
next prev parent reply other threads:[~2024-05-28 15:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 14:44 [PATCH RESEND,v6 0/8] Add CMDQ secure driver for SVP Jason-JH.Lin
2024-05-26 14:44 ` [PATCH RESEND,v6 1/8] dt-bindings: gce: mt8195: Add CMDQ_SYNC_TOKEN_SECURE_THR_EOF event id Jason-JH.Lin
2024-05-26 14:44 ` [PATCH RESEND,v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver Jason-JH.Lin
2024-05-26 16:13 ` Rob Herring (Arm)
2024-05-27 5:21 ` Jason-JH Lin (林睿祥)
2024-05-27 17:36 ` Conor Dooley
2024-05-28 14:38 ` Jason-JH Lin (林睿祥)
2024-05-28 14:59 ` Conor Dooley
2024-05-28 15:10 ` Jason-JH Lin (林睿祥) [this message]
2024-05-26 14:44 ` [PATCH RESEND,v6 3/8] soc: mediatek: cmdq: Add cmdq_pkt_logic_command to support math operation Jason-JH.Lin
2024-05-26 14:44 ` [PATCH RESEND,v6 4/8] mailbox: mtk-cmdq: Support GCE loop packets in interrupt handler Jason-JH.Lin
2024-05-26 14:44 ` [PATCH RESEND,v6 5/8] mailbox: mediatek: Move reuseable definition to header for secure driver Jason-JH.Lin
2024-05-26 14:44 ` [PATCH RESEND,v6 6/8] mailbox: mediatek: Add CMDQ secure mailbox driver Jason-JH.Lin
2024-05-27 3:44 ` [PATCH RESEND, v6 " CK Hu (胡俊光)
2024-05-27 5:04 ` Jason-JH Lin (林睿祥)
2024-05-28 2:19 ` CK Hu (胡俊光)
2024-05-29 14:33 ` Jason-JH Lin (林睿祥)
2024-05-28 3:17 ` CK Hu (胡俊光)
2024-05-28 15:33 ` Jason-JH Lin (林睿祥)
2024-06-17 7:18 ` CK Hu (胡俊光)
2024-05-26 14:44 ` [PATCH RESEND,v6 7/8] mailbox: mediatek: Add secure CMDQ driver support for CMDQ driver Jason-JH.Lin
2024-05-26 14:44 ` [PATCH RESEND,v6 8/8] soc: mediatek: mtk-cmdq: Add secure cmdq_pkt APIs Jason-JH.Lin
2024-05-28 3:01 ` CK Hu (胡俊光)
2024-05-28 15:33 ` Jason-JH Lin (林睿祥)
2024-05-29 1:58 ` CK Hu (胡俊光)
2024-05-29 14:49 ` Jason-JH Lin (林睿祥)
2024-06-13 10:58 ` [PATCH RESEND,v6 0/8] Add CMDQ secure driver for SVP Pavel Machek
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=9c39bbb1b1363887aa55cfe4118683ee97f9f875.camel@mediatek.com \
--to=jason-jh.lin@mediatek.com \
--cc=Jason-ch.Chen@mediatek.com \
--cc=Nancy.Lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Shawn.Sung@mediatek.com \
--cc=Singo.Chang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jassisinghbrar@gmail.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=robh+dt@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;
as well as URLs for NNTP newsgroup(s).